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 EC8BAA0093 for ; Tue, 19 May 2020 15:08:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E2F3F1D69C; Tue, 19 May 2020 15:08:40 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id A32761D694 for ; Tue, 19 May 2020 15:08:39 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id k13so13754967wrx.3 for ; Tue, 19 May 2020 06:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D3lc+C+xolq6Daou6VfNDCrYgZODESSQZbe/PWmGGLw=; b=BGRr1X3h+uyP4WUhRI1N8mvaXnORDvEJP3yQr58mk/E55ekoQCqZdptIQW2aaiMISC r1ejeNapOUa69OVg9eJNOrU4RR6Aku8uaJaJ+CDX/wUVbJF4em6+xyqReiGVibSvpXVO 52g+p6MxawwjdYMhTdyegMGvsMYl0C+3fTPHR9xVrOZbnq8zMPOF6lxF/UZeJHTSCrZL lJZb8/p2pUCqSP7ONc+0y8fCim4iKQeg6JEjVO5cLdnQL7pOHOGb8a4urfwTnjzI87sQ iN/r0q0u8GcOjJ0Nb6kPtnvRNJrG0XNwI/fz4h3A2fAJT9ffM2sTxhAbUx1DC9XQFAOX gE6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D3lc+C+xolq6Daou6VfNDCrYgZODESSQZbe/PWmGGLw=; b=XCxgkzNhqbVzjOV+jfnTx0qt8e6xc5Uyx2o5jLE6aQWFBFaLFB8Djx9Ovea1oSRZss 9RhzvlCrqJ28u5tUiZLfKZCIZpZ3dTM7poiPhD0W1oZFWMs6sz025v25d3dRVZNyT9A6 WGoZ9K7OdDq0ea6WRaatit/8TNtEy8f4bJKGaD76d4sKyDIRWwAqTF0mrEPg8vMXgrIy iz2TESMaH/puoPqwGBr3FJ4q4eufYLcU4/JWhqDaUZhPy3MuhZmoT6XeZRl/RIJ/YEMD UZaIASWCMSHRfVuSiTW6Huoy9rKtf/EVTUHLD8gmQ6yYVsyR2ephJlCitwT65W9rKS9i BSQw== X-Gm-Message-State: AOAM530w9zqGHid00UQxpmelmYdXaAXXwsRsX95ZbJKtlIgwZBANIKkU dhwVpuEznDPVhWZ2FDxwKmE= X-Google-Smtp-Source: ABdhPJxkflqzn0y6YFnNYQh+s0mu0yJnQBnjwDrea1JEnrc2n9r0EnQB4vxEYIYDA+i+/lymdRPjcw== X-Received: by 2002:adf:f702:: with SMTP id r2mr26548065wrp.191.1589893719295; Tue, 19 May 2020 06:08:39 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p17sm3930292wmi.3.2020.05.19.06.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:08:38 -0700 (PDT) From: luca.boccassi@gmail.com To: Junyu Jiang Cc: Zhiwei He , Qiming Yang , dpdk stable Date: Tue, 19 May 2020 14:03:09 +0100 Message-Id: <20200519130549.112823-54-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice: fix RSS advanced rule' has been queued to stable release 19.11.3 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" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 5cfef294de7edb551232ef4fac533c6802d5acbe Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Tue, 7 Apr 2020 01:48:17 +0000 Subject: [PATCH] net/ice: fix RSS advanced rule [ upstream commit 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 ] This patch moved the RSS initialization from dev start to dev configure to fix RSS advanced rule invalid issue after running port stop and port start. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Signed-off-by: Junyu Jiang Tested-by: Zhiwei He Acked-by: Qiming Yang --- drivers/net/ice/ice_ethdev.c | 50 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 52cd20ed9e..ca4371ae3b 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2440,24 +2440,6 @@ ice_dev_uninit(struct rte_eth_dev *dev) return 0; } -static int -ice_dev_configure(struct rte_eth_dev *dev) -{ - struct ice_adapter *ad = - ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - - /* Initialize to TRUE. If any of Rx queues doesn't meet the - * bulk allocation or vector Rx preconditions we will reset it. - */ - ad->rx_bulk_alloc_allowed = true; - ad->tx_simple_allowed = true; - - if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) - dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; - - return 0; -} - static int ice_init_rss(struct ice_pf *pf) { struct ice_hw *hw = ICE_PF_TO_HW(pf); @@ -2588,6 +2570,32 @@ static int ice_init_rss(struct ice_pf *pf) return 0; } +static int +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. + */ + ad->rx_bulk_alloc_allowed = true; + ad->tx_simple_allowed = true; + + 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 ret; + } + + return 0; +} + static void __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, int base_queue, int nb_queue) @@ -2791,12 +2799,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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:46.710821877 +0100 +++ 0054-net-ice-fix-RSS-advanced-rule.patch 2020-05-19 14:04:44.196648010 +0100 @@ -1,14 +1,15 @@ -From 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 Mon Sep 17 00:00:00 2001 +From 5cfef294de7edb551232ef4fac533c6802d5acbe Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Tue, 7 Apr 2020 01:48:17 +0000 Subject: [PATCH] net/ice: fix RSS advanced rule +[ upstream commit 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 ] + This patch moved the RSS initialization from dev start to dev configure to fix RSS advanced rule invalid issue after running port stop and port start. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") -Cc: stable@dpdk.org Signed-off-by: Junyu Jiang Tested-by: Zhiwei He @@ -18,10 +19,10 @@ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c -index 3c38472dec..d5110c4392 100644 +index 52cd20ed9e..ca4371ae3b 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c -@@ -2436,24 +2436,6 @@ ice_dev_uninit(struct rte_eth_dev *dev) +@@ -2440,24 +2440,6 @@ ice_dev_uninit(struct rte_eth_dev *dev) return 0; } @@ -46,7 +47,7 @@ static int ice_init_rss(struct ice_pf *pf) { struct ice_hw *hw = ICE_PF_TO_HW(pf); -@@ -2584,6 +2566,32 @@ static int ice_init_rss(struct ice_pf *pf) +@@ -2588,6 +2570,32 @@ static int ice_init_rss(struct ice_pf *pf) return 0; } @@ -79,7 +80,7 @@ static void __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect, int base_queue, int nb_queue) -@@ -2787,12 +2795,6 @@ ice_dev_start(struct rte_eth_dev *dev) +@@ -2791,12 +2799,6 @@ ice_dev_start(struct rte_eth_dev *dev) } }