From patchwork Mon Mar 29 08:28:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Murphy Yang X-Patchwork-Id: 90004 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B12BDA034F; Mon, 29 Mar 2021 10:36:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C8C6140DEA; Mon, 29 Mar 2021 10:36:34 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id CE6DA140DE7 for ; Mon, 29 Mar 2021 10:36:31 +0200 (CEST) IronPort-SDR: U/ya0JMsB0Y/lnRKQCEZEZIykKb8m8GEgthU1yDQzOFrwdhGDf37iskr2zblmUA86HZR0nt5Wv JT2ad55VNH0w== X-IronPort-AV: E=McAfee;i="6000,8403,9937"; a="178636026" X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="178636026" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 01:36:26 -0700 IronPort-SDR: 9kl3OgoQmkDTD0niZjU8qHohXeM4CP9llUTjg4axfGgdVCk32fMyU8YmsJtAg1SaPsGWkkkIm+ uVYEzmEhB9gw== X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="410974708" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 01:36:23 -0700 From: Murphy Yang To: dev@dpdk.org Cc: qiming.yang@intel.com, haiyue.wang@intel.com, jia.guo@intel.com, stevex.yang@intel.com, robinx.zhang@intel.com, Murphy Yang Date: Mon, 29 Mar 2021 08:28:45 +0000 Message-Id: <20210329082845.33038-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <0210329081048.32676-1-murphyx.yang@intel.com> References: <0210329081048.32676-1-murphyx.yang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3] net/ixgbe: fix RSS RETA be reset after port start X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If one calls ‘rte_eth_dev_rss_reta_update’ with ixgbe before starting the device (but after setting everything else), then RSS RETA configuration be zero after starting the device. This patch gives a notification if the port not started. Bugzilla ID: 664 Fixes: 249358424eab ("ixgbe: RSS RETA configuration") Signed-off-by: Murphy Yang Acked-by: Haiyue Wang --- v3: - modify the notify message v2: - tune the return value drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 8a9a21e7c2..d8ef618e5f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5015,11 +5015,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev, uint32_t reta, r; uint16_t idx, shift; struct ixgbe_adapter *adapter = dev->data->dev_private; + struct rte_eth_dev_data *dev_data = dev->data; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t reta_reg; PMD_INIT_FUNC_TRACE(); + if (!dev_data->dev_started) { + PMD_DRV_LOG(ERR, + "port %d must be started before rss reta update", + dev_data->port_id); + return -EIO; + } + if (!ixgbe_rss_update_sp(hw->mac.type)) { PMD_DRV_LOG(ERR, "RSS reta update is not supported on this " "NIC.");