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 057B3A0518 for ; Fri, 24 Jul 2020 14:07:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F28811BFE7; Fri, 24 Jul 2020 14:07:53 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 9CA6E1BFE7 for ; Fri, 24 Jul 2020 14:07:52 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id a15so8079497wrh.10 for ; Fri, 24 Jul 2020 05:07:52 -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=eO2he4i02F8ICrzgM6vo91hmH5W71esUjg7HfV9NTCA=; b=OK3xpSafEtWQqq3PmY8mkHgwAUjY9ncxhyb5iGFN0ruB2LDtzik6z+0ofKjRXSpkty Cb1enui98L6KwSpXYMBGJ6VGegGoT8x2gnZLzYoSdap6frrKWqFGIr3SF3yqtJ4Xgwbl 4iU6HA6xvBpKCsG5UwhjnhCiVCmDVVb+OWsMk89HWv2fcYOQCew71z0vpk/j7u79/kZz 9UnxcNwJVzHjC11d3u00sJXD7NFHjexR9sIA2kkae9rdNqaKmKK9riTTbMCLGVGJQRxk 57RkPlzgiSnh3VGWFrYvT+fzyrHVrQdcSQET2THdTiulKmPJHgzPldn5SOUT7x2jXSiv a9zA== 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=eO2he4i02F8ICrzgM6vo91hmH5W71esUjg7HfV9NTCA=; b=lWxoM8ItPxECO+UbIFBrq7Lhde/nG/5PsGJ8CZpaa+yPwRzV40v2sHHqM5Esh+eS/c M3vg7OXtiouwYdMiY+yLQM7EifB4NnHxaqBGHB+ksVl+eDGfdAGJ8pOy5I+XhhVHe5jG gx/NDmyskHhDR4qFjy7QqjDM8QHjfiAvl2JnTK9dE79XBxIM/zhKc96+JMrcm4WXeqV9 cbj+rGgyX/qpTnnZrpjx5HHwroQZeoyDoyfo1Bccgq2YKckEtg9dlsYg+geSm6VjW9wq qS+NYltuCFgylMVG1xZcaBo8ilAamOm6VNhjQPGzeBVAJkUl8tcZHBFplXpleDZ3MkB9 3Txw== X-Gm-Message-State: AOAM530z3DsQMyncCqLtnxvEZ32yqW0zPDx0POKiTRAo02jk7LnzWnGl hWUmGvdu7SAHvyV7hdUDIms= X-Google-Smtp-Source: ABdhPJyD5Now6FnuqcauGL5sfhRmnJB1FLz5mgao5UWJ+ixBztGmF3ORXFKlNGJCN0QCd8OGtjd3Ag== X-Received: by 2002:adf:9e47:: with SMTP id v7mr8975986wre.143.1595592472363; Fri, 24 Jul 2020 05:07:52 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p6sm1652847wmg.0.2020.07.24.05.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:07:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Junyu Jiang Cc: Qiming Yang , dpdk stable Date: Fri, 24 Jul 2020 12:59:06 +0100 Message-Id: <20200724120030.1863487-108-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/iavf: fix RSS RETA after restart' has been queued to stable release 19.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/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 80b3bfdd5adeb4a8f2f1dcfed8760d22e762ca7d Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Fri, 19 Jun 2020 07:44:02 +0000 Subject: [PATCH] net/iavf: fix RSS RETA after restart [ upstream commit 1feb8e3f4e5c69071e5c461132a8b1bad05609af ] This patch moved the RSS initialization from dev start to dev configure, to fix the issue that RSS redirection table can not be kept after restarting port. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Signed-off-by: Junyu Jiang Acked-by: Qiming Yang --- drivers/net/iavf/iavf_ethdev.c | 71 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 3f41eefff..8ddd4aad9 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -132,34 +132,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable, }; -static int -iavf_dev_configure(struct rte_eth_dev *dev) -{ - struct iavf_adapter *ad = - IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad); - struct rte_eth_conf *dev_conf = &dev->data->dev_conf; - - ad->rx_bulk_alloc_allowed = true; - /* Initialize to TRUE. If any of Rx queues doesn't meet the - * vector Rx/Tx preconditions, it will be reset. - */ - ad->rx_vec_allowed = true; - ad->tx_vec_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; - - /* Vlan stripping setting */ - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { - if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP) - iavf_enable_vlan_strip(ad); - else - iavf_disable_vlan_strip(ad); - } - return 0; -} - static int iavf_init_rss(struct iavf_adapter *adapter) { @@ -216,6 +188,41 @@ iavf_init_rss(struct iavf_adapter *adapter) return 0; } +static int +iavf_dev_configure(struct rte_eth_dev *dev) +{ + struct iavf_adapter *ad = + IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad); + struct rte_eth_conf *dev_conf = &dev->data->dev_conf; + + ad->rx_bulk_alloc_allowed = true; + /* Initialize to TRUE. If any of Rx queues doesn't meet the + * vector Rx/Tx preconditions, it will be reset. + */ + ad->rx_vec_allowed = true; + ad->tx_vec_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; + + /* Vlan stripping setting */ + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) { + if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP) + iavf_enable_vlan_strip(ad); + else + iavf_disable_vlan_strip(ad); + } + + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { + if (iavf_init_rss(ad) != 0) { + PMD_DRV_LOG(ERR, "configure rss failed"); + return -1; + } + } + return 0; +} + static int iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) { @@ -436,13 +443,6 @@ iavf_dev_start(struct rte_eth_dev *dev) return -1; } - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { - if (iavf_init_rss(adapter) != 0) { - PMD_DRV_LOG(ERR, "configure rss failed"); - goto err_rss; - } - } - if (iavf_configure_queues(adapter) != 0) { PMD_DRV_LOG(ERR, "configure queues failed"); goto err_queue; @@ -471,7 +471,6 @@ iavf_dev_start(struct rte_eth_dev *dev) err_mac: iavf_add_del_all_mac_addr(adapter, FALSE); err_queue: -err_rss: return -1; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:52.704650483 +0100 +++ 0108-net-iavf-fix-RSS-RETA-after-restart.patch 2020-07-24 12:53:48.359007801 +0100 @@ -1,14 +1,15 @@ -From 1feb8e3f4e5c69071e5c461132a8b1bad05609af Mon Sep 17 00:00:00 2001 +From 80b3bfdd5adeb4a8f2f1dcfed8760d22e762ca7d Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Fri, 19 Jun 2020 07:44:02 +0000 Subject: [PATCH] net/iavf: fix RSS RETA after restart +[ upstream commit 1feb8e3f4e5c69071e5c461132a8b1bad05609af ] + This patch moved the RSS initialization from dev start to dev configure, to fix the issue that RSS redirection table can not be kept after restarting port. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") -Cc: stable@dpdk.org Signed-off-by: Junyu Jiang Acked-by: Qiming Yang @@ -17,11 +18,11 @@ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c -index b0dd49a8d..c3aa4cd72 100644 +index 3f41eefff..8ddd4aad9 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c -@@ -122,34 +122,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { - .filter_ctrl = iavf_dev_filter_ctrl, +@@ -132,34 +132,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { + .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable, }; -static int @@ -55,7 +56,7 @@ static int iavf_init_rss(struct iavf_adapter *adapter) { -@@ -206,6 +178,41 @@ iavf_init_rss(struct iavf_adapter *adapter) +@@ -216,6 +188,41 @@ iavf_init_rss(struct iavf_adapter *adapter) return 0; } @@ -97,7 +98,7 @@ static int iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq) { -@@ -426,13 +433,6 @@ iavf_dev_start(struct rte_eth_dev *dev) +@@ -436,13 +443,6 @@ iavf_dev_start(struct rte_eth_dev *dev) return -1; } @@ -111,9 +112,9 @@ if (iavf_configure_queues(adapter) != 0) { PMD_DRV_LOG(ERR, "configure queues failed"); goto err_queue; -@@ -461,7 +461,6 @@ iavf_dev_start(struct rte_eth_dev *dev) +@@ -471,7 +471,6 @@ iavf_dev_start(struct rte_eth_dev *dev) err_mac: - iavf_add_del_all_mac_addr(adapter, false); + iavf_add_del_all_mac_addr(adapter, FALSE); err_queue: -err_rss: return -1;