From: Bruce Richardson <bruce.richardson@intel.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: <dev@dpdk.org>, Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: Re: [PATCH v4 15/25] net/ixgbe: create common Rx queue structure
Date: Tue, 3 Jun 2025 17:45:36 +0100 [thread overview]
Message-ID: <aD8msCzHfruQYhC4@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <dcde3665a06b052fef2c722e8c940bf41ab73e4f.1748612803.git.anatoly.burakov@intel.com>
On Fri, May 30, 2025 at 02:57:11PM +0100, Anatoly Burakov wrote:
> In preparation for deduplication effort, generalize the Rx queue structure.
>
> The entire Rx queue structure is moved to common/rx.h, clarifying the
> comments where necessary, and separating common parts from ixgbe-specific
> parts.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
One minor nit inline below.
>
> Notes:
> v3 -> v4:
> - Separate out some of the changes from this commit into previous commits
> - Rename CI_RX_BURST to CI_RX_MAX_BURST to match the driver naming convention
>
> drivers/net/intel/common/rx.h | 67 ++++++++++-
> drivers/net/intel/ixgbe/ixgbe_ethdev.c | 8 +-
> .../ixgbe/ixgbe_recycle_mbufs_vec_common.c | 6 +-
> drivers/net/intel/ixgbe/ixgbe_rxtx.c | 110 +++++++++---------
> drivers/net/intel/ixgbe/ixgbe_rxtx.h | 65 +----------
> .../net/intel/ixgbe/ixgbe_rxtx_vec_common.h | 4 +-
> drivers/net/intel/ixgbe/ixgbe_rxtx_vec_neon.c | 18 +--
> drivers/net/intel/ixgbe/ixgbe_rxtx_vec_sse.c | 18 +--
> 8 files changed, 150 insertions(+), 146 deletions(-)
>
> diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
> index abb01ba5e7..80a9f21303 100644
> --- a/drivers/net/intel/common/rx.h
> +++ b/drivers/net/intel/common/rx.h
> @@ -10,14 +10,75 @@
> #include <rte_mbuf.h>
> #include <rte_ethdev.h>
>
> -#define CI_RX_BURST 32
> +#define CI_RX_MAX_BURST 32
> +
> +struct ci_rx_queue;
> +
> +struct ci_rx_entry {
> + struct rte_mbuf *mbuf; /* mbuf associated with RX descriptor. */
> +};
> +
> +struct ci_rx_entry_sc {
> + struct rte_mbuf *fbuf; /* First segment of the fragmented packet.*/
> +};
> +
> +/**
> + * Structure associated with each RX queue.
> + */
> +struct ci_rx_queue {
> + struct rte_mempool *mp; /**< mbuf pool to populate RX ring. */
> + union { /* RX ring virtual address */
> + volatile union ixgbe_adv_rx_desc *ixgbe_rx_ring;
> + };
> + volatile uint8_t *qrx_tail; /**< register address of tail */
> + struct ci_rx_entry *sw_ring; /**< address of RX software ring. */
> + struct ci_rx_entry_sc *sw_sc_ring; /**< address of scattered Rx software ring. */
> + rte_iova_t rx_ring_phys_addr; /**< RX ring DMA address. */
> + struct rte_mbuf *pkt_first_seg; /**< First segment of current packet. */
> + struct rte_mbuf *pkt_last_seg; /**< Last segment of current packet. */
> + /** hold packets to return to application */
> + struct rte_mbuf *rx_stage[CI_RX_MAX_BURST * 2];
> + uint16_t nb_rx_desc; /**< number of RX descriptors. */
> + uint16_t rx_tail; /**< current value of tail register. */
> + uint16_t rx_nb_avail; /**< nr of staged pkts ready to ret to app */
> + uint16_t nb_rx_hold; /**< number of held free RX desc. */
> + uint16_t rx_next_avail; /**< idx of next staged pkt to ret to app */
> + uint16_t rx_free_thresh; /**< max free RX desc to hold. */
> + uint16_t rx_free_trigger; /**< triggers rx buffer allocation */
> + uint16_t rxrearm_nb; /**< number of remaining to be re-armed */
> + uint16_t rxrearm_start; /**< the idx we start the re-arming from */
> + uint16_t queue_id; /**< RX queue index. */
> + uint16_t port_id; /**< Device port identifier. */
> + uint16_t reg_idx; /**< RX queue register index. */
> + uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise. */
> + bool rx_deferred_start; /**< queue is not started on dev start. */
> + bool vector_rx; /**< indicates that vector RX is in use */
> + bool drop_en; /**< if 1, drop packets if no descriptors are available. */
> + uint64_t mbuf_initializer; /**< value to init mbufs */
> + uint64_t offloads; /**< Rx offloads with RTE_ETH_RX_OFFLOAD_* */
> + /** need to alloc dummy mbuf, for wraparound when scanning hw ring */
> + struct rte_mbuf fake_mbuf;
> + const struct rte_memzone *mz;
> + union {
> + struct { /* ixgbe specific values */
> + /** indicates that IPsec RX feature is in use */
> + uint8_t using_ipsec;
> + /** Packet type mask for different NICs. */
> + uint16_t pkt_type_mask;
> + /** UDP frames with a 0 checksum can be marked as checksum errors. */
> + uint8_t rx_udp_csum_zero_err;
> + /** flags to set in mbuf when a vlan is detected. */
> + uint64_t vlan_flags;
These ixgbe fields should probably be sorted by size.
> + };
> + };
> +};
<snip>
next prev parent reply other threads:[~2025-06-03 16:46 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 13:27 [PATCH v1 01/13] net/ixgbe: remove unused field in Rx queue struct Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 02/13] net/iavf: make IPsec stats dynamically allocated Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 03/13] net/ixgbe: create common Rx queue structure Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 04/13] net/i40e: use the " Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 05/13] net/ice: " Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 06/13] net/iavf: " Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 07/13] net/intel: generalize vectorized Rx rearm Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 08/13] net/i40e: use common Rx rearm code Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 09/13] net/iavf: " Anatoly Burakov
2025-05-06 13:27 ` [PATCH v1 10/13] net/ixgbe: " Anatoly Burakov
2025-05-06 13:28 ` [PATCH v1 11/13] net/intel: support wider x86 vectors for Rx rearm Anatoly Burakov
2025-05-06 13:28 ` [PATCH v1 12/13] net/intel: add common Rx mbuf recycle Anatoly Burakov
2025-05-06 13:28 ` [PATCH v1 13/13] net/intel: add common Tx " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 01/13] net/ixgbe: remove unused field in Rx queue struct Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 02/13] net/iavf: make IPsec stats dynamically allocated Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 03/13] net/ixgbe: create common Rx queue structure Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 04/13] net/i40e: use the " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 05/13] net/ice: " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 06/13] net/iavf: " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 07/13] net/intel: generalize vectorized Rx rearm Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 08/13] net/i40e: use common Rx rearm code Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 09/13] net/iavf: " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 10/13] net/ixgbe: " Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 11/13] net/intel: support wider x86 vectors for Rx rearm Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 12/13] net/intel: add common Rx mbuf recycle Anatoly Burakov
2025-05-12 10:58 ` [PATCH v2 13/13] net/intel: add common Tx " Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 01/13] net/ixgbe: remove unused field in Rx queue struct Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 02/13] net/iavf: make IPsec stats dynamically allocated Anatoly Burakov
2025-05-14 16:39 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 03/13] net/ixgbe: create common Rx queue structure Anatoly Burakov
2025-05-14 16:45 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 04/13] net/i40e: use the " Anatoly Burakov
2025-05-14 16:52 ` Bruce Richardson
2025-05-15 11:09 ` Burakov, Anatoly
2025-05-15 12:55 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 05/13] net/ice: " Anatoly Burakov
2025-05-14 16:56 ` Bruce Richardson
2025-05-23 11:16 ` Burakov, Anatoly
2025-05-12 12:54 ` [PATCH v3 06/13] net/iavf: " Anatoly Burakov
2025-05-15 10:59 ` Bruce Richardson
2025-05-15 11:11 ` Burakov, Anatoly
2025-05-15 12:57 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 07/13] net/intel: generalize vectorized Rx rearm Anatoly Burakov
2025-05-15 10:56 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 08/13] net/i40e: use common Rx rearm code Anatoly Burakov
2025-05-15 10:58 ` Bruce Richardson
2025-05-12 12:54 ` [PATCH v3 09/13] net/iavf: " Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 10/13] net/ixgbe: " Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 11/13] net/intel: support wider x86 vectors for Rx rearm Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 12/13] net/intel: add common Rx mbuf recycle Anatoly Burakov
2025-05-12 12:54 ` [PATCH v3 13/13] net/intel: add common Tx " Anatoly Burakov
2025-05-15 11:07 ` Bruce Richardson
2025-05-12 12:58 ` [PATCH v3 01/13] net/ixgbe: remove unused field in Rx queue struct Bruce Richardson
2025-05-14 16:32 ` Bruce Richardson
2025-05-15 11:15 ` Burakov, Anatoly
2025-05-15 12:58 ` Bruce Richardson
2025-05-30 13:56 ` [PATCH v4 00/25] Intel PMD drivers Rx cleanp Anatoly Burakov
2025-05-30 13:56 ` [PATCH v4 01/25] net/ixgbe: remove unused field in Rx queue struct Anatoly Burakov
2025-05-30 13:56 ` [PATCH v4 02/25] net/iavf: make IPsec stats dynamically allocated Anatoly Burakov
2025-05-30 13:56 ` [PATCH v4 03/25] net/ixgbe: match variable names to other drivers Anatoly Burakov
2025-06-03 15:54 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 04/25] net/i40e: match variable name " Anatoly Burakov
2025-06-03 15:56 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 05/25] net/ice: " Anatoly Burakov
2025-06-03 15:57 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 06/25] net/i40e: rename 16-byte descriptor define Anatoly Burakov
2025-06-03 15:58 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 07/25] net/ice: " Anatoly Burakov
2025-06-03 15:59 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 08/25] net/iavf: " Anatoly Burakov
2025-06-03 16:06 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 09/25] net/ixgbe: simplify vector PMD compilation Anatoly Burakov
2025-06-03 16:09 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 10/25] net/ixgbe: replace always-true check Anatoly Burakov
2025-06-03 16:15 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 11/25] net/ixgbe: clean up definitions Anatoly Burakov
2025-06-03 16:17 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 12/25] net/i40e: " Anatoly Burakov
2025-06-03 16:19 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 13/25] net/ice: " Anatoly Burakov
2025-06-03 16:20 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 14/25] net/iavf: " Anatoly Burakov
2025-06-03 16:21 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 15/25] net/ixgbe: create common Rx queue structure Anatoly Burakov
2025-06-03 16:45 ` Bruce Richardson [this message]
2025-05-30 13:57 ` [PATCH v4 16/25] net/i40e: use the " Anatoly Burakov
2025-06-03 16:57 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 17/25] net/ice: " Anatoly Burakov
2025-06-03 17:02 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 18/25] net/iavf: " Anatoly Burakov
2025-06-03 17:05 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 19/25] net/intel: generalize vectorized Rx rearm Anatoly Burakov
2025-06-04 9:32 ` Bruce Richardson
2025-06-04 9:43 ` Morten Brørup
2025-06-04 9:49 ` Bruce Richardson
2025-06-04 10:18 ` Morten Brørup
2025-05-30 13:57 ` [PATCH v4 20/25] net/i40e: use common Rx rearm code Anatoly Burakov
2025-06-04 9:33 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 21/25] net/iavf: " Anatoly Burakov
2025-06-04 9:34 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 22/25] net/ixgbe: " Anatoly Burakov
2025-06-04 9:40 ` Bruce Richardson
2025-06-05 9:22 ` Burakov, Anatoly
2025-05-30 13:57 ` [PATCH v4 23/25] net/intel: support wider x86 vectors for Rx rearm Anatoly Burakov
2025-06-04 12:32 ` Bruce Richardson
2025-06-04 14:59 ` Bruce Richardson
2025-06-05 9:29 ` Burakov, Anatoly
2025-06-05 9:31 ` Bruce Richardson
2025-06-05 10:09 ` Morten Brørup
2025-05-30 13:57 ` [PATCH v4 24/25] net/intel: add common Rx mbuf recycle Anatoly Burakov
2025-06-04 15:09 ` Bruce Richardson
2025-05-30 13:57 ` [PATCH v4 25/25] net/intel: add common Tx " Anatoly Burakov
2025-06-04 15:18 ` Bruce Richardson
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=aD8msCzHfruQYhC4@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=vladimir.medvedkin@intel.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).