From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2367FA04B7 for ; Wed, 14 Oct 2020 12:12:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E65B1DDCF; Wed, 14 Oct 2020 12:12:38 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 076C71DDCF for ; Wed, 14 Oct 2020 12:12:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602670354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DGaIoCehXC5DX6szR6y3CSP94GiTIMB0sGFy/9MV4sM=; b=Nemg1HTFIdkO6vr9cd5VkiE9oXS/rsmqkuWlzjwg1FOxh7NsJ3cI/M4qQgt2ZmLzLNSLVt Swi9T1IJP8ou8kBr1YZZOb9z2NZmL112xVRxcZCd4rnYsGNjh6ZTg1zYVaJ9aGbWVgWccF 0B6B8puXjZIbC72dXsycRn8ogwTB0Rc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-xiUuuUsMP8arm82AFFpdkQ-1; Wed, 14 Oct 2020 06:12:29 -0400 X-MC-Unique: xiUuuUsMP8arm82AFFpdkQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CDD78AB3B6; Wed, 14 Oct 2020 10:12:10 +0000 (UTC) Received: from [10.33.36.94] (unknown [10.33.36.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 201FB50B44; Wed, 14 Oct 2020 10:12:08 +0000 (UTC) To: Junyu Jiang , stable@dpdk.org References: <20201014083720.69817-1-junyux.jiang@intel.com> From: Kevin Traynor Message-ID: <31e2817b-3eb7-55aa-5752-92aa9da93580@redhat.com> Date: Wed, 14 Oct 2020 11:12:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201014083720.69817-1-junyux.jiang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [PATCH 18.11] net/avf: fix RSS RETA settings invalid X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 > Acked-by: Qiming Yang > --- 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; > } > >