From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4E02A034F; Mon, 29 Mar 2021 10:18:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C22E40689; Mon, 29 Mar 2021 10:18:23 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 7F7B140151 for ; Mon, 29 Mar 2021 10:18:21 +0200 (CEST) IronPort-SDR: Bk934OxuW5HWeggc4CW9214rV7pPDloREcycWarV2EDuCwM9KLwEUOYRNG1cdQu1N2Vvi2+G6w woX6dAXvVALA== X-IronPort-AV: E=McAfee;i="6000,8403,9937"; a="179047040" X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="179047040" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 01:18:19 -0700 IronPort-SDR: 03r5dY/Qv19Ta950+m+0667Ib2fd5d/X1YGeIIf/2KrOJWaTVglkG42FmasgvUHnGdWaX0cJr/ hTOCU2vkfRPA== X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="454461582" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 01:18:16 -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:10:48 +0000 Message-Id: <20210329081048.32676-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] 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 --- 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..6aebf9c11e 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 configuration", + 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."); -- 2.17.1