Skip to content

Commit

Permalink
Merge pull request #6 from adickson66/master
Browse files Browse the repository at this point in the history
Disable cqe_compression at the driver code level
  • Loading branch information
adickson66 authored Nov 6, 2020
2 parents b8696da + a4b6ee5 commit 6941a14
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
47 changes: 47 additions & 0 deletions patches/disable_cqe_compression.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Disable cqe_compression at the driver code level

From: Andy Dickson <[email protected]>


---
drivers/net/mlx5/linux/mlx5_os.c | 4 ++++
drivers/net/mlx5/mlx5.c | 4 ++++
2 files changed, 8 insertions(+)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 69123e12c..edb41ffec 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -690,12 +690,16 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
mprq_caps.max_single_wqe_log_num_of_strides;
}
#endif
+#ifndef SL_DISABLE_CQE_COMPRESSION
if (RTE_CACHE_LINE_SIZE == 128 &&
!(dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))
cqe_comp = 0;
else
cqe_comp = 1;
config->cqe_comp = cqe_comp;
+#else
+ config->cqe_comp = cqe_comp = 0;
+#endif
#ifdef HAVE_IBV_MLX5_MOD_CQE_128B_PAD
/* Whether device supports 128B Rx CQE padding. */
cqe_pad = RTE_CACHE_LINE_SIZE == 128 &&
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 1e4c695f8..ca286932c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1518,7 +1518,11 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
}
mod = tmp >= 0 ? tmp : -tmp;
if (strcmp(MLX5_RXQ_CQE_COMP_EN, key) == 0) {
+#ifndef SL_DISABLE_CQE_COMPRESSION
config->cqe_comp = !!tmp;
+#else
+ config->cqe_comp = 0;
+#endif
} else if (strcmp(MLX5_RXQ_CQE_PAD_EN, key) == 0) {
config->cqe_pad = !!tmp;
} else if (strcmp(MLX5_RXQ_PKT_PAD_EN, key) == 0) {
3 changes: 2 additions & 1 deletion patches/series
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This series applies on GIT commit v20.08-rc3
# This series applies on GIT commit 6636b04b82897816e0e05134f55a578cb7e124bc
ring-free.patch
ipsec_group-cast-rte_ipsec_session.patch
fix-igb-uio-compile.patch
trace.patch
disable_cqe_compression.patch
2 changes: 1 addition & 1 deletion patches/trace.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From: Dennis Afanasev <[email protected]>
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h
index b03960277..d328a9ff8 100644
index b03960277..051c3376c 100644
--- a/lib/librte_eal/include/rte_trace_point.h
+++ b/lib/librte_eal/include/rte_trace_point.h
@@ -298,13 +298,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
Expand Down

0 comments on commit 6941a14

Please sign in to comment.