On Thu, Apr 03, 2025 at 04:54:28PM +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.w...@intel.com>
> ---
>  drivers/net/intel/common/tx.h                 | 18 ++++++
>  drivers/net/intel/cpfl/cpfl_ethdev.c          |  3 +-
>  drivers/net/intel/cpfl/cpfl_ethdev.h          |  2 +-
>  drivers/net/intel/cpfl/cpfl_rxtx.c            | 24 ++++----
>  drivers/net/intel/cpfl/cpfl_rxtx.h            |  3 +-
>  drivers/net/intel/cpfl/cpfl_rxtx_vec_common.h |  2 +-
>  drivers/net/intel/idpf/idpf_common_rxtx.c     | 20 +++----
>  drivers/net/intel/idpf/idpf_common_rxtx.h     | 57 +++----------------
>  .../net/intel/idpf/idpf_common_rxtx_avx2.c    | 10 ++--
>  .../net/intel/idpf/idpf_common_rxtx_avx512.c  | 20 +++----
>  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          |  2 +-
>  drivers/net/intel/idpf/idpf_rxtx.c            | 21 ++++---
>  drivers/net/intel/idpf/idpf_rxtx_vec_common.h |  4 +-
>  15 files changed, 83 insertions(+), 107 deletions(-)
> 
> diff --git a/drivers/net/intel/common/tx.h b/drivers/net/intel/common/tx.h
> index d9cf4474fc..9694b0fc06 100644
> --- a/drivers/net/intel/common/tx.h
> +++ b/drivers/net/intel/common/tx.h
> @@ -35,6 +35,7 @@ struct ci_tx_queue {
>               volatile struct i40e_tx_desc *i40e_tx_ring;
>               volatile struct iavf_tx_desc *iavf_tx_ring;
>               volatile struct ice_tx_desc *ice_tx_ring;
> +             volatile struct idpf_base_tx_desc *idpf_tx_ring;
>               volatile union ixgbe_adv_tx_desc *ixgbe_tx_ring;
>       };
>       volatile uint8_t *qtx_tail;               /* register address of tail */
> @@ -98,6 +99,23 @@ struct ci_tx_queue {
>                       uint8_t wthresh;   /**< Write-back threshold reg. */
>                       uint8_t using_ipsec;  /**< indicates that IPsec TX 
> feature is in use */
>               };
> +             struct { /* idpf specific values */
> +                     volatile union {
> +                             struct idpf_flex_tx_sched_desc *desc_ring;
> +                             struct idpf_splitq_tx_compl_desc *compl_ring;
> +                     };
> +                     const struct idpf_txq_ops *idpf_ops;
> +                     struct ci_tx_queue *complq;
> +                     void **txqs;   /*only valid for split queue mode*/
> +                     bool q_started;   /* if tx queue has been started */
> +                     /* only valid for split queue mode */
> +                     uint32_t tx_start_qid;
> +                     uint16_t sw_nb_desc;
> +                     uint16_t sw_tail;
> +#define IDPF_TX_CTYPE_NUM    8
> +                     uint16_t ctype[IDPF_TX_CTYPE_NUM];
> +                     uint8_t expected_gen_id;
> +             };
>       };
>  };

While I think we can do some work in terms of shrinking down this queue
structure, its not a massive problem I think right now. It can be solved
separate from this patch.

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

Reply via email to