From: Bruce Richardson <bruce.richardson@intel.com>
To: Shaiq Wani <shaiq.wani@intel.com>
Cc: <dev@dpdk.org>, <aman.deep.singh@intel.com>
Subject: Re: [PATCH v5 2/4] net/intel: use common Tx queue structure
Date: Fri, 28 Mar 2025 17:22:36 +0000 [thread overview]
Message-ID: <Z-ba3PJtd2aZYvD8@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250327160437.2296127-3-shaiq.wani@intel.com>
On Thu, Mar 27, 2025 at 09:34:35PM +0530, Shaiq Wani wrote:
> Merge in additional fields used by the idpf driver and then convert it
> over to using the common Tx queue structure
>
> Signed-off-by: Shaiq Wani <shaiq.wani@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Some comments inline below.
> ---
> drivers/net/intel/common/tx.h | 20 +++++++
> drivers/net/intel/cpfl/cpfl_ethdev.c | 3 +-
> drivers/net/intel/cpfl/cpfl_ethdev.h | 2 +-
> drivers/net/intel/cpfl/cpfl_rxtx.c | 26 ++++-----
> drivers/net/intel/cpfl/cpfl_rxtx.h | 3 +-
> drivers/net/intel/cpfl/cpfl_rxtx_vec_common.h | 3 +-
> drivers/net/intel/idpf/idpf_common_rxtx.c | 36 ++++++------
> drivers/net/intel/idpf/idpf_common_rxtx.h | 58 +++----------------
> .../net/intel/idpf/idpf_common_rxtx_avx2.c | 12 ++--
> .../net/intel/idpf/idpf_common_rxtx_avx512.c | 21 +++----
> drivers/net/intel/idpf/idpf_common_virtchnl.c | 2 +-
> drivers/net/intel/idpf/idpf_common_virtchnl.h | 2 +-
> drivers/net/intel/idpf/idpf_ethdev.c | 3 +-
> drivers/net/intel/idpf/idpf_rxtx.c | 21 ++++---
> drivers/net/intel/idpf/idpf_rxtx.h | 1 +
> drivers/net/intel/idpf/idpf_rxtx_vec_common.h | 5 +-
> 16 files changed, 101 insertions(+), 117 deletions(-)
>
<snip>
> static int
> -cpfl_tx_complq_setup(struct rte_eth_dev *dev, struct idpf_tx_queue *txq,
> +cpfl_tx_complq_setup(struct rte_eth_dev *dev, struct ci_tx_queue *txq,
> uint16_t queue_idx, uint16_t nb_desc,
> unsigned int socket_id)
> {
> struct cpfl_vport *cpfl_vport = dev->data->dev_private;
> struct idpf_vport *vport = &cpfl_vport->base;
> const struct rte_memzone *mz;
> - struct idpf_tx_queue *cq;
> + struct ci_tx_queue *cq;
> int ret;
>
> cq = rte_zmalloc_socket("cpfl splitq cq",
> - sizeof(struct idpf_tx_queue),
> + sizeof(struct ci_tx_queue),
Minor nit, but this would be more maintainable I think as "sizeof(*cq)" so
if you have to change the type of cq again in future, only on line needs to
change.
> RTE_CACHE_LINE_SIZE,
> socket_id);
> if (cq == NULL) {
> @@ -528,7 +528,7 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
> struct cpfl_tx_queue *cpfl_txq;
<snip>
> void
> -idpf_qc_split_tx_descq_reset(struct idpf_tx_queue *txq)
> +idpf_qc_split_tx_descq_reset(struct ci_tx_queue *txq)
> {
> struct idpf_tx_entry *txe;
> uint32_t i, size;
> @@ -223,7 +223,7 @@ idpf_qc_split_tx_descq_reset(struct idpf_tx_queue *txq)
> for (i = 0; i < size; i++)
> ((volatile char *)txq->desc_ring)[i] = 0;
>
> - txe = txq->sw_ring;
> + txe = (struct idpf_tx_entry *)txq->sw_ring;
As I comment on the next patch in the series, if you change the order of
these two patches, you won't need to introduce these new typecasts.
> prev = (uint16_t)(txq->sw_nb_desc - 1);
> for (i = 0; i < txq->sw_nb_desc; i++) {
> txe[i].mbuf = NULL;
> @@ -246,7 +246,7 @@ idpf_qc_split_tx_descq_reset(struct idpf_tx_queue *txq)
> }
<snip>
next prev parent reply other threads:[~2025-03-28 17:23 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 15:53 [PATCH] net/intel: using common functions in idpf driver Shaiq Wani
2025-03-12 16:38 ` Bruce Richardson
2025-03-24 12:39 ` [PATCH v2 0/4] Use common structures and fns in IDPF and Shaiq Wani
2025-03-24 12:39 ` [PATCH v2 1/4] net/intel: use common Tx queue structure Shaiq Wani
2025-03-24 12:49 ` [PATCH v3 0/4] using common functions in idpf driver Shaiq Wani
2025-03-24 12:49 ` [PATCH v3 1/4] net/intel: use common Tx queue structure Shaiq Wani
2025-03-27 10:44 ` [PATCH v4 0/4] net/intel: using common functions in idpf driver Shaiq Wani
2025-03-27 10:44 ` [PATCH v4 1/4] net/intel: align Tx queue struct field names Shaiq Wani
2025-03-27 16:04 ` [PATCH v5 0/4] net/intel: using common functions in idpf driver Shaiq Wani
2025-03-27 16:04 ` [PATCH v5 1/4] net/intel: align Tx queue struct field names Shaiq Wani
2025-03-28 16:57 ` Bruce Richardson
2025-03-27 16:04 ` [PATCH v5 2/4] net/intel: use common Tx queue structure Shaiq Wani
2025-03-28 17:22 ` Bruce Richardson [this message]
2025-03-28 17:55 ` Bruce Richardson
2025-03-27 16:04 ` [PATCH v5 3/4] net/intel: use common Tx entry structure Shaiq Wani
2025-03-28 17:17 ` Bruce Richardson
2025-03-27 16:04 ` [PATCH v5 4/4] net/idpf: use common Tx free fn in idpf Shaiq Wani
2025-03-28 17:25 ` Bruce Richardson
2025-03-28 15:29 ` [PATCH v5 0/4] net/intel: using common functions in idpf driver Bruce Richardson
2025-03-28 15:36 ` David Marchand
2025-03-28 17:58 ` Bruce Richardson
2025-03-27 10:45 ` [PATCH v4 2/4] net/intel: use common Tx queue structure Shaiq Wani
2025-03-27 10:45 ` [PATCH v4 3/4] net/intel: use common Tx entry structure Shaiq Wani
2025-03-27 10:45 ` [PATCH v4 4/4] net/idpf: use common Tx free fn in idpf Shaiq Wani
2025-03-24 12:49 ` [PATCH v3 2/4] net/intel: align Tx queue struct field names Shaiq Wani
2025-03-24 13:16 ` Bruce Richardson
2025-03-24 12:49 ` [PATCH v3 3/4] net/intel: use common Tx entry structure Shaiq Wani
2025-03-24 12:49 ` [PATCH v3 4/4] net/idpf: use common Tx free fn in idpf Shaiq Wani
2025-03-24 12:39 ` [PATCH v2 2/4] net/intel: align Tx queue struct field names Shaiq Wani
2025-03-24 12:40 ` [PATCH v2 3/4] net/intel: use common Tx entry structure Shaiq Wani
2025-03-24 12:40 ` [PATCH v2 4/4] net/idpf: use common Tx free fn in idpf Shaiq Wani
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=Z-ba3PJtd2aZYvD8@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=shaiq.wani@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).