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 BE1EFA0093 for ; Thu, 28 May 2020 18:25:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 22FF81DC2E; Thu, 28 May 2020 18:25:42 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 184D71DC1D for ; Thu, 28 May 2020 18:25:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=252fIeh2ZtT4ZUxhR4XGj7+86An4VaBoMgPHbZueFjU=; b=MlXw239VM7IrboeTm0EMfSCBOenRi3IPfEswJ7Q52XCmrzWUXWcOVoGqOFhSWtbBBNq2L0 ylgwFwq66b0/3LBuRgMFNKyiWJxJrf1zXshezLt8U0GUN0Q4VbUhp7CwEln2J8VL9runhL 6+Wu5iok5xesvMNFZdtHphDguVZ1tDM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-y8seOLNfNMuuo0G-J1OIug-1; Thu, 28 May 2020 12:25:37 -0400 X-MC-Unique: y8seOLNfNMuuo0G-J1OIug-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD9538018A3; Thu, 28 May 2020 16:25:36 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE7F460C05; Thu, 28 May 2020 16:25:35 +0000 (UTC) From: Kevin Traynor To: Junyu Jiang Cc: Xiaoyun Li , Yingya Han , dpdk stable Date: Thu, 28 May 2020 17:22:49 +0100 Message-Id: <20200528162322.7863-62-ktraynor@redhat.com> In-Reply-To: <20200528162322.7863-1-ktraynor@redhat.com> References: <20200528162322.7863-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' has been queued to LTS release 18.11.9 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 LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/03/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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/140a1096df2a7603248e6fd3b9eace6402b79854 Thanks. Kevin. --- >From 140a1096df2a7603248e6fd3b9eace6402b79854 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 7e0e1a8bc3..2c0e8a596c 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -60,4 +60,5 @@ static uint32_t enabled_port_mask; static uint32_t num_queues = 8; static uint32_t num_pools = 8; +static uint8_t rss_enable; /* empty vmdq configuration structure. Filled in programatically */ @@ -144,4 +145,11 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_pools) (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; } @@ -165,4 +173,5 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) uint16_t queues_per_pool; uint32_t max_nb_pools; + uint64_t rss_hf_tmp; /* @@ -204,4 +213,15 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) 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 @@ -347,5 +367,6 @@ 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); } @@ -361,4 +382,5 @@ vmdq_parse_args(int argc, char **argv) static struct option long_option[] = { {"nb-pools", required_argument, NULL, 0}, + {"enable-rss", 0, NULL, 0}, {NULL, 0, 0, 0} }; @@ -378,9 +400,16 @@ 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; -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:13:02.314661380 +0100 +++ 0062-examples-vmdq-fix-RSS-configuration.patch 2020-05-28 17:12:59.137555586 +0100 @@ -1 +1 @@ -From 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 Mon Sep 17 00:00:00 2001 +From 140a1096df2a7603248e6fd3b9eace6402b79854 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16,3 +17,2 @@ - 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(-) @@ -20,19 +19,0 @@ -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 -@@ -27,11 +27,11 @@ While the IntelĀ® X710 or XL710 Ethernet Controller NICs support many configurat - 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. @@ -40 +21 @@ -index a66dd533c8..d08826c868 100644 +index 7e0e1a8bc3..2c0e8a596c 100644 @@ -67 +48 @@ -@@ -210,4 +219,15 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) +@@ -204,4 +213,15 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) @@ -83 +64 @@ -@@ -364,5 +384,6 @@ vmdq_usage(const char *prgname) +@@ -347,5 +367,6 @@ vmdq_usage(const char *prgname) @@ -91 +72 @@ -@@ -378,4 +399,5 @@ vmdq_parse_args(int argc, char **argv) +@@ -361,4 +382,5 @@ vmdq_parse_args(int argc, char **argv) @@ -97 +78 @@ -@@ -395,9 +417,16 @@ vmdq_parse_args(int argc, char **argv) +@@ -378,9 +400,16 @@ vmdq_parse_args(int argc, char **argv)