On Thu, Mar 27, 2025 at 09:34:36PM +0530, Shaiq Wani wrote:
> Used the common Tx entry structure and common Tx mbuf ring replenish fn
> in place of idpf-specific structure and function.
> The vector driver code paths (AVX2, AVX512) use the smaller SW
> ring structure.
> 
> Signed-off-by: Shaiq Wani <shaiq.w...@intel.com>
> ---

Acked-by: Bruce Richardson <bruce.richard...@intel.com>

Minor nit: I would suggest making this patch 2, rather than patch 3, which
would avoid the need for the typecasts in the patch to convert to the
common queue structure.


>  drivers/net/intel/idpf/idpf_common_rxtx.c     | 26 ++++++++---------
>  drivers/net/intel/idpf/idpf_common_rxtx.h     | 10 -------
>  .../net/intel/idpf/idpf_common_rxtx_avx2.c    | 23 +++++----------
>  .../net/intel/idpf/idpf_common_rxtx_avx512.c  | 28 ++++++-------------
>  drivers/net/intel/idpf/idpf_rxtx.c            |  2 +-
>  5 files changed, 30 insertions(+), 59 deletions(-)
> 
> diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c 
> b/drivers/net/intel/idpf/idpf_common_rxtx.c
> index 48fc3ef7ae..4318b3fb3c 100644
> --- a/drivers/net/intel/idpf/idpf_common_rxtx.c
> +++ b/drivers/net/intel/idpf/idpf_common_rxtx.c
> @@ -210,7 +210,7 @@ idpf_qc_single_rx_queue_reset(struct idpf_rx_queue *rxq)
>  void
>  idpf_qc_split_tx_descq_reset(struct ci_tx_queue *txq)
>  {
> -     struct idpf_tx_entry *txe;
> +     struct ci_tx_entry *txe;
>       uint32_t i, size;
>       uint16_t prev;
>  
> @@ -223,7 +223,7 @@ idpf_qc_split_tx_descq_reset(struct ci_tx_queue *txq)
>       for (i = 0; i < size; i++)
>               ((volatile char *)txq->desc_ring)[i] = 0;
>  
> -     txe = (struct idpf_tx_entry *)txq->sw_ring;
> +     txe = (struct ci_tx_entry *)txq->sw_ring;

No typecast is actually necessary here, since txq->sw_ring already of type
(struct ci_tx_entry). As I suggest above, if you switch the patch order,
you remove the need to have the (struct idpf_tx_entry *) cast at all - it
was just introduced in the previous patch in this set.

>       prev = (uint16_t)(txq->sw_nb_desc - 1);
>       for (i = 0; i < txq->sw_nb_desc; i++) {
>               txe[i].mbuf = NULL;

<snip>

Reply via email to