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 D57AFA0588 for ; Wed, 1 Apr 2020 08:45:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B18441BEC3; Wed, 1 Apr 2020 08:45:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id F13CA1BE98; Wed, 1 Apr 2020 08:45:27 +0200 (CEST) IronPort-SDR: 6LsAQ+UV9VsW9F9S9XQl2nFbohp2QvckRHSTOH4xz9diKBpAqykQbVLX07U9X1WUSJKwHt4bl+ LjLmN9SmWjfA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 23:45:26 -0700 IronPort-SDR: o/Kq1UuDYCDQ/DA/BcIi5J6/wuhJpWPTFw+wH6s+erRPc+BMXb7+T9FdI/jfgbbBtgSo2u8KGb OMPmDoYOqu9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,330,1580803200"; d="scan'208";a="267552554" Received: from intel.sh.intel.com ([10.239.255.136]) by orsmga002.jf.intel.com with ESMTP; 31 Mar 2020 23:45:25 -0700 From: Junyu Jiang To: dev@dpdk.org Cc: Qi Zhang , Qiming Yang , Junyu Jiang , stable@dpdk.org Date: Wed, 1 Apr 2020 06:29:49 +0000 Message-Id: <20200401062949.19408-1-junyux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200319074825.16035-1-junyux.jiang@intel.com> References: <20200319074825.16035-1-junyux.jiang@intel.com> Subject: [dpdk-stable] [PATCH v3] net/ice: fix RSS advanced rule invalid issue 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" This patch moved the ice_init_rss into ice_dev_configure to fix RSS advanced rule invalid after running port stop and port start. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Cc: stable@dpdk.org Signed-off-by: Junyu Jiang --- drivers/net/ice/ice_ethdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 85ef83e92..1d94d2a41 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -155,6 +155,7 @@ static int ice_dev_udp_tunnel_port_add(struct rte_eth_dev *dev, struct rte_eth_udp_tunnel *udp_tunnel); static int ice_dev_udp_tunnel_port_del(struct rte_eth_dev *dev, struct rte_eth_udp_tunnel *udp_tunnel); +static int ice_init_rss(struct ice_pf *pf); static const struct rte_pci_id pci_id_ice_map[] = { { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_BACKPLANE) }, @@ -2451,6 +2452,8 @@ ice_dev_configure(struct rte_eth_dev *dev) { struct ice_adapter *ad = ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); + int ret; /* Initialize to TRUE. If any of Rx queues doesn't meet the * bulk allocation or vector Rx preconditions we will reset it. @@ -2461,6 +2464,10 @@ ice_dev_configure(struct rte_eth_dev *dev) if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + ret = ice_init_rss(pf); + if (ret) + PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); + return 0; } @@ -2797,12 +2804,6 @@ ice_dev_start(struct rte_eth_dev *dev) } } - ret = ice_init_rss(pf); - if (ret) { - PMD_DRV_LOG(ERR, "Failed to enable rss for PF"); - goto rx_err; - } - ice_set_rx_function(dev); ice_set_tx_function(dev); -- 2.17.1