Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A848AC433DB for ; Mon, 29 Mar 2021 08:36:35 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 37428619BC for ; Mon, 29 Mar 2021 08:36:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37428619BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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."); -- 2.17.1