[dpdk-dev] [PATCH 1/3] net/ixgbe: remove dependence on Tx queue flags

Zhang, Qi Z qi.z.zhang at intel.com
Thu May 3 03:49:08 CEST 2018


Hi Konstantin:

> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Wednesday, May 2, 2018 7:23 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>
> Cc: Dai, Wei <wei.dai at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>;
> Wang, Xiao W <xiao.w.wang at intel.com>; dev at dpdk.org
> Subject: RE: [PATCH 1/3] net/ixgbe: remove dependence on Tx queue flags
> 
> 
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Wednesday, May 2, 2018 4:16 AM
> > To: Yigit, Ferruh <ferruh.yigit at intel.com>
> > Cc: Dai, Wei <wei.dai at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>;
> > Ananyev, Konstantin <konstantin.ananyev at intel.com>; Wang, Xiao W
> > <xiao.w.wang at intel.com>; dev at dpdk.org; Zhang, Qi Z
> > <qi.z.zhang at intel.com>
> > Subject: [PATCH 1/3] net/ixgbe: remove dependence on Tx queue flags
> >
> > Since we move to new offload APIs, txq_flags is no long needed.
> > This patch remove the dependence on that.
> >
> > Fixes: 51215925a32f ("net/ixgbe: convert to new Tx offloads API")
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 6 ------
> >  drivers/net/ixgbe/ixgbe_rxtx.c   | 2 --
> >  drivers/net/ixgbe/ixgbe_rxtx.h   | 1 -
> >  3 files changed, 9 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index 6088c7e48..709251fbb 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -3727,9 +3727,6 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev,
> struct rte_eth_dev_info *dev_info)
> >  		},
> >  		.tx_free_thresh = IXGBE_DEFAULT_TX_FREE_THRESH,
> >  		.tx_rs_thresh = IXGBE_DEFAULT_TX_RSBIT_THRESH,
> > -		.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
> > -			     ETH_TXQ_FLAGS_NOOFFLOADS |
> > -			     ETH_TXQ_FLAGS_IGNORE,
> >  		.offloads = 0,
> >  	};
> 
> 
> But old apps still use txq_flags returned by dev_info_get.
> Removing it right now will mean this value will be undefined.

My understanding is PMD should not be aware of txq_flags anymore.
and ethdev layer is the place to responsible for the conversion if we think it still necessary to support txq_flags for old applicaiton

But I got your point, there is something missing if we only have the PMD patch, so I'd like to hold this until ethdev layer is ready and I think this will not block
https://dpdk.org/ml/archives/dev/2018-May/099864.html since txq_flags is not be involved to any decision already.

Regards
Qi

> 
> >
> > @@ -3835,9 +3832,6 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
> >  		},
> >  		.tx_free_thresh = IXGBE_DEFAULT_TX_FREE_THRESH,
> >  		.tx_rs_thresh = IXGBE_DEFAULT_TX_RSBIT_THRESH,
> > -		.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
> > -			     ETH_TXQ_FLAGS_NOOFFLOADS |
> > -			     ETH_TXQ_FLAGS_IGNORE,
> >  		.offloads = 0,
> >  	};
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> > b/drivers/net/ixgbe/ixgbe_rxtx.c index 2892436e9..47045ddd0 100644
> > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > @@ -2620,7 +2620,6 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev
> *dev,
> >  	txq->reg_idx = (uint16_t)((RTE_ETH_DEV_SRIOV(dev).active == 0) ?
> >  		queue_idx : RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx +
> queue_idx);
> >  	txq->port_id = dev->data->port_id;
> > -	txq->txq_flags = tx_conf->txq_flags;
> >  	txq->offloads = tx_conf->offloads;
> >  	txq->ops = &def_txq_ops;
> >  	txq->tx_deferred_start = tx_conf->tx_deferred_start; @@ -5441,7
> > +5440,6 @@ ixgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t
> > queue_id,
> >
> >  	qinfo->conf.tx_free_thresh = txq->tx_free_thresh;
> >  	qinfo->conf.tx_rs_thresh = txq->tx_rs_thresh;
> > -	qinfo->conf.txq_flags = txq->txq_flags;
> 
> 
> Same here - old apps can still use it.
> Ideally we'll have to fill it based on txq->offloads value.
> Konstantin
> 
> >  	qinfo->conf.offloads = txq->offloads;
> >  	qinfo->conf.tx_deferred_start = txq->tx_deferred_start;  } diff
> > --git a/drivers/net/ixgbe/ixgbe_rxtx.h
> > b/drivers/net/ixgbe/ixgbe_rxtx.h index 7dbbbe5b3..20ef7b6ff 100644
> > --- a/drivers/net/ixgbe/ixgbe_rxtx.h
> > +++ b/drivers/net/ixgbe/ixgbe_rxtx.h
> > @@ -222,7 +222,6 @@ struct ixgbe_tx_queue {
> >  	uint8_t             pthresh;       /**< Prefetch threshold register.
> */
> >  	uint8_t             hthresh;       /**< Host threshold register. */
> >  	uint8_t             wthresh;       /**< Write-back threshold reg.
> */
> > -	uint32_t txq_flags; /**< Holds flags for this TXq */
> >  	uint64_t offloads; /**< Tx offload flags of DEV_TX_OFFLOAD_* */
> >  	uint32_t            ctx_curr;      /**< Hardware context states. */
> >  	/** Hardware context0 history. */
> > --
> > 2.13.6



More information about the dev mailing list