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 258F9A04C3 for ; Fri, 22 Nov 2019 15:42:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B72F237; Fri, 22 Nov 2019 15:42:04 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id E7C122BAF for ; Fri, 22 Nov 2019 15:42:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574433722; 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=nnfCNnRNGRUmJwCwM4PzyhVTMFE4AF9N3w5Kqvu3Ms0=; b=SzaicXL3+uiVvDs19+a2NN3gmj9IDQkeTZXDZnvaOP2cpmDVECAcGiGLA3IZRnZ1Ab1pNW GZfKVhQL4GvfzVbEySCO98H+7S4qUEGDDJdJE48V/l1K9auJVFLXDExJwks4XJXTUY4gEU BFtnvUmwdxre7VNT3uzhnAue0r7CvS0= 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-132-js1750D1O1u5sTts8atlZQ-1; Fri, 22 Nov 2019 09:41:59 -0500 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 E4C2B184CAC9; Fri, 22 Nov 2019 14:41:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE0276E713; Fri, 22 Nov 2019 14:41:55 +0000 (UTC) From: Kevin Traynor To: Flavia Musatescu Cc: Ferruh Yigit , dpdk stable Date: Fri, 22 Nov 2019 14:40:53 +0000 Message-Id: <20191122144131.21231-7-ktraynor@redhat.com> In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com> References: <20191122144131.21231-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: js1750D1O1u5sTts8atlZQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'app/testpmd: remove duplicated Rx offload commands' has been queued to LTS release 18.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 LTS release 18.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 11/29/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 rebasi= ng (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/403ef11322447c78bd= 574911455643d3efa9cfae Thanks. Kevin. --- >From 403ef11322447c78bd574911455643d3efa9cfae Mon Sep 17 00:00:00 2001 From: Flavia Musatescu Date: Tue, 27 Aug 2019 17:43:15 +0100 Subject: [PATCH] app/testpmd: remove duplicated Rx offload commands MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit [ upstream commit e5db17a1e54e419419751f83bb804ef34eb15bff ] The testpmd application provides two sets of commands for RX offload flags configuration. The purpose of this patch is to eliminate this duplication by removing the old set of commands: =E2=80=9Cport config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan| hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off=E2=80=9D The other commands set that can be used instead in order to enable or disable the same RX offloading flags on all RX queues of a port is: "port config rx_offload crc_strip|scatter|ipv4_cksum| udp_cksum|tcp_cksum|timestamp|vlan_strip|vlan_filter|vlan_extend on|off" This patch also fixes the "drop-en" command, which enables packets dropping on all RX queues of all ports when no receive buffers available =E2=80=9Cport config all drop-en on|off=E2=80=9D Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration") Signed-off-by: Flavia Musatescu Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 120 +++----------------- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 81 +------------ 2 files changed, 16 insertions(+), 185 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 8a6f246b4..fe9792643 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -797,9 +797,7 @@ static void cmd_help_long_parsed(void *parsed_result, =09=09=09" Set the max packet length.\n\n" =20 -=09=09=09"port config all (crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan= |hw-vlan-filter|" -=09=09=09"hw-vlan-strip|hw-vlan-extend|drop-en)" -=09=09=09" (on|off)\n" -=09=09=09" Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en" -=09=09=09" for ports.\n\n" +=09=09=09"port config all drop-en (on|off)\n" +=09=09=09" Enable or disable packet drop on all RX queues of all ports = when no " +=09=09=09"receive buffers available.\n\n" =20 =09=09=09"port config all rss (all|default|ip|tcp|udp|sctp|" @@ -2042,6 +2040,4 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, { =09struct cmd_config_rx_mode_flag *res =3D parsed_result; -=09portid_t pid; -=09int k; =20 =09if (!all_ports_stopped()) { @@ -2050,102 +2046,16 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result= , =09} =20 -=09RTE_ETH_FOREACH_DEV(pid) { -=09=09struct rte_port *port; -=09=09uint64_t rx_offloads; - -=09=09port =3D &ports[pid]; -=09=09rx_offloads =3D port->dev_conf.rxmode.offloads; -=09=09if (!strcmp(res->name, "crc-strip")) { -=09=09=09if (!strcmp(res->value, "on")) { -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_KEEP_CRC; -=09=09=09} else if (!strcmp(res->value, "off")) { -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_KEEP_CRC; -=09=09=09} else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "scatter")) { -=09=09=09if (!strcmp(res->value, "on")) { -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_SCATTER; -=09=09=09} else if (!strcmp(res->value, "off")) { -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_SCATTER; -=09=09=09} else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "rx-cksum")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_CHECKSUM; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_CHECKSUM; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "rx-timestamp")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_TIMESTAMP; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_TIMESTAMP; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "hw-vlan")) { -=09=09=09if (!strcmp(res->value, "on")) { -=09=09=09=09rx_offloads |=3D (DEV_RX_OFFLOAD_VLAN_FILTER | -=09=09=09=09=09=09DEV_RX_OFFLOAD_VLAN_STRIP); -=09=09=09} else if (!strcmp(res->value, "off")) { -=09=09=09=09rx_offloads &=3D ~(DEV_RX_OFFLOAD_VLAN_FILTER | -=09=09=09=09=09=09DEV_RX_OFFLOAD_VLAN_STRIP); -=09=09=09} else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "hw-vlan-filter")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_VLAN_FILTER; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_VLAN_FILTER; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "hw-vlan-strip")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_VLAN_STRIP; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_VLAN_STRIP; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "hw-vlan-extend")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_offloads |=3D DEV_RX_OFFLOAD_VLAN_EXTEND; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_offloads &=3D ~DEV_RX_OFFLOAD_VLAN_EXTEND; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else if (!strcmp(res->name, "drop-en")) { -=09=09=09if (!strcmp(res->value, "on")) -=09=09=09=09rx_drop_en =3D 1; -=09=09=09else if (!strcmp(res->value, "off")) -=09=09=09=09rx_drop_en =3D 0; -=09=09=09else { -=09=09=09=09printf("Unknown parameter\n"); -=09=09=09=09return; -=09=09=09} -=09=09} else { +=09if (!strcmp(res->name, "drop-en")) { +=09=09if (!strcmp(res->value, "on")) +=09=09=09rx_drop_en =3D 1; +=09=09else if (!strcmp(res->value, "off")) +=09=09=09rx_drop_en =3D 0; +=09=09else { =09=09=09printf("Unknown parameter\n"); =09=09=09return; =09=09} -=09=09port->dev_conf.rxmode.offloads =3D rx_offloads; -=09=09/* Apply Rx offloads configuration */ -=09=09for (k =3D 0; k < port->dev_info.max_rx_queues; k++) -=09=09=09port->rx_conf[k].offloads =3D -=09=09=09=09port->dev_conf.rxmode.offloads; +=09} else { +=09=09printf("Unknown parameter\n"); +=09=09return; =09} =20 @@ -2164,6 +2074,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_= all =3D cmdline_parse_token_string_t cmd_config_rx_mode_flag_name =3D =09TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name, -=09=09=09=09=09"crc-strip#scatter#rx-cksum#rx-timestamp#hw-vlan#" -=09=09=09=09=09"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend"); +=09=09=09=09=09"drop-en"); cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =3D =09TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value, @@ -2173,6 +2082,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag =3D { =09.f =3D cmd_config_rx_mode_flag_parsed, =09.data =3D NULL, -=09.help_str =3D "port config all crc-strip|scatter|rx-cksum|rx-timestamp|= hw-vlan|" -=09=09"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off", +=09.help_str =3D "port config all drop-en on|off", =09.tokens =3D { =09=09(void *)&cmd_config_rx_mode_flag_port, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testp= md_app_ug/testpmd_funcs.rst index 81f10727f..787355bae 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2010,89 +2010,12 @@ Set the maximum packet length:: This is equivalent to the ``--max-pkt-len`` command-line option. =20 -port config - CRC Strip -~~~~~~~~~~~~~~~~~~~~~~~ - -Set hardware CRC stripping on or off for all ports:: - - testpmd> port config all crc-strip (on|off) - -CRC stripping is on by default. - -The ``off`` option is equivalent to the ``--disable-crc-strip`` command-li= ne option. - -port config - scatter -~~~~~~~~~~~~~~~~~~~~~~~ - -Set RX scatter mode on or off for all ports:: - - testpmd> port config all scatter (on|off) - -RX scatter mode is off by default. - -The ``on`` option is equivalent to the ``--enable-scatter`` command-line o= ption. - -port config - RX Checksum -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Set hardware RX checksum offload to on or off for all ports:: - - testpmd> port config all rx-cksum (on|off) - -Checksum offload is off by default. - -The ``on`` option is equivalent to the ``--enable-rx-cksum`` command-line = option. - -port config - VLAN -~~~~~~~~~~~~~~~~~~ - -Set hardware VLAN on or off for all ports:: - - testpmd> port config all hw-vlan (on|off) - -Hardware VLAN is off by default. - -The ``on`` option is equivalent to the ``--enable-hw-vlan`` command-line o= ption. - -port config - VLAN filter -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Set hardware VLAN filter on or off for all ports:: - - testpmd> port config all hw-vlan-filter (on|off) - -Hardware VLAN filter is off by default. - -The ``on`` option is equivalent to the ``--enable-hw-vlan-filter`` command= -line option. - -port config - VLAN strip -~~~~~~~~~~~~~~~~~~~~~~~~ - -Set hardware VLAN strip on or off for all ports:: - - testpmd> port config all hw-vlan-strip (on|off) - -Hardware VLAN strip is off by default. - -The ``on`` option is equivalent to the ``--enable-hw-vlan-strip`` command-= line option. - -port config - VLAN extend -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Set hardware VLAN extend on or off for all ports:: - - testpmd> port config all hw-vlan-extend (on|off) - -Hardware VLAN extend is off by default. - -The ``on`` option is equivalent to the ``--enable-hw-vlan-extend`` command= -line option. - port config - Drop Packets ~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -Set packet drop for packets with no descriptors on or off for all ports:: +Enable or disable packet drop on all RX queues of all ports when no receiv= e buffers available:: =20 testpmd> port config all drop-en (on|off) =20 -Packet dropping for packets with no descriptors is off by default. +Packet dropping when no receive buffers available is off by default. =20 The ``on`` option is equivalent to the ``--enable-drop-en`` command-line o= ption. --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-11-22 14:36:55.591670759 +0000 +++ 0007-app-testpmd-remove-duplicated-Rx-offload-commands.patch=092019-11-= 22 14:36:55.149150312 +0000 @@ -1 +1 @@ -From e5db17a1e54e419419751f83bb804ef34eb15bff Mon Sep 17 00:00:00 2001 +From 403ef11322447c78bd574911455643d3efa9cfae Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e5db17a1e54e419419751f83bb804ef34eb15bff ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -31 +31,0 @@ - doc/guides/rel_notes/release_19_11.rst | 9 ++ @@ -33 +33 @@ - 3 files changed, 25 insertions(+), 185 deletions(-) + 2 files changed, 16 insertions(+), 185 deletions(-) @@ -36 +36 @@ -index 56783aa13..b6bc34b4d 100644 +index 8a6f246b4..fe9792643 100644 @@ -39 +39 @@ -@@ -779,9 +779,7 @@ static void cmd_help_long_parsed(void *parsed_result, +@@ -797,9 +797,7 @@ static void cmd_help_long_parsed(void *parsed_result, @@ -52 +52 @@ -@@ -2110,6 +2108,4 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, +@@ -2042,6 +2040,4 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, @@ -59 +59 @@ -@@ -2118,102 +2114,16 @@ cmd_config_rx_mode_flag_parsed(void *parsed_resul= t, +@@ -2050,102 +2046,16 @@ cmd_config_rx_mode_flag_parsed(void *parsed_resul= t, @@ -171 +171 @@ -@@ -2232,6 +2142,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag= _all =3D +@@ -2164,6 +2074,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag= _all =3D @@ -179 +179 @@ -@@ -2241,6 +2150,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag =3D { +@@ -2173,6 +2082,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag =3D { @@ -187,18 +186,0 @@ -diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes= /release_19_11.rst -index 8490d897c..27cfbd9e3 100644 ---- a/doc/guides/rel_notes/release_19_11.rst -+++ b/doc/guides/rel_notes/release_19_11.rst -@@ -70,4 +70,13 @@ Removed Items - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D -=20 -+ * Removed duplicated set of commands for RX offloading configuration f= rom app/testpmd: -+ =E2=80=9Cport config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-= vlan|hw-vlan-filter| -+ hw-vlan-strip|hw-vlan-extend on|off=E2=80=9D. -+ -+ The testpmd commands set that can be used instead in order to enable= or disable Rx -+ offloading on all Rx queues of a port is: -+ "port config rx_offload crc_strip|scatter|ipv4_cksum|udp_c= ksum|tcp_cksum| -+ timestamp|vlan_strip|vlan_filter|vlan_extend on|off" -+ -=20 - API Changes @@ -206 +188 @@ -index 313e0707e..67f4339ca 100644 +index 81f10727f..787355bae 100644 @@ -209 +191 @@ -@@ -2100,89 +2100,12 @@ Set the maximum packet length:: +@@ -2010,89 +2010,12 @@ Set the maximum packet length::