DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>,
	Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Cc: dev@dpdk.org, Dekel Peled <dekelp@mellanox.com>
Subject: [dpdk-dev] [PATCH 08/11] net/mlx5: fix DevX Rx queue memory alignment
Date: Mon, 29 Jul 2019 11:53:26 +0000	[thread overview]
Message-ID: <1564401209-18752-9-git-send-email-matan@mellanox.com> (raw)
In-Reply-To: <1564401209-18752-1-git-send-email-matan@mellanox.com>

The alignment requested by the FW for WQ buffer allocation is 512.

Change it from cache line alignment to 512.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_prm.h | 3 +++
 drivers/net/mlx5/mlx5_rxq.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 6ea6345..42ead7d 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -240,6 +240,9 @@
 /* The maximum log value of segments per RQ WQE. */
 #define MLX5_MAX_LOG_RQ_SEGS 5u
 
+/* The alignment needed for WQ buffer. */
+#define MLX5_WQE_BUF_ALIGNMENT 512
+
 /* Completion mode. */
 enum mlx5_completion_mode {
 	MLX5_COMP_ONLY_ERR = 0x0,
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index ad5b0a9..e96bb1e 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1126,7 +1126,7 @@
 	/* Calculate and allocate WQ memory space. */
 	wqe_size = 1 << log_wqe_size; /* round up power of two.*/
 	wq_size = wqe_n * wqe_size;
-	buf = rte_calloc_socket(__func__, 1, wq_size, RTE_CACHE_LINE_SIZE,
+	buf = rte_calloc_socket(__func__, 1, wq_size, MLX5_WQE_BUF_ALIGNMENT,
 				rxq_ctrl->socket);
 	if (!buf)
 		return NULL;
-- 
1.8.3.1


  parent reply	other threads:[~2019-07-29 12:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 11:53 [dpdk-dev] [PATCH 00/11] net/mlx5: LRO fixes and enhancements Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 01/11] net/mlx5: fix Rx scatter mode validation Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 02/11] net/mlx5: limit LRO size to the maximum Rx packet Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 03/11] net/mlx5: remove redundant offload flag reset Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 04/11] net/mlx5: support mbuf headroom for LRO packet Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 05/11] net/mlx5: fix DevX scattered Rx queue size Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 06/11] net/mlx5: fix DevX Rx queue type Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 07/11] net/mlx5: allow LRO in regular Rx queue Matan Azrad
2019-07-29 11:53 ` Matan Azrad [this message]
2019-07-29 11:53 ` [dpdk-dev] [PATCH 09/11] net/mlx5: handle LRO packets " Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 10/11] net/mlx5: allow implicit LRO flow Matan Azrad
2019-07-29 11:53 ` [dpdk-dev] [PATCH 11/11] net/mlx5: allow LRO per Rx queue Matan Azrad
2019-07-29 12:32 ` [dpdk-dev] [PATCH 00/11] net/mlx5: LRO fixes and enhancements Slava Ovsiienko
2019-07-29 14:37 ` Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564401209-18752-9-git-send-email-matan@mellanox.com \
    --to=matan@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).