summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_defs.h
diff options
context:
space:
mode:
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>2016-06-24 15:17:55 +0200
committerBruce Richardson <bruce.richardson@intel.com>2016-06-27 16:17:52 +0200
commitc305090bbaf8da9120db8eac584a9954c085f2c5 (patch)
tree5bc18473e3aeec501b11fe54621b08f81ffd93e5 /drivers/net/mlx5/mlx5_defs.h
parent99c12dcca65d052fd587d10fa54ddd02913498bd (diff)
downloaddpdk-next-eventdev-c305090bbaf8da9120db8eac584a9954c085f2c5.zip
dpdk-next-eventdev-c305090bbaf8da9120db8eac584a9954c085f2c5.tar.gz
dpdk-next-eventdev-c305090bbaf8da9120db8eac584a9954c085f2c5.tar.xz
net/mlx5: replace countdown with threshold for Tx completions
Replacing the variable countdown (which depends on the number of descriptors) with a fixed relative threshold known at compile time improves performance by reducing the TX queue structure footprint and the amount of code to manage completions during a burst. Completions are now requested at most once per burst after threshold is reached. Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_defs.h')
-rw-r--r--drivers/net/mlx5/mlx5_defs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 8d2ec7a..cc2a6f3 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -48,8 +48,11 @@
/* Maximum number of special flows. */
#define MLX5_MAX_SPECIAL_FLOWS 4
-/* Request send completion once in every 64 sends, might be less. */
-#define MLX5_PMD_TX_PER_COMP_REQ 64
+/*
+ * Request TX completion every time descriptors reach this threshold since
+ * the previous request. Must be a power of two for performance reasons.
+ */
+#define MLX5_TX_COMP_THRESH 32
/* RSS Indirection table size. */
#define RSS_INDIRECTION_TABLE_SIZE 256