patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Junyu Jiang <junyux.jiang@intel.com>, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH 18.11] net/avf: fix RSS RETA settings invalid
Date: Wed, 14 Oct 2020 11:12:07 +0100	[thread overview]
Message-ID: <31e2817b-3eb7-55aa-5752-92aa9da93580@redhat.com> (raw)
In-Reply-To: <20201014083720.69817-1-junyux.jiang@intel.com>

On 14/10/2020 09:37, Junyu Jiang wrote:
> [ upstream commit 1feb8e3f4e5c69071e5c461132a8b1bad05609af ]
> 
> 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")
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> Acked-by: Qiming Yang <qiming.yang@intel.com>
> ---

Applied and removed from list of unresolved patches. Thanks.

>  drivers/net/avf/avf_ethdev.c | 76 ++++++++++++++++++------------------
>  1 file changed, 37 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
> index 13eec1b45..6033034b1 100644
> --- a/drivers/net/avf/avf_ethdev.c
> +++ b/drivers/net/avf/avf_ethdev.c
> @@ -120,36 +120,6 @@ static const struct eth_dev_ops avf_eth_dev_ops = {
>  	.rx_queue_intr_disable      = avf_dev_rx_queue_intr_disable,
>  };
>  
> -static int
> -avf_dev_configure(struct rte_eth_dev *dev)
> -{
> -	struct avf_adapter *ad =
> -		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> -	struct avf_info *vf =  AVF_DEV_PRIVATE_TO_VF(ad);
> -	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> -
> -	ad->rx_bulk_alloc_allowed = true;
> -#ifdef RTE_LIBRTE_AVF_INC_VECTOR
> -	/* 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;
> -#else
> -	ad->rx_vec_allowed = false;
> -	ad->tx_vec_allowed = false;
> -#endif
> -
> -	/* Vlan stripping setting */
> -	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
> -		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
> -			avf_enable_vlan_strip(ad);
> -		else
> -			avf_disable_vlan_strip(ad);
> -	}
> -	return 0;
> -}
> -
>  static int
>  avf_init_rss(struct avf_adapter *adapter)
>  {
> @@ -206,6 +176,43 @@ avf_init_rss(struct avf_adapter *adapter)
>  	return 0;
>  }
>  
> +static int
> +avf_dev_configure(struct rte_eth_dev *dev)
> +{
> +	struct avf_adapter *ad =
> +		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> +	struct avf_info *vf =  AVF_DEV_PRIVATE_TO_VF(ad);
> +	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> +
> +	ad->rx_bulk_alloc_allowed = true;
> +#ifdef RTE_LIBRTE_AVF_INC_VECTOR
> +	/* 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;
> +#else
> +	ad->rx_vec_allowed = false;
> +	ad->tx_vec_allowed = false;
> +#endif
> +
> +	/* Vlan stripping setting */
> +	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
> +		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
> +			avf_enable_vlan_strip(ad);
> +		else
> +			avf_disable_vlan_strip(ad);
> +	}
> +
> +	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
> +		if (avf_init_rss(ad) != 0) {
> +			PMD_DRV_LOG(ERR, "configure rss failed");
> +			return -1;
> +		}
> +	}
> +	return 0;
> +}
> +
>  static int
>  avf_init_rxq(struct rte_eth_dev *dev, struct avf_rx_queue *rxq)
>  {
> @@ -425,14 +432,6 @@ avf_dev_start(struct rte_eth_dev *dev)
>  		PMD_DRV_LOG(ERR, "failed to do Queue init");
>  		return -1;
>  	}
> -
> -	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
> -		if (avf_init_rss(adapter) != 0) {
> -			PMD_DRV_LOG(ERR, "configure rss failed");
> -			goto err_rss;
> -		}
> -	}
> -
>  	if (avf_configure_queues(adapter) != 0) {
>  		PMD_DRV_LOG(ERR, "configure queues failed");
>  		goto err_queue;
> @@ -461,7 +460,6 @@ avf_dev_start(struct rte_eth_dev *dev)
>  err_mac:
>  	avf_add_del_all_mac_addr(adapter, FALSE);
>  err_queue:
> -err_rss:
>  	return -1;
>  }
>  
> 


      reply	other threads:[~2020-10-14 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  8:37 Junyu Jiang
2020-10-14 10:12 ` Kevin Traynor [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=31e2817b-3eb7-55aa-5752-92aa9da93580@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=junyux.jiang@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).