From patchwork Mon Mar 29 07:19:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Murphy Yang X-Patchwork-Id: 90001 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 6B12EA034F; Mon, 29 Mar 2021 09:27:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27A1040151; Mon, 29 Mar 2021 09:27:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 11CF540042 for ; Mon, 29 Mar 2021 09:27:55 +0200 (CEST) IronPort-SDR: gw4kaJfxtP9kEuyKhaWtCL5IJClDmxRklO1/ibXPRNMake/EkdA2Ry9QSVr+XQOMiMdnH7Sm4M wCbDQHv0DQ2Q== X-IronPort-AV: E=McAfee;i="6000,8403,9937"; a="178625558" X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="178625558" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 00:27:54 -0700 IronPort-SDR: XzVTWBjMxDm+qoVday9a18Y8iGBUGg2DK/mc25gouHXK/l66e5zdrWGOuyTm0avyWW37mrgwXs YBs9XBcpF7kw== X-IronPort-AV: E=Sophos;i="5.81,287,1610438400"; d="scan'208";a="417544114" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2021 00:27:52 -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 07:19:57 +0000 Message-Id: <20210329071957.31321-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] 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 --- 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..41068fe646 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 -EBUSY; + } + if (!ixgbe_rss_update_sp(hw->mac.type)) { PMD_DRV_LOG(ERR, "RSS reta update is not supported on this " "NIC.");