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 26C36A0613 for ; Tue, 27 Aug 2019 11:31:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EEF91C0D4; Tue, 27 Aug 2019 11:31:05 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 44C5F1C0D7 for ; Tue, 27 Aug 2019 11:31:04 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B8CD930821C1; Tue, 27 Aug 2019 09:31:03 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-48.ams2.redhat.com [10.36.117.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB0C95C1B2; Tue, 27 Aug 2019 09:31:02 +0000 (UTC) From: Kevin Traynor To: Wei Zhao Cc: Bernard Iremonger , dpdk stable Date: Tue, 27 Aug 2019 10:29:52 +0100 Message-Id: <20190827093032.20423-15-ktraynor@redhat.com> In-Reply-To: <20190827093032.20423-1-ktraynor@redhat.com> References: <20190827093032.20423-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 27 Aug 2019 09:31:03 +0000 (UTC) Subject: [dpdk-stable] patch 'app/testpmd: fix queue offload configuration' has been queued to LTS release 18.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 LTS release 18.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 09/03/19. 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/78220641288f731cf8eaa44dab1d733f2d4622d3 Thanks. Kevin Traynor --- >From 78220641288f731cf8eaa44dab1d733f2d4622d3 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Thu, 4 Jul 2019 13:35:37 +0800 Subject: [PATCH] app/testpmd: fix queue offload configuration [ upstream commit 74453ac9ef67575284e0449ca24aada540505a89 ] When adding offloads from commandline, not only port related configuration bits should be set, but also queue related offloads configuration bits, or it will cause error. For example, test in this process for ixgbe: (1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4 -- -i --portmask=0x1 --port-topology=loop --disable-crc-strip (2)port stop all (3)port config all crc-strip on (4)port start all we will see "Fail to configure port 0 rx queues" of warning info. Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API") Signed-off-by: Wei Zhao Acked-by: Bernard Iremonger --- app/test-pmd/cmdline.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index eeadb2de4..2eb2fd6ae 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2043,4 +2043,5 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, struct cmd_config_rx_mode_flag *res = parsed_result; portid_t pid; + int k; if (!all_ports_stopped()) { @@ -2143,4 +2144,8 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, } port->dev_conf.rxmode.offloads = rx_offloads; + /* Apply Rx offloads configuration */ + for (k = 0; k < port->dev_info.max_rx_queues; k++) + port->rx_conf[k].offloads = + port->dev_conf.rxmode.offloads; } @@ -4355,4 +4360,15 @@ csum_show(int port_id) } +static void +cmd_config_queue_tx_offloads(struct rte_port *port) +{ + int k; + + /* Apply queue tx offloads configuration */ + for (k = 0; k < port->dev_info.max_rx_queues; k++) + port->tx_conf[k].offloads = + port->dev_conf.txmode.offloads; +} + static void cmd_csum_parsed(void *parsed_result, @@ -4439,4 +4455,5 @@ cmd_csum_parsed(void *parsed_result, (~csum_offloads); } + cmd_config_queue_tx_offloads(&ports[res->port_id]); } csum_show(res->port_id); @@ -4590,4 +4607,5 @@ cmd_tso_set_parsed(void *parsed_result, ports[res->port_id].tso_segsz); } + cmd_config_queue_tx_offloads(&ports[res->port_id]); /* display warnings if configuration is not supported by the NIC */ @@ -4745,4 +4763,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, } + cmd_config_queue_tx_offloads(&ports[res->port_id]); cmd_reconfig_device_queue(res->port_id, 1, 1); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-08-27 09:40:11.726756315 +0100 +++ 0015-app-testpmd-fix-queue-offload-configuration.patch 2019-08-27 09:40:10.890145117 +0100 @@ -1 +1 @@ -From 74453ac9ef67575284e0449ca24aada540505a89 Mon Sep 17 00:00:00 2001 +From 78220641288f731cf8eaa44dab1d733f2d4622d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 74453ac9ef67575284e0449ca24aada540505a89 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index cbde5d2ae..01dd45f27 100644 +index eeadb2de4..2eb2fd6ae 100644 @@ -30 +31 @@ -@@ -2048,4 +2048,5 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, +@@ -2043,4 +2043,5 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, @@ -36 +37 @@ -@@ -2148,4 +2149,8 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, +@@ -2143,4 +2144,8 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, @@ -45 +46 @@ -@@ -4360,4 +4365,15 @@ csum_show(int port_id) +@@ -4355,4 +4360,15 @@ csum_show(int port_id) @@ -61 +62 @@ -@@ -4444,4 +4460,5 @@ cmd_csum_parsed(void *parsed_result, +@@ -4439,4 +4455,5 @@ cmd_csum_parsed(void *parsed_result, @@ -67 +68 @@ -@@ -4595,4 +4612,5 @@ cmd_tso_set_parsed(void *parsed_result, +@@ -4590,4 +4607,5 @@ cmd_tso_set_parsed(void *parsed_result, @@ -73 +74 @@ -@@ -4750,4 +4768,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, +@@ -4745,4 +4763,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,