From: Ed Czeck <ed.czeck@atomicrules.com>
To: ferruh.yigit@amd.com, dev@dpdk.org
Cc: Shepard Siegel <shepard.siegel@atomicrules.com>,
John Miller <john.miller@atomicrules.com>
Subject: [PATCH v2 3/3] net/ark: support for large dataroom in FPGA
Date: Tue, 10 Oct 2023 16:42:07 -0400 [thread overview]
Message-ID: <20231010204207.1027430-3-ed.czeck@atomicrules.com> (raw)
In-Reply-To: <20231010204207.1027430-1-ed.czeck@atomicrules.com>
Allow for non-standard dataroom sizes for upstream data
motion when using a custom mbuf pool.
- New firmware version for UDM (Upstream Data Mover)
- New layout on ark_rx_meta data
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
doc/guides/nics/ark.rst | 1 +
drivers/net/ark/ark_ethdev_rx.c | 8 ++++++++
drivers/net/ark/ark_ext.h | 9 +++++++++
drivers/net/ark/ark_udm.h | 5 +++--
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index e1683cf782..bcc9f505df 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -334,6 +334,7 @@ with Arkville releases 21.05, 21.08 and 21.11. LTS versions of DPDK remain
compatible with the corresponding Arkville version. If other combinations
are required, please contact Atomic Rules support.
+* DPDK 23.11 requires Arkville 23.11.
* DPDK 22.07 requires Arkville 22.07.
* DPDK 22.03 requires Arkville 22.03.
* DPDK 21.05 requires Arkville 21.05.
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 38bc69dff4..24f1c65690 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -9,6 +9,7 @@
#include "ark_logs.h"
#include "ark_mpu.h"
#include "ark_udm.h"
+#include "ark_ext.h"
#define ARK_RX_META_SIZE 32
#define ARK_RX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_RX_META_SIZE)
@@ -166,6 +167,13 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
queue->mb_pool = mb_pool;
queue->dataroom = rte_pktmbuf_data_room_size(mb_pool) -
RTE_PKTMBUF_HEADROOM;
+
+ /* Check pool's private data to confirm pool structure */
+ if (mb_pool->private_data_size != 0) {
+ struct rte_pmd_ark_lmbuf_mempool_priv *pool_priv = rte_mempool_get_priv(mb_pool);
+ if (strncmp(pool_priv->cookie, ARK_MEMPOOL_COOKIE, sizeof(pool_priv->cookie)) == 0)
+ queue->dataroom = pool_priv->dataroom;
+ }
queue->headroom = RTE_PKTMBUF_HEADROOM;
queue->phys_qid = qidx;
queue->queue_index = queue_idx;
diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h
index d235d0ff85..6d37449195 100644
--- a/drivers/net/ark/ark_ext.h
+++ b/drivers/net/ark/ark_ext.h
@@ -5,6 +5,7 @@
#ifndef _ARK_EXT_H_
#define _ARK_EXT_H_
+#include <rte_mbuf.h>
#include <ethdev_driver.h>
/* The following section lists function prototypes for Arkville's
@@ -16,6 +17,14 @@
* See documentation for compiling and use of extensions.
*/
+/* private data optionally attached to mempool for rx */
+struct rte_pmd_ark_lmbuf_mempool_priv {
+ struct rte_pktmbuf_pool_private pool_private;
+ char cookie[4];
+ uint32_t dataroom;
+};
+#define ARK_MEMPOOL_COOKIE "ARK1"
+
/**
* Extension prototype, required implementation if extensions are used.
* Called during device probe to initialize the user structure
diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h
index f0685c95c7..ec53ec7e79 100644
--- a/drivers/net/ark/ark_udm.h
+++ b/drivers/net/ark/ark_udm.h
@@ -20,7 +20,8 @@
*/
struct ark_rx_meta {
uint32_t user_meta[5]; /* user defined based on fpga code */
- uint8_t reserved[10];
+ uint32_t pkt_len32;
+ uint8_t reserved[6];
uint16_t pkt_len;
} __rte_packed;
@@ -33,7 +34,7 @@ struct ark_rx_meta {
#define ARK_RX_WRITE_TIME_NS 2500
#define ARK_UDM_SETUP 0
#define ARK_UDM_MODID 0x4d445500
-#define ARK_UDM_MODVER 0x37313232
+#define ARK_UDM_MODVER 0x37333332
struct ark_udm_setup_t {
union {
--
2.34.1
next prev parent reply other threads:[~2023-10-10 20:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 20:52 [PATCH 1/3] net/ark: support for single function with multiple port Ed Czeck
2023-10-05 20:52 ` [PATCH 2/3] net/ark: remove RQ pacing firmware from PMD Ed Czeck
2023-10-10 13:51 ` Ferruh Yigit
2023-10-10 14:50 ` Ed Czeck
2023-10-10 16:08 ` [PATCH v2 " Ed Czeck
2023-10-10 16:37 ` Ferruh Yigit
2023-10-05 20:52 ` [PATCH 3/3] net/ark: support for large dataroom in FPGA Ed Czeck
2023-10-10 20:42 ` [PATCH v2 1/3] net/ark: support for single function with multiple port Ed Czeck
2023-10-10 20:42 ` [PATCH v2 2/3] net/ark: remove RQ pacing firmware from PMD Ed Czeck
2023-10-10 20:42 ` Ed Czeck [this message]
2023-10-11 11:28 ` [PATCH v2 1/3] net/ark: support for single function with multiple port Ferruh Yigit
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=20231010204207.1027430-3-ed.czeck@atomicrules.com \
--to=ed.czeck@atomicrules.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=john.miller@atomicrules.com \
--cc=shepard.siegel@atomicrules.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).