DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>,
	"Jiang, JunyuX" <junyux.jiang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix RSS RETA settings invalid
Date: Wed, 1 Jul 2020 12:15:03 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E7061154849D27@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <BN6PR11MB001769CA65284B0AAA75BAF1E56C0@BN6PR11MB0017.namprd11.prod.outlook.com>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Yang, Qiming
> Sent: Wednesday, July 1, 2020 10:10 AM
> To: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix RSS RETA settings invalid
> 
> > -----Original Message-----
> > From: Jiang, JunyuX <junyux.jiang@intel.com>
> > Sent: Friday, June 19, 2020 15:44
> > To: dev@dpdk.org
> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Jiang,
> > JunyuX <junyux.jiang@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/iavf: fix RSS RETA settings invalid
> >
> > This patch moved the RSS initialization from dev start to dev
> > configure, to fix the issue that RSS redirection table can not be kept after
> restarting port.
> >
> > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> > ---
> >  drivers/net/iavf/iavf_ethdev.c | 71
> > +++++++++++++++++-----------------
> >  1 file changed, 35 insertions(+), 36 deletions(-)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index 2b1066b0a..5e79a2d03 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -136,34 +136,6 @@ static const struct eth_dev_ops
> iavf_eth_dev_ops
> > = {
> >  	.filter_ctrl                = iavf_dev_filter_ctrl,
> >  };
> >
> > -static int
> > -iavf_dev_configure(struct rte_eth_dev *dev) -{
> > -	struct iavf_adapter *ad =
> > -		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> > -	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(ad);
> > -	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> > -
> > -	ad->rx_bulk_alloc_allowed = true;
> > -	/* Initialize to TRUE. If any of Rx queues doesn't meet the
> > -	 * vector Rx/Tx preconditions, it will be reset.
> > -	 */
> > -	ad->rx_vec_allowed = true;
> > -	ad->tx_vec_allowed = true;
> > -
> > -	if (dev->data->dev_conf.rxmode.mq_mode &
> > ETH_MQ_RX_RSS_FLAG)
> > -		dev->data->dev_conf.rxmode.offloads |=
> > DEV_RX_OFFLOAD_RSS_HASH;
> > -
> > -	/* Vlan stripping setting */
> > -	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
> > -		if (dev_conf->rxmode.offloads &
> > DEV_RX_OFFLOAD_VLAN_STRIP)
> > -			iavf_enable_vlan_strip(ad);
> > -		else
> > -			iavf_disable_vlan_strip(ad);
> > -	}
> > -	return 0;
> > -}
> > -
> >  static int
> >  iavf_init_rss(struct iavf_adapter *adapter)  { @@ -220,6 +192,41 @@
> > iavf_init_rss(struct iavf_adapter *adapter)
> >  	return 0;
> >  }
> >
> > +static int
> > +iavf_dev_configure(struct rte_eth_dev *dev) {
> > +	struct iavf_adapter *ad =
> > +		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> > +	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(ad);
> > +	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> > +
> > +	ad->rx_bulk_alloc_allowed = true;
> > +	/* Initialize to TRUE. If any of Rx queues doesn't meet the
> > +	 * vector Rx/Tx preconditions, it will be reset.
> > +	 */
> > +	ad->rx_vec_allowed = true;
> > +	ad->tx_vec_allowed = true;
> > +
> > +	if (dev->data->dev_conf.rxmode.mq_mode &
> > ETH_MQ_RX_RSS_FLAG)
> > +		dev->data->dev_conf.rxmode.offloads |=
> > DEV_RX_OFFLOAD_RSS_HASH;
> > +
> > +	/* Vlan stripping setting */
> > +	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
> > +		if (dev_conf->rxmode.offloads &
> > DEV_RX_OFFLOAD_VLAN_STRIP)
> > +			iavf_enable_vlan_strip(ad);
> > +		else
> > +			iavf_disable_vlan_strip(ad);
> > +	}
> > +
> > +	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
> > +		if (iavf_init_rss(ad) != 0) {
> > +			PMD_DRV_LOG(ERR, "configure rss failed");
> > +			return -1;
> > +		}
> > +	}
> > +	return 0;
> > +}
> > +
> >  static int
> >  iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)  {
> > @@ -
> > 440,13 +447,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
> >  		return -1;
> >  	}
> >
> > -	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
> > -		if (iavf_init_rss(adapter) != 0) {
> > -			PMD_DRV_LOG(ERR, "configure rss failed");
> > -			goto err_rss;
> > -		}
> > -	}
> > -
> >  	if (iavf_configure_queues(adapter) != 0) {
> >  		PMD_DRV_LOG(ERR, "configure queues failed");
> >  		goto err_queue;
> > @@ -475,7 +475,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
> >  err_mac:
> >  	iavf_add_del_all_mac_addr(adapter, false);
> >  err_queue:
> > -err_rss:
> >  	return -1;
> >  }
> >
> > --
> > 2.17.1
> 
> Acked-by: Qiming Yang <qiming.yang@intel.com>

Applied dpdk-next-net-intel.

Thanks
Qi

      reply	other threads:[~2020-07-01 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19  7:44 Junyu Jiang
2020-07-01  2:10 ` Yang, Qiming
2020-07-01 12:15   ` Zhang, Qi Z [this message]

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=039ED4275CED7440929022BC67E7061154849D27@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=junyux.jiang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    /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).