patches for DPDK stable branches
 help / color / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Flavia Musatescu <flavia.musatescu@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'app/testpmd: remove duplicated Rx offload commands' has been queued to LTS release 18.11.6
Date: Fri, 22 Nov 2019 14:40:53 +0000
Message-ID: <20191122144131.21231-7-ktraynor@redhat.com> (raw)
In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com>

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 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/403ef11322447c78bd574911455643d3efa9cfae

Thanks.

Kevin.

---
From 403ef11322447c78bd574911455643d3efa9cfae Mon Sep 17 00:00:00 2001
From: Flavia Musatescu <flavia.musatescu@intel.com>
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=UTF-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:
“port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|
hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off”

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 <port_id> 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
“port config all drop-en on|off”

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")

Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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,
 			"    Set the max packet length.\n\n"
 
-			"port config all (crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|hw-vlan-filter|"
-			"hw-vlan-strip|hw-vlan-extend|drop-en)"
-			" (on|off)\n"
-			"    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
-			" for ports.\n\n"
+			"port config all drop-en (on|off)\n"
+			"    Enable or disable packet drop on all RX queues of all ports when no "
+			"receive buffers available.\n\n"
 
 			"port config all rss (all|default|ip|tcp|udp|sctp|"
@@ -2042,6 +2040,4 @@ 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()) {
@@ -2050,102 +2046,16 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 	}
 
-	RTE_ETH_FOREACH_DEV(pid) {
-		struct rte_port *port;
-		uint64_t rx_offloads;
-
-		port = &ports[pid];
-		rx_offloads = port->dev_conf.rxmode.offloads;
-		if (!strcmp(res->name, "crc-strip")) {
-			if (!strcmp(res->value, "on")) {
-				rx_offloads &= ~DEV_RX_OFFLOAD_KEEP_CRC;
-			} else if (!strcmp(res->value, "off")) {
-				rx_offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
-			} else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "scatter")) {
-			if (!strcmp(res->value, "on")) {
-				rx_offloads |= DEV_RX_OFFLOAD_SCATTER;
-			} else if (!strcmp(res->value, "off")) {
-				rx_offloads &= ~DEV_RX_OFFLOAD_SCATTER;
-			} else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "rx-cksum")) {
-			if (!strcmp(res->value, "on"))
-				rx_offloads |= DEV_RX_OFFLOAD_CHECKSUM;
-			else if (!strcmp(res->value, "off"))
-				rx_offloads &= ~DEV_RX_OFFLOAD_CHECKSUM;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "rx-timestamp")) {
-			if (!strcmp(res->value, "on"))
-				rx_offloads |= DEV_RX_OFFLOAD_TIMESTAMP;
-			else if (!strcmp(res->value, "off"))
-				rx_offloads &= ~DEV_RX_OFFLOAD_TIMESTAMP;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "hw-vlan")) {
-			if (!strcmp(res->value, "on")) {
-				rx_offloads |= (DEV_RX_OFFLOAD_VLAN_FILTER |
-						DEV_RX_OFFLOAD_VLAN_STRIP);
-			} else if (!strcmp(res->value, "off")) {
-				rx_offloads &= ~(DEV_RX_OFFLOAD_VLAN_FILTER |
-						DEV_RX_OFFLOAD_VLAN_STRIP);
-			} else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "hw-vlan-filter")) {
-			if (!strcmp(res->value, "on"))
-				rx_offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
-			else if (!strcmp(res->value, "off"))
-				rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_FILTER;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "hw-vlan-strip")) {
-			if (!strcmp(res->value, "on"))
-				rx_offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
-			else if (!strcmp(res->value, "off"))
-				rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_STRIP;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "hw-vlan-extend")) {
-			if (!strcmp(res->value, "on"))
-				rx_offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
-			else if (!strcmp(res->value, "off"))
-				rx_offloads &= ~DEV_RX_OFFLOAD_VLAN_EXTEND;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else if (!strcmp(res->name, "drop-en")) {
-			if (!strcmp(res->value, "on"))
-				rx_drop_en = 1;
-			else if (!strcmp(res->value, "off"))
-				rx_drop_en = 0;
-			else {
-				printf("Unknown parameter\n");
-				return;
-			}
-		} else {
+	if (!strcmp(res->name, "drop-en")) {
+		if (!strcmp(res->value, "on"))
+			rx_drop_en = 1;
+		else if (!strcmp(res->value, "off"))
+			rx_drop_en = 0;
+		else {
 			printf("Unknown parameter\n");
 			return;
 		}
-		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;
+	} else {
+		printf("Unknown parameter\n");
+		return;
 	}
 
@@ -2164,6 +2074,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_name =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name,
-					"crc-strip#scatter#rx-cksum#rx-timestamp#hw-vlan#"
-					"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend");
+					"drop-en");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value,
@@ -2173,6 +2082,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag = {
 	.f = cmd_config_rx_mode_flag_parsed,
 	.data = NULL,
-	.help_str = "port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|"
-		"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
+	.help_str = "port config all drop-en on|off",
 	.tokens = {
 		(void *)&cmd_config_rx_mode_flag_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_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.
 
-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-line 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 option.
-
-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 option.
-
-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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-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 receive buffers available::
 
    testpmd> port config all drop-en (on|off)
 
-Packet dropping for packets with no descriptors is off by default.
+Packet dropping when no receive buffers available is off by default.
 
 The ``on`` option is equivalent to the ``--enable-drop-en`` command-line option.
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-11-22 14:36:55.591670759 +0000
+++ 0007-app-testpmd-remove-duplicated-Rx-offload-commands.patch	2019-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_result,
+@@ -2050,102 +2046,16 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
@@ -171 +171 @@
-@@ -2232,6 +2142,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
+@@ -2164,6 +2074,5 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
@@ -179 +179 @@
-@@ -2241,6 +2150,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag = {
+@@ -2173,6 +2082,5 @@ cmdline_parse_inst_t cmd_config_rx_mode_flag = {
@@ -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
-    =========================================================
- 
-+   * Removed duplicated set of commands for RX offloading configuration from app/testpmd:
-+     “port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|hw-vlan-filter|
-+     hw-vlan-strip|hw-vlan-extend on|off”.
-+
-+     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 <port_id> rx_offload crc_strip|scatter|ipv4_cksum|udp_cksum|tcp_cksum|
-+     timestamp|vlan_strip|vlan_filter|vlan_extend on|off"
-+
- 
- 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::


  parent reply index

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 14:40 [dpdk-stable] patch 'net/bonding: fix out of bound access in LACP mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix LACP fast queue Rx handler' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix unicast packets filtering' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: fix VF runtime queues RSS config' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'ethdev: fix doc reference to FDIR disabled mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/af_packet: fix stale sockets' " Kevin Traynor
2019-11-22 14:40 ` Kevin Traynor [this message]
2019-11-22 14:40 ` [dpdk-stable] patch 'net/atlantic: remove double function declaration' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/mlx4: fix build on ppc64' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove memory barrier from NEON Rx' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove compiler " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove memory " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove redundant assignment' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/vmxnet3: remove IP checksum from capabilities' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ethdev: fix typos for ENOTSUP' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix queue interrupt for X552/557' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: enable new PF host mbox version' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix VF RSS offloads configuration' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/virtio: remove remaining simple Tx related stuff' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix typo in virtio in-order Rx function name' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix format in virtio guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'build: remove redundant libs from pkgconfig' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix meson build with custom dependency path' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix build with make and recent gcc' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'test/interrupt: account for race with callback' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'bus/pci: fix Intel IOMMU sysfs access check' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix unchecked return value' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix access to freed packet' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'security: fix doxygen fields' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/qat: fix digest length in XCBC capability' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA table' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/octeontx: enable unbinding' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix AESNI-GCM limitations in crypto guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/fips_validation: fix null dereferences' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'cryptodev: fix initialization on multi-process' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'drivers/crypto: remove some invalid comments' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/i40e: downgrade error log' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx5: fix Rx CQ doorbell synchronization on aarch64' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: refactor Rx and Tx queue setup' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix odd number of queues usage in 100G mode' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix RSS configuration as per new allocation method' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix stats flow " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ci: add missing dependencies for documentation' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix i219 hang on reset/close' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix memory barrier usage in Tx' " Kevin Traynor

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122144131.21231-7-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=flavia.musatescu@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox