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 EBF51A04DD for ; Wed, 28 Oct 2020 11:50:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E0C6EC9FA; Wed, 28 Oct 2020 11:50:20 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 6180DC9C0 for ; Wed, 28 Oct 2020 11:50:18 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id b8so5191083wrn.0 for ; Wed, 28 Oct 2020 03:50:18 -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=lE1ieWgYMZGgpXWr25uCiifFae20VDG684frQUg3e5I=; b=kTHF0pvnMsiiY30GOdvhYV0kSBw1fb9l8DsSZXF/Mo7ML43QqtCVxJ3vhx3jbz019I 7a0Dgw6+Gu3qN/xb1bXC+lAyp0x0vMZ7+lctyAPg2TxmQnVFKZmCdA5LTzhNpzRCyO+m gSNAVYrJpSX4Mo7NdNiBAyNw/Ni0wuskOJ6qqTr1rly8xZ0mBABHYx2HgJbQHex2pDdW FCP6+GBfL2jxsYHEGeRHobOZ2S1FqmIjDGgSLwg0/wglTV/wr/Y7sjWwXSgZ8BVLpu1W qxWptnpstSu7t62jyeVi7UReDdgxlcBZt+ms0axRC7qvR3gMUPsP+UGhVOfJrOE68rT4 /Azw== 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=lE1ieWgYMZGgpXWr25uCiifFae20VDG684frQUg3e5I=; b=FWS0PxZ8KtDR3WyZtRHJCEO0bWCoUcsj/e8JJ3ao/n0UaZWjm29dzeGo2k/E6s8AAz gjr+MdQNY2KGH8F7Yb2z6P8DJxzFX/G+rlPJwM+G6JqCbfMHgFMwjj7MsxN3Cl2U76xu OXqIUZM6rdcdny5a2lnu4NpTpcPrVJaetr0aEl8rLMf73qnfHWL4rQ+hgzT2po0aPgrh 3XNDJXzlYm0fT9KI6oHApWTgpjCjtBpQMyVJSpGX556fjg/HVnGXE+8Nhl0g1yWfJcyy iGWXEu5WVqtih/nzRtS/zAbsa4r6ELI75cXFom0vTkd/azIYtV+f01LB3AH/hpJBwL1I zC+Q== X-Gm-Message-State: AOAM530ssthnZgBlubO9RqT9PGWbKu7/VWWLiX18qlnutLD1NxFCNNJU huIOyuzQKkwAR+aeIPqNeQg= X-Google-Smtp-Source: ABdhPJxADM/lOL4HHg9WOzFwRsOl0yOgiN2rQbcEtm6cxHqG5BUCEwCfhHZYnS2N6YAybayOb10NKQ== X-Received: by 2002:adf:e744:: with SMTP id c4mr8075110wrn.222.1603882218028; Wed, 28 Oct 2020 03:50:18 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q2sm6252256wrw.40.2020.10.28.03.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:50:17 -0700 (PDT) From: luca.boccassi@gmail.com To: "Wei Hu (Xavier)" Cc: Lijun Ou , dpdk stable Date: Wed, 28 Oct 2020 10:43:59 +0000 Message-Id: <20201028104606.3504127-80-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' has been queued to stable release 19.11.6 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/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 ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Tue, 22 Sep 2020 20:03:28 +0800 Subject: [PATCH] net/hns3: fix configuring device with RSS enabled [ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ] Currently, when running the following commands in the CLI of testpmd application, the driver reports an -EINVAL error when performing the No.3 step. 1) flow create 0 ingress pattern end actions rss key func simple_xor types all end / end 2) flow flush 0 3) port config dcb vt off pfc off The root cause as below: In the No.2 step, when RSS rules is flushed, we set the the flag hw->rss_dis_flag with true to indicate RSS id disabled. And in the No.3 step, calling rte_eth_dev_configure API function, the internal function named hns3_dev_rss_hash_update check hw->rss_dis_flag is true and return -EINVAL. When user calls the rte_eth_dev_configure API function with the input parameter dev_conf->rxmode.mq_mode having ETH_MQ_RX_RSS_FLAG to enable RSS, driver should set internal flag hw->rss_dis_flag with false to indicate RSS is enabled in the '.dev_configure' ops implementation function named hns3_dev_configure and hns3vf_dev_configure. Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed") Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_ethdev.c | 1 + drivers/net/hns3/hns3_ethdev_vf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 76f163d129..af43a4473c 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev) if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; rss_conf = conf->rx_adv_conf.rss_conf; + hw->rss_dis_flag = false; if (rss_conf.rss_key == NULL) { rss_conf.rss_key = rss_cfg->key; rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE; diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 37c7d33f59..87558832b2 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) /* When RSS is not configured, redirect the packet queue 0 */ if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + hw->rss_dis_flag = false; rss_conf = conf->rx_adv_conf.rss_conf; if (rss_conf.rss_key == NULL) { rss_conf.rss_key = rss_cfg->key; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:14.256054739 +0000 +++ 0080-net-hns3-fix-configuring-device-with-RSS-enabled.patch 2020-10-28 10:35:11.596831378 +0000 @@ -1,8 +1,10 @@ -From fd81968387634571845e879e7b5d64c5cfa8880d Mon Sep 17 00:00:00 2001 +From ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Tue, 22 Sep 2020 20:03:28 +0800 Subject: [PATCH] net/hns3: fix configuring device with RSS enabled +[ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ] + Currently, when running the following commands in the CLI of testpmd application, the driver reports an -EINVAL error when performing the No.3 step. @@ -25,7 +27,6 @@ hns3_dev_configure and hns3vf_dev_configure. Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed") -Cc: stable@dpdk.org Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) @@ -35,10 +36,10 @@ 2 files changed, 2 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c -index 10cfc5d47d..99bcc7a9a4 100644 +index 76f163d129..af43a4473c 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c -@@ -2326,6 +2326,7 @@ hns3_dev_configure(struct rte_eth_dev *dev) +@@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev) if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; rss_conf = conf->rx_adv_conf.rss_conf; @@ -47,10 +48,10 @@ rss_conf.rss_key = rss_cfg->key; rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE; diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c -index cb2747b132..4c73441116 100644 +index 37c7d33f59..87558832b2 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c -@@ -783,6 +783,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) +@@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) /* When RSS is not configured, redirect the packet queue 0 */ if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;