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 B2674A0093 for ; Tue, 19 May 2020 15:08:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A71011D633; Tue, 19 May 2020 15:08:36 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by dpdk.org (Postfix) with ESMTP id 092B41D633 for ; Tue, 19 May 2020 15:08:36 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id e16so15828672wra.7 for ; Tue, 19 May 2020 06:08:36 -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=MO3TutI2nAYkCGntlmUC7wJSa4GacN9eGuw+o6lJweI=; b=m4Er8hr0JNqsTwvhh3qUkCjb0yzq6cTajLx7fN8w2c5HVpRtfHlw3xn7moUMyW/KyR GaXBnx8C1J9zvUZHIJZshL1kqsCPFhFRGVEUZjI8CqtL+rY2i2BbhmKH9bmA8Ots8gXe EthXqB088fqy3BUwCCPKO2wNG+mMvpfTFv/CrSxvfS4Bdc6Y+7SMvc36Sxrv8PvEQ9M2 DlEKIROTMMMNLz9sgsWGTTqJI+YTgaERKceDFcxTJgMpq1V2xUXPW3PsA6yJARuy3fFn jCLqWOYp+oMLgd/WbkZ0Vb84hv4y4ONthxmAmpSqhFOzoutyNkYO3kqA6EAUHXMvrtDT B7JQ== 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=MO3TutI2nAYkCGntlmUC7wJSa4GacN9eGuw+o6lJweI=; b=ELF0SM2RHs/AxZvIgqbOjJn9FHjp4W/5oELnx2CTT7LD/Hs6SFxcD+dETLEDw2FIHp iu++2j11l2bKghzInWvJPczI5uJl89ycfRvHlyYNHDGvZdnngmvhI564FQWtV528PSXs 37FbQR1xUQls1pAYL+YPtMS7PT1rSVRz2otJepSMA8YCmgXfE8epeR8m6MBjJ+eCujya Qix1cAl6YONI2giLtXVwpmTDt8vxHCF8SC0GCnrJGi4Hgv4nbVNWconY51hrPeQ4F5Rp 0+4TVt29m4JLdLb0+iKMgJoQFk3tUBGcUMgo5b+RCDKafEd311zScO7FnAJi8SIC0fDu IeRA== X-Gm-Message-State: AOAM531arKI930wjyR/DqmwGS6aA1ld26hhm686F/lovBLlJzugNkuw9 AwXotAArUmyxoE/2DezHUWY= X-Google-Smtp-Source: ABdhPJzfzMJDxqscouJS1jC2N7+RBgEkYSNxme/zNu3R36oVBJB2HBB50GkBe4SPzdRSRca8dakZqw== X-Received: by 2002:adf:fa91:: with SMTP id h17mr25448240wrr.111.1589893715747; Tue, 19 May 2020 06:08:35 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h20sm3789524wma.6.2020.05.19.06.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:08:35 -0700 (PDT) From: luca.boccassi@gmail.com To: Junyu Jiang Cc: Xiaoyun Li , Yingya Han , dpdk stable Date: Tue, 19 May 2020 14:03:06 +0100 Message-Id: <20200519130549.112823-51-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' 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 61347b53bb00e8b98c952d287ddfb3a00a0e87fd Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Wed, 25 Mar 2020 06:32:48 +0000 Subject: [PATCH] examples/vmdq: fix RSS configuration [ upstream commit 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 ] In order that all queues of pools can receive packets, add enable-rss argument to change RSS configuration. Fixes: 6bb97df521aa ("examples/vmdq: new app") Signed-off-by: Junyu Jiang Acked-by: Xiaoyun Li Tested-by: Yingya Han --- examples/vmdq/main.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 74fe9a16ee..b082bc8c1c 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -59,6 +59,7 @@ static uint32_t enabled_port_mask; /* number of pools (if user does not specify any, 8 by default */ static uint32_t num_queues = 8; static uint32_t num_pools = 8; +static uint8_t rss_enable; /* empty vmdq configuration structure. Filled in programatically */ static const struct rte_eth_conf vmdq_conf_default = { @@ -143,6 +144,13 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_pools) (void)(rte_memcpy(eth_conf, &vmdq_conf_default, sizeof(*eth_conf))); (void)(rte_memcpy(ð_conf->rx_adv_conf.vmdq_rx_conf, &conf, sizeof(eth_conf->rx_adv_conf.vmdq_rx_conf))); + if (rss_enable) { + eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_RSS; + eth_conf->rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP | + ETH_RSS_UDP | + ETH_RSS_TCP | + ETH_RSS_SCTP; + } return 0; } @@ -164,6 +172,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t q; uint16_t queues_per_pool; uint32_t max_nb_pools; + uint64_t rss_hf_tmp; /* * The max pool number from dev_info will be used to validate the pool @@ -209,6 +218,17 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) if (!rte_eth_dev_is_valid_port(port)) return -1; + rss_hf_tmp = port_conf.rx_adv_conf.rss_conf.rss_hf; + port_conf.rx_adv_conf.rss_conf.rss_hf &= + dev_info.flow_type_rss_offloads; + if (port_conf.rx_adv_conf.rss_conf.rss_hf != rss_hf_tmp) { + printf("Port %u modified RSS hash function based on hardware support," + "requested:%#"PRIx64" configured:%#"PRIx64"\n", + port, + rss_hf_tmp, + port_conf.rx_adv_conf.rss_conf.rss_hf); + } + /* * Though in this example, we only receive packets from the first queue * of each pool and send packets through first rte_lcore_count() tx @@ -363,7 +383,8 @@ static void vmdq_usage(const char *prgname) { printf("%s [EAL options] -- -p PORTMASK]\n" - " --nb-pools NP: number of pools\n", + " --nb-pools NP: number of pools\n" + " --enable-rss: enable RSS (disabled by default)\n", prgname); } @@ -377,6 +398,7 @@ vmdq_parse_args(int argc, char **argv) const char *prgname = argv[0]; static struct option long_option[] = { {"nb-pools", required_argument, NULL, 0}, + {"enable-rss", 0, NULL, 0}, {NULL, 0, 0, 0} }; @@ -394,11 +416,18 @@ vmdq_parse_args(int argc, char **argv) } break; case 0: - if (vmdq_parse_num_pools(optarg) == -1) { - printf("invalid number of pools\n"); - vmdq_usage(prgname); - return -1; + if (!strcmp(long_option[option_index].name, + "nb-pools")) { + if (vmdq_parse_num_pools(optarg) == -1) { + printf("invalid number of pools\n"); + vmdq_usage(prgname); + return -1; + } } + + if (!strcmp(long_option[option_index].name, + "enable-rss")) + rss_enable = 1; break; default: -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:46.596074769 +0100 +++ 0051-examples-vmdq-fix-RSS-configuration.patch 2020-05-19 14:04:44.188647865 +0100 @@ -1,45 +1,24 @@ -From 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 Mon Sep 17 00:00:00 2001 +From 61347b53bb00e8b98c952d287ddfb3a00a0e87fd Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Wed, 25 Mar 2020 06:32:48 +0000 Subject: [PATCH] examples/vmdq: fix RSS configuration +[ upstream commit 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 ] + In order that all queues of pools can receive packets, add enable-rss argument to change RSS configuration. Fixes: 6bb97df521aa ("examples/vmdq: new app") -Cc: stable@dpdk.org Signed-off-by: Junyu Jiang Acked-by: Xiaoyun Li Tested-by: Yingya Han --- - doc/guides/sample_app_ug/vmdq_forwarding.rst | 6 +-- - examples/vmdq/main.c | 39 +++++++++++++++++--- - 2 files changed, 37 insertions(+), 8 deletions(-) + examples/vmdq/main.c | 39 ++++++++++++++++++++++++++++++++++----- + 1 file changed, 34 insertions(+), 5 deletions(-) -diff --git a/doc/guides/sample_app_ug/vmdq_forwarding.rst b/doc/guides/sample_app_ug/vmdq_forwarding.rst -index d2585687bb..c3a3439e51 100644 ---- a/doc/guides/sample_app_ug/vmdq_forwarding.rst -+++ b/doc/guides/sample_app_ug/vmdq_forwarding.rst -@@ -26,13 +26,13 @@ The IntelĀ® 82599 10 Gigabit Ethernet Controller NIC also supports the splitting - While the IntelĀ® X710 or XL710 Ethernet Controller NICs support many configurations of VMDq pools of 4 or 8 queues each. - And queues numbers for each VMDq pool can be changed by setting CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM - in config/common_* file. --The nb-pools parameter can be passed on the command line, after the EAL parameters: -+The nb-pools and enable-rss parameters can be passed on the command line, after the EAL parameters: - - .. code-block:: console - -- ./build/vmdq_app [EAL options] -- -p PORTMASK --nb-pools NP -+ ./build/vmdq_app [EAL options] -- -p PORTMASK --nb-pools NP --enable-rss - --where, NP can be 8, 16 or 32. -+where, NP can be 8, 16 or 32, rss is disabled by default. - - In Linux* user space, the application can display statistics with the number of packets received on each queue. - To have the application display the statistics, send a SIGHUP signal to the running application process. diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c -index a66dd533c8..d08826c868 100644 +index 74fe9a16ee..b082bc8c1c 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -59,6 +59,7 @@ static uint32_t enabled_port_mask;