Skip to contentSkip to conversation

app/testpmd: add command line argument 'rx-metadata'

PATCH New Hanumanth Pothula 12 participants 73 messages Aug 1, 2022 – Feb 2, 2023

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: add command line argument 'rx-metadata'

Performance drop is observed by sending per packet rx metadata (offloads).

Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..daf1218977 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf(" --rx-metadata: send rx  metadata to driver \n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "rx-metadata",                0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "rx-metadata"))
+				rx_metadata_negotiate = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..ebbde5dfc9 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* send rx metadata */
+uint8_t rx_metadata_negotiate;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (rx_metadata_negotiate)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..8a9168c51e 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t rx_metadata_negotiate;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 app/testpmd: add command line argument 'rx-metadata'

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

ci: skip_checkpatch

Change-Id If7b6bbc7489d3e9df89c63e000d71ea2f7fe9afd
---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..daf1218977 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf(" --rx-metadata: send rx  metadata to driver \n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "rx-metadata",                0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "rx-metadata"))
+				rx_metadata_negotiate = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..ebbde5dfc9 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* send rx metadata */
+uint8_t rx_metadata_negotiate;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (rx_metadata_negotiate)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..8a9168c51e 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t rx_metadata_negotiate;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#2 lore raw

PATCH 1/1 app/testpmd: add command line argument 'rx-metadata'

In reply to Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..daf1218977 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf(" --rx-metadata: send rx  metadata to driver \n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "rx-metadata",                0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "rx-metadata"))
+				rx_metadata_negotiate = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..ebbde5dfc9 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* send rx metadata */
+uint8_t rx_metadata_negotiate;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (rx_metadata_negotiate)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..8a9168c51e 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t rx_metadata_negotiate;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#3 lore raw

Hi Hanumanth,

Thanks for expanding support for the NIC-to-PMD Rx metadata feature. I do not object the idea of the patch, it looks aceeptable. However, please find my comments below.

Quoted 19 lines · Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

---
app/test-pmd/parameters.c | 4 ++++
app/test-pmd/testpmd.c | 6 +++++-
app/test-pmd/testpmd.h | 2 ++

3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +0 -0
index e3c9757f3f..daf1218977 100644
@@ -213,6 +213,7 @@ usage(char* progname)
Quoted 4 lines

printf(" --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n" " 0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n" " 0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+ printf(" --rx-metadata: send rx metadata to driver \n");

In accordance with the above "printf", one should have 2 space characters between the opening double quote character and "--". Also, it is quite common to capitalise "R" in "Rx". The space character before "\n" seems redundant.

Regarding the option name, I would appreciate if it gets more precise and clear. Consider: "--nic-to-pmd-rx-metadata". I do not insist on this particular name.

Perhaps it pays to have a bit more verbose description as well.
Consider: "let the NIC deliver per-packet Rx metadata to PMD".

Quoted 23 lines

}
#ifdef RTE_LIB_CMDLINE

app/test-pmd/parameters.c +3 -0
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 { "record-burst-stats", 0, 0, 0 },
 { PARAM_NUM_PROCS, 1, 0, 0 },
 { PARAM_PROC_ID, 1, 0, 0 },
+ { "rx-metadata", 0, 0, 0 },
 { 0, 0, 0, 0 },
 };
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 num_procs = atoi(optarg);
 if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 proc_id = atoi(optarg);
+ if (!strcmp(lgopts[opt_idx].name, "rx-metadata"))
+ rx_metadata_negotiate = 1;
 break;

case 'h':
usage(argv[0]);

app/test-pmd/testpmd.c +0 -0
index addcbcac85..ebbde5dfc9 100644

app/test-pmd/testpmd.c uint8_t clear_ptypes = true; · line 413

Quoted 3 lines
app/test-pmd/testpmd.c +1 -0
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
+/* send rx metadata */

Consider: "/* Send Rx metadata */".

Quoted 22 lines
app/test-pmd/testpmd.c +4 -1
+uint8_t rx_metadata_negotiate;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 [RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 int ret;
 int i;
- eth_rx_metadata_negotiate_mp(pid);
+ if (rx_metadata_negotiate)
+ eth_rx_metadata_negotiate_mp(pid);
 port->dev_conf.txmode = tx_mode;
 port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +0 -0
index fb2f5195d3..8a9168c51e 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];

extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */ extern uint32_t burst_tx_retry_num; /**< Burst tx retry number for mac-retry. */

app/test-pmd/testpmd.h +2 -0
+extern uint8_t rx_metadata_negotiate;
+
Quoted 8 lines

#ifdef RTE_LIB_GRO
#define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
#define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \

Signature · 1 line
2.25.1

--
Best regards,
Ivan M

#4 lore raw

PATCH 1/1 app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

In reply to Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

v2:
- taken care alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..a381945492 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf("  --nic-to-pmd-rx-metadata: let the NIC deliver per-packet Rx metadata to PMD\n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "nic-to-pmd-rx-metadata",     0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "nic-to-pmd-rx-metadata"))
+				nic_to_pmd_rx_metadata = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..2b17d4f757 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* Send Rx metadata */
+uint8_t nic_to_pmd_rx_metadata;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (nic_to_pmd_rx_metadata)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..294a9c8cf4 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t nic_to_pmd_rx_metadata;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#5 lore raw

PATCH v2 1/2 version: 22.11-rc0

From: David Marchand <[email protected]>

Start a new release cycle with empty release notes.

The ABI version becomes 23.0.
The map files are updated to the new ABI major number (23). The ABI exceptions are dropped and CI ABI checks are disabled because compatibility is not preserved.
Special handling of removed drivers is also dropped in check-abi.sh and a note has been added in libabigail.abignore as a reminder.

---
 .github/workflows/build.yml                |   4 +-
 .travis.yml                                |  21 +---
 ABI_VERSION                                |   2 +-
 VERSION                                    |   2 +-
 devtools/check-abi.sh                      |   4 -
 devtools/libabigail.abignore               |  37 ------
 doc/guides/rel_notes/index.rst             |   1 +
 doc/guides/rel_notes/release_22_11.rst     | 136 +++++++++++++++++++++
 drivers/baseband/acc100/version.map        |   2 +-
 drivers/baseband/fpga_5gnr_fec/version.map |   2 +-
 drivers/baseband/fpga_lte_fec/version.map  |   2 +-
 drivers/baseband/la12xx/version.map        |   2 +-
 drivers/baseband/null/version.map          |   2 +-
 drivers/baseband/turbo_sw/version.map      |   2 +-
 drivers/bus/fslmc/version.map              |   2 +-
 drivers/bus/ifpga/version.map              |   2 +-
 drivers/bus/pci/version.map                |   2 +-
 drivers/bus/vdev/version.map               |   2 +-
 drivers/bus/vmbus/version.map              |   2 +-
 drivers/common/qat/version.map             |   2 +-
 drivers/compress/isal/version.map          |   2 +-
 drivers/compress/mlx5/version.map          |   2 +-
 drivers/compress/octeontx/version.map      |   2 +-
 drivers/compress/zlib/version.map          |   2 +-
 drivers/crypto/armv8/version.map           |   2 +-
 drivers/crypto/bcmfs/version.map           |   2 +-
 drivers/crypto/caam_jr/version.map         |   2 +-
 drivers/crypto/ccp/version.map             |   2 +-
 drivers/crypto/ipsec_mb/version.map        |   2 +-
 drivers/crypto/mlx5/version.map            |   2 +-
 drivers/crypto/mvsam/version.map           |   2 +-
 drivers/crypto/nitrox/version.map          |   2 +-
 drivers/crypto/null/version.map            |   2 +-
 drivers/crypto/octeontx/version.map        |   2 +-
 drivers/crypto/openssl/version.map         |   2 +-
 drivers/crypto/scheduler/version.map       |   2 +-
 drivers/crypto/virtio/version.map          |   2 +-
 drivers/dma/cnxk/version.map               |   2 +-
 drivers/dma/dpaa/version.map               |   2 +-
 drivers/dma/dpaa2/version.map              |   2 +-
 drivers/dma/hisilicon/version.map          |   2 +-
 drivers/dma/idxd/version.map               |   2 +-
 drivers/dma/ioat/version.map               |   2 +-
 drivers/dma/skeleton/version.map           |   2 +-
 drivers/event/dlb2/version.map             |   2 +-
 drivers/event/dpaa/version.map             |   2 +-
 drivers/event/dpaa2/version.map            |   2 +-
 drivers/event/dsw/version.map              |   2 +-
 drivers/event/octeontx/version.map         |   2 +-
 drivers/event/opdl/version.map             |   2 +-
 drivers/event/skeleton/version.map         |   2 +-
 drivers/event/sw/version.map               |   2 +-
 drivers/gpu/cuda/version.map               |   2 +-
 drivers/mempool/bucket/version.map         |   2 +-
 drivers/mempool/dpaa2/version.map          |   2 +-
 drivers/mempool/octeontx/version.map       |   2 +-
 drivers/mempool/ring/version.map           |   2 +-
 drivers/mempool/stack/version.map          |   2 +-
 drivers/net/af_packet/version.map          |   2 +-
 drivers/net/af_xdp/version.map             |   2 +-
 drivers/net/ark/version.map                |   2 +-
 drivers/net/atlantic/version.map           |   2 +-
 drivers/net/avp/version.map                |   2 +-
 drivers/net/axgbe/version.map              |   2 +-
 drivers/net/bnx2x/version.map              |   2 +-
 drivers/net/bnxt/version.map               |   2 +-
 drivers/net/bonding/version.map            |   2 +-
 drivers/net/cnxk/version.map               |  12 +-
 drivers/net/cxgbe/version.map              |   2 +-
 drivers/net/dpaa/version.map               |   2 +-
 drivers/net/dpaa2/version.map              |   2 +-
 drivers/net/e1000/version.map              |   2 +-
 drivers/net/ena/version.map                |   2 +-
 drivers/net/enetc/version.map              |   2 +-
 drivers/net/enetfec/version.map            |   2 +-
 drivers/net/enic/version.map               |   2 +-
 drivers/net/failsafe/version.map           |   2 +-
 drivers/net/fm10k/version.map              |   2 +-
 drivers/net/hinic/version.map              |   2 +-
 drivers/net/hns3/version.map               |   2 +-
 drivers/net/i40e/version.map               |   2 +-
 drivers/net/iavf/version.map               |   2 +-
 drivers/net/ice/version.map                |   2 +-
 drivers/net/igc/version.map                |   2 +-
 drivers/net/ionic/version.map              |   2 +-
 drivers/net/ipn3ke/version.map             |   2 +-
 drivers/net/ixgbe/version.map              |   2 +-
 drivers/net/kni/version.map                |   2 +-
 drivers/net/liquidio/version.map           |   2 +-
 drivers/net/memif/version.map              |   2 +-
 drivers/net/mlx4/version.map               |   2 +-
 drivers/net/mlx5/version.map               |   2 +-
 drivers/net/mvneta/version.map             |   2 +-
 drivers/net/mvpp2/version.map              |   2 +-
 drivers/net/netvsc/version.map             |   2 +-
 drivers/net/nfb/version.map                |   2 +-
 drivers/net/nfp/version.map                |   2 +-
 drivers/net/ngbe/version.map               |   2 +-
 drivers/net/null/version.map               |   2 +-
 drivers/net/octeontx/version.map           |   2 +-
 drivers/net/octeontx_ep/version.map        |   2 +-
 drivers/net/pcap/version.map               |   2 +-
 drivers/net/pfe/version.map                |   2 +-
 drivers/net/qede/version.map               |   2 +-
 drivers/net/ring/version.map               |   2 +-
 drivers/net/sfc/version.map                |   2 +-
 drivers/net/softnic/version.map            |   2 +-
 drivers/net/tap/version.map                |   2 +-
 drivers/net/thunderx/version.map           |   2 +-
 drivers/net/txgbe/version.map              |   2 +-
 drivers/net/vdev_netvsc/version.map        |   2 +-
 drivers/net/vhost/version.map              |   2 +-
 drivers/net/virtio/version.map             |   2 +-
 drivers/net/vmxnet3/version.map            |   2 +-
 drivers/raw/cnxk_bphy/version.map          |   2 +-
 drivers/raw/cnxk_gpio/version.map          |   2 +-
 drivers/raw/dpaa2_cmdif/version.map        |   2 +-
 drivers/raw/ifpga/version.map              |  18 +--
 drivers/raw/ioat/version.map               |   2 +-
 drivers/raw/ntb/version.map                |   2 +-
 drivers/raw/skeleton/version.map           |   2 +-
 drivers/regex/cn9k/version.map             |   2 +-
 drivers/regex/mlx5/version.map             |   2 +-
 drivers/vdpa/ifc/version.map               |   2 +-
 drivers/vdpa/mlx5/version.map              |   2 +-
 drivers/vdpa/sfc/version.map               |   2 +-
 lib/acl/version.map                        |   2 +-
 lib/bbdev/version.map                      |   2 +-
 lib/bitratestats/version.map               |   2 +-
 lib/bpf/version.map                        |   2 +-
 lib/cfgfile/version.map                    |   2 +-
 lib/cmdline/version.map                    |   2 +-
 lib/cryptodev/version.map                  |   2 +-
 lib/distributor/version.map                |   2 +-
 lib/eal/version.map                        |   2 +-
 lib/efd/version.map                        |   2 +-
 lib/ethdev/version.map                     |   2 +-
 lib/eventdev/version.map                   |   2 +-
 lib/fib/version.map                        |   2 +-
 lib/gro/version.map                        |   2 +-
 lib/gso/version.map                        |   2 +-
 lib/hash/version.map                       |   2 +-
 lib/ip_frag/version.map                    |   2 +-
 lib/ipsec/version.map                      |   2 +-
 lib/jobstats/version.map                   |   2 +-
 lib/kni/version.map                        |   2 +-
 lib/kvargs/version.map                     |   2 +-
 lib/latencystats/version.map               |   2 +-
 lib/lpm/version.map                        |   2 +-
 lib/mbuf/version.map                       |   2 +-
 lib/member/version.map                     |   2 +-
 lib/mempool/version.map                    |   2 +-
 lib/meter/version.map                      |   2 +-
 lib/metrics/version.map                    |   2 +-
 lib/net/version.map                        |   2 +-
 lib/pci/version.map                        |   2 +-
 lib/pdump/version.map                      |   2 +-
 lib/pipeline/version.map                   |   2 +-
 lib/port/version.map                       |   2 +-
 lib/power/version.map                      |   2 +-
 lib/rawdev/version.map                     |   2 +-
 lib/rcu/version.map                        |   2 +-
 lib/reorder/version.map                    |   2 +-
 lib/rib/version.map                        |   2 +-
 lib/ring/version.map                       |   2 +-
 lib/sched/version.map                      |   2 +-
 lib/security/version.map                   |   2 +-
 lib/stack/version.map                      |   2 +-
 lib/table/version.map                      |   2 +-
 lib/telemetry/version.map                  |   2 +-
 lib/timer/version.map                      |   2 +-
 lib/vhost/version.map                      |   2 +-
 172 files changed, 319 insertions(+), 242 deletions(-)
 create mode 100644 doc/guides/rel_notes/release_22_11.rst
.github/workflows/build.yml +2 -2
index 1106256539..6f04e7071c 100644
@@ -25,7 +25,7 @@ jobs:
       MINGW: ${{ matrix.config.cross == 'mingw' }}
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
-      REF_GIT_TAG: v22.03
+      REF_GIT_TAG: none
       RISCV64: ${{ matrix.config.cross == 'riscv64' }}
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
 
@@ -43,7 +43,7 @@ jobs:
           - os: ubuntu-20.04
             compiler: gcc
             library: shared
-            checks: abi+doc+tests
+            checks: doc+tests
           - os: ubuntu-20.04
             compiler: clang
             library: static
.travis.yml +1 -20
index 5f46dccb54..4bb5bf629e 100644
@@ -42,7 +42,7 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
 env:
   global:
     - LIBABIGAIL_VERSION=libabigail-1.8
-    - REF_GIT_TAG=v22.03
+    - REF_GIT_TAG=none
 
 jobs:
   include:
@@ -61,14 +61,6 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
-  - env: DEF_LIB="shared" ABI_CHECKS=true
-    arch: amd64
-    compiler: gcc
-    addons:
-      apt:
-        packages:
-          - *required_packages
-          - *libabigail_build_packages
   # x86_64 clang jobs
   - env: DEF_LIB="static"
     arch: amd64
@@ -145,17 +137,6 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
-  - env: DEF_LIB="shared" ABI_CHECKS=true
-    dist: focal
-    arch: arm64-graviton2
-    virt: vm
-    group: edge
-    compiler: gcc
-    addons:
-      apt:
-        packages:
-          - *required_packages
-          - *libabigail_build_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     dist: focal
ABI_VERSION +1 -1
index 95af471221..919c868b57 100644
@@ -1 +1 @@
-22.2
+23.0
VERSION +1 -1
index 97371cc668..4bc005def2 100644
@@ -1 +1 @@
-22.07.0
+22.11.0-rc0
devtools/check-abi.sh +0 -4
index d465c8cee0..c583eae2fd 100755
@@ -37,10 +37,6 @@ fi
 error=
 for dump in $(find $refdir -name "*.dump"); do
 	name=$(basename $dump)
-	if grep -qE '\<librte_*(.*_octeontx2|raw_dpaa2_qdma)' $dump; then
-		echo "Skipped removed driver $name."
-		continue
-	fi
 	dump2=$(find $newdir -name $name)
 	if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
 		echo "Error: cannot find $name in $newdir" >&2
devtools/libabigail.abignore +0 -37
index 8c8c648895..7a93de3ba1 100644
@@ -34,40 +34,3 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Temporary exceptions till next major ABI version ;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; Ignore ethdev event enum update
-; because new event cannot be received if not registered
-[suppress_type]
-        type_kind = enum
-        changed_enumerators = RTE_ETH_EVENT_MAX
-
-; Ignore fields inserted in cacheline boundary of rte_eth_rxq_info
-; because the struct size is unchanged
-[suppress_type]
-        name = rte_eth_rxq_info
-        has_data_member_inserted_between = {offset_of(rx_buf_size), end}
-
-; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
-[suppress_type]
-        name = rte_security_ipsec_sa_options
-        has_data_member_inserted_between = {offset_of(reserved_opts), end}
-
-; Ignore section attribute fixes in experimental regexdev library
-[suppress_file]
-        soname_regexp = ^librte_regexdev\.
-
-; Ignore changes in common mlx5 driver, should be all internal
-[suppress_file]
-        soname_regexp = ^librte_common_mlx5\.
-
-; Ignore visibility fix of local functions in experimental auxiliary driver
-[suppress_file]
-        soname_regexp = ^librte_bus_auxiliary\.
-
-; Ignore visibility fix of local functions in experimental gpudev library
-[suppress_file]
-        soname_regexp = ^librte_gpudev\.
-
-; Ignore libabigail false-positive in clang builds, after moving code.
-[suppress_function]
-	name = rte_eal_remote_launch
doc/guides/rel_notes/index.rst +1 -0
index 93a3f7e5da..f6782b91db 100644
@@ -8,6 +8,7 @@ Release Notes
     :maxdepth: 1
     :numbered:
 
+    release_22_11
     release_22_07
     release_22_03
     release_21_11
doc/guides/rel_notes/release_22_11.rst new file +136 -0

136 lines not on this page · raw message

drivers/baseband/acc100/version.map +1 -1
index 13f0398d71..b4ff13e38f 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/baseband/fpga_5gnr_fec/version.map +1 -1
index de4e5025bf..6b191cf330 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/baseband/fpga_lte_fec/version.map +1 -1
index e3bfa6edb0..aab28a9976 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/baseband/la12xx/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/baseband/null/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/baseband/turbo_sw/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/bus/fslmc/version.map +1 -1
index 79b29746b6..a25a9e8ca0 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_fslmc_vfio_mem_dmamap;
drivers/bus/ifpga/version.map +1 -1
index 8ac3a4d258..c0a1eecae8 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_ifpga_driver_register;
drivers/bus/pci/version.map +1 -1
index aa56439c2b..3d5c2f3068 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pci_dump;
drivers/bus/vdev/version.map +1 -1
index 0d60b7e2bc..7cc3098a50 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_vdev_add_custom_scan;
drivers/bus/vmbus/version.map +1 -1
index 3cadec7fae..84db31b6e9 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_vmbus_chan_close;
drivers/common/qat/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/compress/isal/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/compress/mlx5/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/compress/octeontx/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/compress/zlib/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/armv8/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/bcmfs/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/caam_jr/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/ccp/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/ipsec_mb/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/mlx5/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/mvsam/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/nitrox/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/null/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/octeontx/version.map +1 -1
index 997a95ea33..cc4b6b0970 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/crypto/openssl/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/crypto/scheduler/version.map +1 -1
index 47e4487b75..74491beabb 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_cryptodev_scheduler_load_user_scheduler;
drivers/crypto/virtio/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/cnxk/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/dpaa/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/dpaa2/version.map +1 -1
index 38d3d225db..0c020e5249 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/dma/hisilicon/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/idxd/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/ioat/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/dma/skeleton/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/dlb2/version.map +1 -1
index c727207d1a..1327e3e335 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/event/dpaa/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/dpaa2/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/dsw/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/octeontx/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/opdl/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/skeleton/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/event/sw/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/gpu/cuda/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/mempool/bucket/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/mempool/dpaa2/version.map +1 -1
index cfd4ae617a..0023765843 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_dpaa2_mbuf_from_buf_addr;
drivers/mempool/octeontx/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/mempool/ring/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/mempool/stack/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/af_packet/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/af_xdp/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ark/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/atlantic/version.map +1 -1
index d36fc61a84..e301b105fe 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/net/avp/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/axgbe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/bnx2x/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/bnxt/version.map +1 -1
index 2ba5ec5f6e..075bb37a36 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_bnxt_get_vf_rx_status;
drivers/net/bonding/version.map +1 -1
index d7142c4f94..9333923b4e 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_eth_bond_8023ad_agg_selection_get;
drivers/net/cnxk/version.map +6 -6
index 0bcc65fe6f..3ef3e76bb0 100644
@@ -1,15 +1,15 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
-INTERNAL {
-	global:
-	cnxk_nix_inb_mode_set;
-};
-
 EXPERIMENTAL {
 	# added in 22.07
 	global:
 	rte_pmd_cnxk_hw_sa_read;
 	rte_pmd_cnxk_hw_sa_write;
 };
+
+INTERNAL {
+	global:
+	cnxk_nix_inb_mode_set;
+};
drivers/net/cxgbe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/dpaa/version.map +1 -1
index 338ea2d8b2..5268d39ef6 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_dpaa_set_tx_loopback;
drivers/net/dpaa2/version.map +1 -1
index cc82b8579d..d6535343b1 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_dpaa2_mux_flow_create;
drivers/net/e1000/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ena/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/enetc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/enetfec/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/enic/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/failsafe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/fm10k/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/hinic/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/hns3/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/i40e/version.map +1 -1
index 5dd68158d3..561db50eac 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_i40e_add_vf_mac_addr;
drivers/net/iavf/version.map +1 -1
index 97f0f87311..4796c2884f 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/net/ice/version.map +1 -1
index 60a3f17393..e7e8e50557 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/net/igc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ionic/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ipn3ke/version.map +1 -1
index 4fd4e7c09b..4c48499993 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/net/ixgbe/version.map +1 -1
index f0f29d8749..94693ccc1a 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_ixgbe_bypass_event_show;
drivers/net/kni/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/liquidio/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/memif/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/mlx4/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/mlx5/version.map +1 -1
index c97dfe440a..9942de5079 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
 
drivers/net/mvneta/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/mvpp2/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/netvsc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/nfb/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/nfp/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ngbe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/null/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/octeontx/version.map +1 -1
index d12156778e..ae37d32d04 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_octeontx_pchan_map;
drivers/net/octeontx_ep/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/pcap/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/pfe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/qede/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/ring/version.map +1 -1
index e43f5ea908..84e52064e0 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_eth_from_ring;
drivers/net/sfc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/softnic/version.map +1 -1
index 01e1514276..4dac46ecd5 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pmd_softnic_manage;
drivers/net/tap/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/thunderx/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/txgbe/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/vdev_netvsc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/vhost/version.map +1 -1
index 1aa8abef75..e42c89f1eb 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_eth_vhost_get_queue_event;
drivers/net/virtio/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/net/vmxnet3/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/cnxk_bphy/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/cnxk_gpio/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/dpaa2_cmdif/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/ifpga/version.map +9 -9
index ff71a453e2..f5c3959b7f 100644
@@ -1,18 +1,18 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
+	rte_pmd_ifpga_cleanup;
 	rte_pmd_ifpga_get_dev_id;
-	rte_pmd_ifpga_get_rsu_status;
-	rte_pmd_ifpga_set_rsu_status;
-	rte_pmd_ifpga_get_property;
+	rte_pmd_ifpga_get_pci_bus;
 	rte_pmd_ifpga_get_phy_info;
-	rte_pmd_ifpga_update_flash;
-	rte_pmd_ifpga_stop_update;
+	rte_pmd_ifpga_get_property;
+	rte_pmd_ifpga_get_rsu_status;
+	rte_pmd_ifpga_partial_reconfigure;
 	rte_pmd_ifpga_reboot_try;
 	rte_pmd_ifpga_reload;
-	rte_pmd_ifpga_get_pci_bus;
-	rte_pmd_ifpga_partial_reconfigure;
-	rte_pmd_ifpga_cleanup;
+	rte_pmd_ifpga_set_rsu_status;
+	rte_pmd_ifpga_stop_update;
+	rte_pmd_ifpga_update_flash;
 
 	local: *;
 };
drivers/raw/ioat/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/ntb/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/raw/skeleton/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/regex/cn9k/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/regex/mlx5/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/vdpa/ifc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/vdpa/mlx5/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
drivers/vdpa/sfc/version.map +1 -1
index c2e0723b4c..78c3585d7c 100644
@@ -1,3 +1,3 @@
-DPDK_22 {
+DPDK_23 {
 	local: *;
 };
lib/acl/version.map +1 -1
index 2b18c21601..4c15dbbb36 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_acl_add_rules;
lib/bbdev/version.map +1 -1
index cce3f3c8f5..25a0a22bd4 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_bbdev_allocate;
lib/bitratestats/version.map +1 -1
index 01c61670dd..dc110440e0 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_stats_bitrate_calc;
lib/bpf/version.map +1 -1
index 3b953f2f45..04bd657a85 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_bpf_destroy;
lib/cfgfile/version.map +1 -1
index 02cbccb8ab..fdb0f13040 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_cfgfile_add_entry;
lib/cmdline/version.map +1 -1
index fc7fdd6ea4..e3d59aaf8d 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	cirbuf_add_buf_head;
lib/cryptodev/version.map +1 -1
index dbf1f62199..5aee87c6f7 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_crypto_aead_algorithm_strings;
lib/distributor/version.map +1 -1
index 4d9ff07373..7a34dfa2f2 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_distributor_clear_returns;
lib/eal/version.map +1 -1
index c2a2cebf69..1f293e768b 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	__rte_panic;
lib/efd/version.map +1 -1
index 0226285245..67886414ab 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_efd_create;
lib/ethdev/version.map +1 -1
index d46f31b63f..03f52fee91 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_eth_add_first_rx_callback;
lib/eventdev/version.map +1 -1
index 886e2ec875..d99f996245 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	__rte_eventdev_trace_crypto_adapter_enqueue;
lib/fib/version.map +1 -1
index b23fa42b9b..a867d2b7d8 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_fib6_add;
lib/gro/version.map +1 -1
index f8a32e221c..105aa64ca3 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_gro_ctx_create;
lib/gso/version.map +1 -1
index 73767623b9..f6b552de6d 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_gso_segment;
lib/hash/version.map +1 -1
index c2e261ed13..bdcebd19c2 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_fbk_hash_create;
lib/ip_frag/version.map +1 -1
index e537224293..b9c1ccaa1b 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_ip_frag_free_death_row;
lib/ipsec/version.map +1 -1
index 0af27ffd60..f17a49dd26 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_ipsec_pkt_crypto_group;
lib/jobstats/version.map +1 -1
index 89faa02004..bca7480afb 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_jobstats_abort;
lib/kni/version.map +1 -1
index cc7790651a..83bbbe880f 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_kni_alloc;
lib/kvargs/version.map +1 -1
index 0d42cd58a8..781f71cf23 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_kvargs_count;
lib/latencystats/version.map +1 -1
index be5b014cd7..79b8395f12 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_latencystats_get;
lib/lpm/version.map +1 -1
index 0cdd04822e..e1a7aaedbb 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_lpm6_add;
lib/mbuf/version.map +1 -1
index 2745c2b77c..ed486ed14e 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	__rte_pktmbuf_linearize;
lib/member/version.map +1 -1
index f287aabc91..19469c6aba 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_member_add;
lib/mempool/version.map +1 -1
index 1b7d7c5456..b67d7aace7 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_mempool_audit;
lib/meter/version.map +1 -1
index befa3b7e32..b10b544641 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_meter_srtcm_config;
lib/metrics/version.map +1 -1
index b11a9647cd..89ffa9be80 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_metrics_deinit;
lib/net/version.map +1 -1
index 4f4330d1c4..e8fe2b7635 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_eth_random_addr;
lib/pci/version.map +1 -1
index 3f38303749..e9282ff49c 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pci_addr_cmp;
lib/pdump/version.map +1 -1
index ce5502d9cd..25df5a82c2 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pdump_disable;
lib/pipeline/version.map +1 -1
index 8312307a7a..1baa74a77a 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_pipeline_ah_packet_drop;
lib/port/version.map +1 -1
index 73d0825d2e..af6cf696fd 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_port_ethdev_reader_ops;
lib/power/version.map +1 -1
index a687754f4a..f9b2947adf 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_power_exit;
lib/rawdev/version.map +1 -1
index 4f56870761..8278aacdea 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_rawdev_close;
lib/rcu/version.map +1 -1
index b63c74f856..cabed64fca 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_rcu_log_type;
lib/reorder/version.map +1 -1
index 250e6664f5..e114d17730 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_reorder_create;
lib/rib/version.map +1 -1
index f356fe8849..ca2815e44b 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_rib6_create;
lib/ring/version.map +1 -1
index 3377293ee4..4d7c27a6d9 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_ring_create;
lib/sched/version.map +1 -1
index 13d7510584..2f64834c8f 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_approx;
lib/security/version.map +1 -1
index edf4887e12..c770b2e8f8 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_security_capabilities_get;
lib/stack/version.map +1 -1
index e145e32451..c0250f5cdf 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_stack_create;
lib/table/version.map +1 -1
index 623709f886..e32e15a5fc 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_table_acl_ops;
lib/telemetry/version.map +1 -1
index 77528bb1fe..9794f9ea20 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_tel_data_add_array_container;
lib/timer/version.map +1 -1
index 4b782456da..101f5c18b5 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_timer_alt_dump_stats;
lib/vhost/version.map +1 -1
index 9329f88e79..18574346d5 100644
@@ -1,4 +1,4 @@
-DPDK_22 {
+DPDK_23 {
 	global:
 
 	rte_vdpa_find_device_by_name;
Signature · 1 line
2.25.1
#6 lore raw

PATCH v2 2/2 app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

In reply to Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..a381945492 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf("  --nic-to-pmd-rx-metadata: let the NIC deliver per-packet Rx metadata to PMD\n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "nic-to-pmd-rx-metadata",     0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "nic-to-pmd-rx-metadata"))
+				nic_to_pmd_rx_metadata = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..2b17d4f757 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* Send Rx metadata */
+uint8_t nic_to_pmd_rx_metadata;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (nic_to_pmd_rx_metadata)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..294a9c8cf4 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t nic_to_pmd_rx_metadata;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#7 lore raw

PATCH v2 1/1 app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

In reply to Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index e3c9757f3f..a381945492 100644
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf("  --nic-to-pmd-rx-metadata: let the NIC deliver per-packet Rx metadata to PMD\n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "nic-to-pmd-rx-metadata",     0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "nic-to-pmd-rx-metadata"))
+				nic_to_pmd_rx_metadata = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index addcbcac85..2b17d4f757 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* Send Rx metadata */
+uint8_t nic_to_pmd_rx_metadata;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (nic_to_pmd_rx_metadata)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index fb2f5195d3..294a9c8cf4 100644
@@ -621,6 +621,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t nic_to_pmd_rx_metadata;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
Signature · 1 line
2.25.1
#8 lore raw

RE: [PATCH v2 1/1] app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

Ping

Quoted 99 lines

-----Original Message-----
From: Hanumanth Pothula <[email protected]>
Sent: Tuesday, August 2, 2022 11:22 PM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; Hanumanth Reddy Pothula <[email protected]>
Subject: [PATCH v2 1/1] app/testpmd: add command line argument 'nic-to-pmd- rx-metadata'

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx- metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 app/test-pmd/parameters.c | 4 ++++
 app/test-pmd/testpmd.c    | 6 +++++-
 app/test-pmd/testpmd.h    | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c index renamed from app/test-pmd/parameters.c +0 -0

e3c9757f3f..a381945492 100644

app/test-pmd/parameters.c +5 -0
@@ -213,6 +213,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf("  --nic-to-pmd-rx-metadata: let the NIC deliver per-packet Rx
+metadata to PMD\n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -710,6 +711,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "nic-to-pmd-rx-metadata",     0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1510,6 +1512,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "nic-to-pmd-rx-
 metadata"))
+				nic_to_pmd_rx_metadata = 1;
 			break;
 		case 'h':
app/test-pmd/parameters.c +0 -0
 			usage(argv[0]);
app/test-pmd/testpmd.c index renamed from app/test-pmd/testpmd.c +0 -0

addcbcac85..2b17d4f757 100644

app/test-pmd/testpmd.c +5 -1
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */  uint16_t hairpin_mode;
 
+/* Send Rx metadata */
+uint8_t nic_to_pmd_rx_metadata;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1628,7 +1631,8 @@ init_config_port_offloads(portid_t pid, uint32_t
 socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (nic_to_pmd_rx_metadata)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
app/test-pmd/testpmd.c +0 -0
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h index renamed from app/test-pmd/testpmd.h +0 -0

fb2f5195d3..294a9c8cf4 100644

app/test-pmd/testpmd.h +0 -0
@@ -621,6 +621,8 @@ extern struct rte_ether_addr
 peer_eth_addrs[RTE_MAX_ETHPORTS];  extern uint32_t burst_tx_delay_time;
 /**< Burst tx delay time(us) for mac-retry. */  extern uint32_t

burst_tx_retry_num; /**< Burst tx retry number for mac-retry. */

app/test-pmd/testpmd.h +2 -0
+extern uint8_t nic_to_pmd_rx_metadata;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32  #define

GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
--
2.25.1

Acked-by on v2 1/1
#9 lore raw

Re: [PATCH v2 1/1] app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

In reply to Hanumanth Pothula
Quoted 8 lines · Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Quoted 6 lines

v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata
---

#10 lore raw

Re: [PATCH v2 1/1] app/testpmd: add command line argument 'nic-to-pmd-rx-metadata'

Quoted 7 lines · Aman Deep
Quoted 4 lines · Hanumanth Pothula

Presently, rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Quoted 15 lines
Quoted 4 lines

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Quoted 7 lines

v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata
---

Please, update doc/guides/testpmd_app_ug/testpmd_funcs.rst to document the new command-line argument.

Also avoid argument name in the summary. It must be human- readable.

#11 lore raw

PATCH v3 1/1 app/testpmd: control passing Rx metadata to PMD

In reply to Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

v3:
- Updated run_app.rst with the new command line argument, nic-to-pmd-rx-metadata.
- Updated commit text.
v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 app/test-pmd/parameters.c             | 4 ++++
 app/test-pmd/testpmd.c                | 6 +++++-
 app/test-pmd/testpmd.h                | 2 ++
 doc/guides/testpmd_app_ug/run_app.rst | 3 +++
 4 files changed, 14 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +4 -0
index cfd7cd1e50..2b1314771f 100644
@@ -202,6 +202,7 @@ usage(char* progname)
 	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
+	printf("  --nic-to-pmd-rx-metadata: let the NIC deliver per-packet Rx metadata to PMD\n");
 }
 
 #ifdef RTE_LIB_CMDLINE
@@ -695,6 +696,7 @@ launch_args_parse(int argc, char** argv)
 		{ "record-burst-stats",         0, 0, 0 },
 		{ PARAM_NUM_PROCS,              1, 0, 0 },
 		{ PARAM_PROC_ID,                1, 0, 0 },
+		{ "nic-to-pmd-rx-metadata",     0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -1434,6 +1436,8 @@ launch_args_parse(int argc, char** argv)
 				num_procs = atoi(optarg);
 			if (!strcmp(lgopts[opt_idx].name, PARAM_PROC_ID))
 				proc_id = atoi(optarg);
+			if (!strcmp(lgopts[opt_idx].name, "nic-to-pmd-rx-metadata"))
+				nic_to_pmd_rx_metadata = 1;
 			break;
 		case 'h':
 			usage(argv[0]);
app/test-pmd/testpmd.c +5 -1
index 77741fc41f..938072bb88 100644
@@ -411,6 +411,9 @@ uint8_t clear_ptypes = true;
 /* Hairpin ports configuration mode. */
 uint16_t hairpin_mode;
 
+/* Send Rx metadata */
+uint8_t nic_to_pmd_rx_metadata;
+
 /* Pretty printing of ethdev events */
 static const char * const eth_event_desc[] = {
 	[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -1595,7 +1598,8 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
+	if (nic_to_pmd_rx_metadata)
+		eth_rx_metadata_negotiate_mp(pid);
 
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
app/test-pmd/testpmd.h +2 -0
index ddf5e21849..8522024364 100644
@@ -615,6 +615,8 @@ extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
 
+extern uint8_t nic_to_pmd_rx_metadata;
+
 #ifdef RTE_LIB_GRO
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW 32
 #define GRO_DEFAULT_FLOW_NUM (RTE_GRO_MAX_BURST_ITEM_NUM / \
doc/guides/testpmd_app_ug/run_app.rst +3 -0
index 8b41b960c8..24e2e8aa69 100644
@@ -539,6 +539,9 @@ The command line options are:
 
     The default value is 0. Hairpin will use single port mode and implicit Tx flow mode.
 
+*   ``--nic_to_pmd_rx_metadata``
+
+    Enable passing Rx metadata to PMD.
 
 Testpmd Multi-Process Command-line Options
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signature · 1 line
2.25.1
Acked-by on v3 1/1 Applied
#12 lore raw

Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

Quoted 8 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Quoted 9 lines

v3:
- Updated run_app.rst with the new command line argument, nic-to-pmd-rx-metadata.
- Updated commit text.
v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

Applied to dpdk-next-net/main, thanks.

#13 lore raw

Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

17/10/2022 10:32, Andrew Rybchenko:

Quoted 5 lines · Hanumanth Pothula
Quoted 4 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Quoted 8 lines
Quoted 4 lines

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not required.

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

#14 lore raw

Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

27/10/2022 09:34, Thomas Monjalon:

Quoted 19 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 5 lines · Hanumanth Pothula
Quoted 4 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Quoted 8 lines
Quoted 4 lines

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not required.

Quoted 5 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

I'll drop it from the pull for now, we can have it in -rc3.

#15 lore raw

RE: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

Quoted 42 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, October 27, 2022 6:25 PM
To: Hanumanth Reddy Pothula <[email protected]>; Andrew Rybchenko <[email protected]>
Cc: [email protected]; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

External Email

----------------------------------------------------------------------
27/10/2022 09:34, Thomas Monjalon:

Quoted 11 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 10 lines · Hanumanth Pothula
Quoted 8 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Quoted 7 lines
Quoted 3 lines

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not

required.

Quoted 5 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Quoted 7 lines
Quoted 1 line

Please tell me I misunderstood something.

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

I'll drop it from the pull for now, we can have it in -rc3.

@Thomas Monjalon I missed your comment, sorry for the delayed response.

Sending Rx metadata to PMD is added recently, which breaking our driver performance.
Normally any feature added to testpmd will be disabled by default, to make sure it won't affect other code(PMD). Hence adding new testpmd command line argument to disable this feature by default.

Presently, below three Rx meta features are sent to PMD by default. /** The NIC is able to deliver flag (if set) with packets to the PMD. */ #define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)

/** The NIC is able to deliver mark ID with packets to the PMD. */ #define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)

/** The NIC is able to deliver tunnel ID with packets to the PMD. */ #define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)

#16 lore raw

Re: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

02/12/2022 17:14, Hanumanth Reddy Pothula:

Quoted 31 lines

-----Original Message-----

Quoted 30 lines

27/10/2022 09:34, Thomas Monjalon:

Quoted 11 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 10 lines · Hanumanth Pothula
Quoted 8 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-metadata' to control passing rx metadata to PMD. By default it’s disabled.

Quoted 7 lines
Quoted 3 lines

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not

required.

Quoted 6 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

Quoted 8 lines
Quoted 2 lines

I'll drop it from the pull for now, we can have it in -rc3.

@Thomas Monjalon I missed your comment, sorry for the delayed response.

Sending Rx metadata to PMD is added recently, which breaking our driver performance.
Normally any feature added to testpmd will be disabled by default, to make sure it won't affect other code(PMD). Hence adding new testpmd command line argument to disable this feature by default.

No, disabling by default doesn't mean you should enable with option. It should be enabled if required by a command.

#17 lore raw

RE: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

Quoted 56 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Saturday, December 3, 2022 1:11 AM
To: Andrew Rybchenko <[email protected]>; Hanumanth Reddy Pothula <[email protected]>
Cc: [email protected]; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

02/12/2022 17:14, Hanumanth Reddy Pothula:

Quoted 9 lines

-----Original Message-----

Quoted 8 lines

27/10/2022 09:34, Thomas Monjalon:

Quoted 7 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 6 lines · Hanumanth Pothula
Quoted 5 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-

metadata'

Quoted 20 lines
Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

to control passing rx metadata to PMD. By default it’s disabled.

Quoted 8 lines
Quoted 3 lines

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not

required.

Quoted 6 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

Quoted 7 lines
Quoted 5 lines

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

I'll drop it from the pull for now, we can have it in -rc3.

@Thomas Monjalon I missed your comment, sorry for the delayed

response.

Quoted 2 lines

Sending Rx metadata to PMD is added recently, which breaking our driver

Quoted 9 lines

performance.

Quoted 1 line

Normally any feature added to testpmd will be disabled by default, to

make sure it won't affect other code(PMD).

Quoted 1 line

Hence adding new testpmd command line argument to disable this

feature by default.

No, disabling by default doesn't mean you should enable with option. It should be enabled if required by a command.

Yeah, got it, user can enable/disable the feature on the fly without restarting the application(testpmd). Will introduce new command, like below,
'port config rx-nic-to-pmd-metadata on/off'

Please let me know your thoughts on this command implementation.
If it's fine, will start implementing the command. Suggest if there is any other better way to implement the same.

#18 lore raw

Re: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

05/12/2022 08:59, Hanumanth Reddy Pothula:

Quoted 51 lines

From: Thomas Monjalon <[email protected]>

Quoted 41 lines

02/12/2022 17:14, Hanumanth Reddy Pothula:

Quoted 9 lines

-----Original Message-----

Quoted 8 lines

27/10/2022 09:34, Thomas Monjalon:

Quoted 7 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 6 lines · Hanumanth Pothula
Quoted 5 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-

metadata'

Quoted 20 lines
Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

to control passing rx metadata to PMD. By default it’s disabled.

Quoted 8 lines
Quoted 3 lines

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not

required.

Quoted 6 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

Quoted 7 lines
Quoted 5 lines

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

I'll drop it from the pull for now, we can have it in -rc3.

@Thomas Monjalon I missed your comment, sorry for the delayed

response.

Quoted 2 lines

Sending Rx metadata to PMD is added recently, which breaking our driver

Quoted 9 lines

performance.

Quoted 1 line

Normally any feature added to testpmd will be disabled by default, to

make sure it won't affect other code(PMD).

Quoted 1 line

Hence adding new testpmd command line argument to disable this

feature by default.

No, disabling by default doesn't mean you should enable with option. It should be enabled if required by a command.

Quoted 6 lines

Yeah, got it, user can enable/disable the feature on the fly without restarting the application(testpmd). Will introduce new command, like below,
'port config rx-nic-to-pmd-metadata on/off'

Please let me know your thoughts on this command implementation.
If it's fine, will start implementing the command. Suggest if there is any other better way to implement the same.

What about enabling automatically when a flow command requests metadata?

#19 lore raw

RE: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

Quoted 70 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Monday, December 5, 2022 10:29
To: Andrew Rybchenko <[email protected]>; Hanumanth Reddy Pothula <[email protected]>
Cc: [email protected]; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Raslan Darawsheh <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: Re: [EXT] Re: [PATCH v3 1/1] app/testpmd: control passing Rx metadata to PMD

05/12/2022 08:59, Hanumanth Reddy Pothula:

Quoted 13 lines

From: Thomas Monjalon <[email protected]>

Quoted 12 lines

02/12/2022 17:14, Hanumanth Reddy Pothula:

Quoted 9 lines

-----Original Message-----

Quoted 8 lines

27/10/2022 09:34, Thomas Monjalon:

Quoted 7 lines

17/10/2022 10:32, Andrew Rybchenko:

Quoted 6 lines · Hanumanth Pothula
Quoted 5 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in rx path takes extra cycles.

Hence, introducing command line argument, 'nic-to-pmd-rx-

metadata'

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

to control passing rx metadata to PMD. By default it’s

disabled.

Quoted 33 lines
Quoted 33 lines
Quoted 19 lines
Quoted 19 lines
Quoted 11 lines
Quoted 6 lines
Quoted 2 lines

Applied to dpdk-next-net/main, thanks.

I'm not sure this patch is really acceptable.
It is disabling Rx metadata by default just for benchmarking reason because your driver is doing some processing even if metadata is not

required.

Quoted 6 lines

From a user perspective, if a command requesting metadata is entered, it won't work until we enable this new option on startup. It looks terrible.

Please tell me I misunderstood something.

Quoted 7 lines
Quoted 5 lines

While pulling, I see that the name is not compliant with others. I think it should start with "enable-", use hyphens and be sorted.

I'll drop it from the pull for now, we can have it in -rc3.

@Thomas Monjalon I missed your comment, sorry for the delayed

response.

Quoted 3 lines

Sending Rx metadata to PMD is added recently, which breaking our driver

performance.

Quoted 2 lines

Normally any feature added to testpmd will be disabled by default, to

Quoted 8 lines
Quoted 7 lines

make sure it won't affect other code(PMD).

Quoted 1 line

Hence adding new testpmd command line argument to disable this

feature by default.

No, disabling by default doesn't mean you should enable with option. It should be enabled if required by a command.

Yeah, got it, user can enable/disable the feature on the fly without

restarting the application(testpmd).

Quoted 9 lines
Quoted 5 lines

Will introduce new command, like below,
'port config rx-nic-to-pmd-metadata on/off'

Please let me know your thoughts on this command implementation. If it's fine, will start implementing the command. Suggest if there is any

other better way to implement the same.

What about enabling automatically when a flow command requests metadata?

Another option - enable on defining metadata dynamic field/flag in mbuf. mlx5 PMD, for example follows this approach.

Do we need disabling this in real application? If application is designed to use metadata it is unlikely it stops using these ones.

With best regards,
Slava

#20 lore raw

PATCH v4 1/2 ethdev: control Rx metadata negotiation

In reply to Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, adding a new eth port configuration filed, 'nic_to_pmd_rx_metadata', to control NIC to PMD Rx metadata negotiation.

Also, reset dev_configured flag as part of device reset, this helps in reconfiguring porting cleanly. Rx metadata negotiation, rte_eth_rx_metadata_negotiate(), is allowed only when dev_configured flag is reset.

---
v4:
- As per spec rte_eth_rx_metadata_negotiate() is processed only when dev_configured is set. Hence can't enable automatically when a flow command requests metadata.
- Add new testpmd command to allow NIC to PMD Rx metadata negotiation.
v3:
- Updated run_app.rst with the new command line argument, nic-to-pmd-rx-metadata.
- Updated commit text.
v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 lib/ethdev/rte_ethdev.c | 2 ++
 lib/ethdev/rte_ethdev.h | 1 +
 2 files changed, 3 insertions(+)
lib/ethdev/rte_ethdev.c +2 -0
index 5d5e18db1e..18c59044bc 100644
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
 			port_id, rte_strerror(-ret));
 	}
 	ret = dev->dev_ops->dev_reset(dev);
+	if (!ret)
+		dev->data->dev_configured = 0;
 
 	return eth_err(port_id, ret);
 }
lib/ethdev/rte_ethdev.h +1 -0
index c129ca1eaf..f1160a8aca 100644
@@ -1487,6 +1487,7 @@ struct rte_eth_conf {
 	    is needed,and the variable must be set RTE_ETH_DCB_PFC_SUPPORT. */
 	uint32_t dcb_capability_en;
 	struct rte_eth_intr_conf intr_conf; /**< Interrupt mode configuration. */
+	uint8_t nic_to_pmd_rx_metadata; /**< send rx metadata to PMD. */
 };
 
 /**
Signature · 1 line
2.25.1
#21 lore raw

PATCH v4 2/2 app/testpmd: add command to process Rx metadata negotiation

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

---
 app/test-pmd/cmdline.c                      | 58 +++++++++++++++++++++
 app/test-pmd/config.c                       |  9 ++++
 app/test-pmd/testpmd.c                      |  5 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  6 +++
 4 files changed, 76 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +58 -0
index b32dc8bfd4..56946b2520 100644
@@ -610,6 +610,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set port (port_id) fec_mode auto|off|rs|baser\n"
 			"    set fec mode for a specific port\n\n"
 
+			"enable port <port_id> nic_to_pmd_rx_metadata"
+			"    Allow nic to pmd Rx metadata negotiation\n\n"
+
 			, list_pkt_forwarding_modes()
 		);
 	}
@@ -12621,6 +12624,60 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
 	}
 };
 
+/* Allow negotiating Rx metadata between NIC and PMD */
+struct cmd_config_port_rx_metadata {
+	cmdline_fixed_string_t enable;
+	cmdline_fixed_string_t port;
+	uint16_t port_id;
+	cmdline_fixed_string_t nic_to_pmd_rx_metadata;
+};
+
+static void
+cmd_config_port_rx_metadata_parsed(void *parsed_result,
+				__rte_unused struct cmdline *cl,
+				__rte_unused void *data)
+{
+	struct cmd_config_port_rx_metadata *res = parsed_result;
+
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+	if (!port_is_stopped(res->port_id)) {
+		fprintf(stderr, "Please stop port %u first\n", res->port_id);
+		return;
+	}
+
+	ports[res->port_id].dev_conf.nic_to_pmd_rx_metadata = 1;
+
+	reset_port(res->port_id);
+}
+
+
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_enable =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, enable,
+								"enable");
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_port =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, port,
+								"port");
+static cmdline_parse_token_num_t cmd_config_port_rx_metadata_id =
+	TOKEN_NUM_INITIALIZER(struct cmd_config_port_rx_metadata, port_id,
+								RTE_UINT16);
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_nic_to_pmd_rx_metadata =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, nic_to_pmd_rx_metadata,
+								"nic_to_pmd_rx_metadata");
+
+static cmdline_parse_inst_t cmd_config_port_rx_metadata_parse = {
+	.f = cmd_config_port_rx_metadata_parsed,
+	.data = NULL,
+	.help_str = "enable port <port_id> nic_to_pmd_rx_metadata",
+	.tokens = {
+		(void *)&cmd_config_port_rx_metadata_enable,
+		(void *)&cmd_config_port_rx_metadata_port,
+		(void *)&cmd_config_port_rx_metadata_id,
+		(void *)&cmd_config_port_rx_metadata_nic_to_pmd_rx_metadata,
+		NULL,
+	},
+};
+
 /* ******************************************************************************** */
 
 /* list of instructions */
@@ -12851,6 +12908,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_show_capability,
 	(cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,
 	(cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,
+	(cmdline_parse_inst_t *)&cmd_config_port_rx_metadata_parse,
 	NULL,
 };
 
app/test-pmd/config.c +9 -0
index acccb6b035..47fce3accb 100644
@@ -3249,6 +3249,15 @@ port_flow_create(portid_t port_id,
 		}
 		id = port->flow_list->id + 1;
 	}
+
+	if (port->dev_conf.nic_to_pmd_rx_metadata == 0 &&
+	   (actions->type == RTE_FLOW_ACTION_TYPE_MARK ||
+	    actions->type == RTE_FLOW_ACTION_TYPE_FLAG)) {
+		fprintf(stderr,
+			"rx metadata is not negotiated with PMD\n");
+		return -EINVAL;
+	}
+
 	if (tunnel_ops->enabled) {
 		pft = port_flow_tunnel_offload_cmd_prep(port_id, pattern,
 							actions, tunnel_ops);
app/test-pmd/testpmd.c +3 -2
index 134d79a555..22e5e08fc1 100644
@@ -1604,8 +1604,6 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
-
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
 
@@ -2946,6 +2944,9 @@ start_port(portid_t pid)
 				port->update_conf = 0;
 			}
 
+			if (port->dev_conf.nic_to_pmd_rx_metadata)
+				eth_rx_metadata_negotiate_mp(pi);
+
 			/* configure port */
 			diag = eth_dev_configure_mp(pi, nb_rxq + nb_hairpinq,
 						     nb_txq + nb_hairpinq,
doc/guides/testpmd_app_ug/testpmd_funcs.rst +6 -0
index 0037506a79..024dbf6012 100644
@@ -1558,6 +1558,12 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
 
 This command should be run when the port is stopped, or else it will fail.
 
+Enable Rx metadata negotiation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable NIC to PMD Rx metadata negotiation::
+   testpmd> enable port <port_id> nic_to_pmd_rx_metadata
+
 config per queue Rx offloading
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.25.1
#22 lore raw

Re: [PATCH v4 2/2] app/testpmd: add command to process Rx metadata negotiation

app/test-pmd/cmdline.c static cmdline_parse_ctx_t builtin_ctx[] = { · line 12914

Quoted 8 lines · On Wed, 21 Dec 2022 01:32:50 +0530 Hanumanth Pothula <[email protected]>…
app/test-pmd/cmdline.c +1 -0
@@ -12851,6 +12908,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_show_capability,
 	(cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,
 	(cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,
+	(cmdline_parse_inst_t *)&cmd_config_port_rx_metadata_parse,
 	NULL,
 };
 

Why are all these casts necessary? the function should match the prototype.

#23 lore raw

PATCH v5 1/2 ethdev: fix ethdev configuration state on reset

In reply to Hanumanth Pothula

Presently, on device reset, ethdev configuration state, dev_configured, is not reset.

On device reset, reset ethdev configuration state to make sure device reconfiguration happens cleanly.

---
v5:
- Move nic-to-pmd-rx-metadata declaration to struct rte_port.
v4:
- As per spec rte_eth_rx_metadata_negotiate() is processed only when dev_configured is set. Hence can't enable automatically when a flow command requests metadata.
- Add new testpmd command to allow NIC to PMD Rx metadata negotiation.
v3:
- Updated run_app.rst with the new command line argument, nic-to-pmd-rx-metadata.
- Updated commit text.
v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 lib/ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
lib/ethdev/rte_ethdev.c +2 -0
index 5d5e18db1e..18c59044bc 100644
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
 			port_id, rte_strerror(-ret));
 	}
 	ret = dev->dev_ops->dev_reset(dev);
+	if (!ret)
+		dev->data->dev_configured = 0;
 
 	return eth_err(port_id, ret);
 }
Signature · 1 line
2.25.1
#24 lore raw

PATCH v5 2/2 app/testpmd: add command to process Rx metadata negotiation

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

---
 app/test-pmd/cmdline.c                      | 58 +++++++++++++++++++++
 app/test-pmd/config.c                       |  9 ++++
 app/test-pmd/testpmd.c                      |  5 +-
 app/test-pmd/testpmd.h                      |  1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  6 +++
 5 files changed, 77 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +58 -0
index b32dc8bfd4..e3abc9e830 100644
@@ -610,6 +610,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set port (port_id) fec_mode auto|off|rs|baser\n"
 			"    set fec mode for a specific port\n\n"
 
+			"enable port <port_id> nic_to_pmd_rx_metadata"
+			"    Allow nic to pmd Rx metadata negotiation\n\n"
+
 			, list_pkt_forwarding_modes()
 		);
 	}
@@ -12621,6 +12624,60 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
 	}
 };
 
+/* Allow negotiating Rx metadata between NIC and PMD */
+struct cmd_config_port_rx_metadata {
+	cmdline_fixed_string_t enable;
+	cmdline_fixed_string_t port;
+	uint16_t port_id;
+	cmdline_fixed_string_t nic_to_pmd_rx_metadata;
+};
+
+static void
+cmd_config_port_rx_metadata_parsed(void *parsed_result,
+				__rte_unused struct cmdline *cl,
+				__rte_unused void *data)
+{
+	struct cmd_config_port_rx_metadata *res = parsed_result;
+
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+	if (!port_is_stopped(res->port_id)) {
+		fprintf(stderr, "Please stop port %u first\n", res->port_id);
+		return;
+	}
+
+	ports[res->port_id].nic_to_pmd_rx_metadata = 1;
+
+	reset_port(res->port_id);
+}
+
+
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_enable =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, enable,
+								"enable");
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_port =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, port,
+								"port");
+static cmdline_parse_token_num_t cmd_config_port_rx_metadata_id =
+	TOKEN_NUM_INITIALIZER(struct cmd_config_port_rx_metadata, port_id,
+								RTE_UINT16);
+static cmdline_parse_token_string_t cmd_config_port_rx_metadata_nic_to_pmd_rx_metadata =
+	TOKEN_STRING_INITIALIZER(struct cmd_config_port_rx_metadata, nic_to_pmd_rx_metadata,
+								"nic_to_pmd_rx_metadata");
+
+static cmdline_parse_inst_t cmd_config_port_rx_metadata_parse = {
+	.f = cmd_config_port_rx_metadata_parsed,
+	.data = NULL,
+	.help_str = "enable port <port_id> nic_to_pmd_rx_metadata",
+	.tokens = {
+		(void *)&cmd_config_port_rx_metadata_enable,
+		(void *)&cmd_config_port_rx_metadata_port,
+		(void *)&cmd_config_port_rx_metadata_id,
+		(void *)&cmd_config_port_rx_metadata_nic_to_pmd_rx_metadata,
+		NULL,
+	},
+};
+
 /* ******************************************************************************** */
 
 /* list of instructions */
@@ -12851,6 +12908,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_show_capability,
 	(cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,
 	(cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,
+	(cmdline_parse_inst_t *)&cmd_config_port_rx_metadata_parse,
 	NULL,
 };
 
app/test-pmd/config.c +9 -0
index acccb6b035..60df47407e 100644
@@ -3249,6 +3249,15 @@ port_flow_create(portid_t port_id,
 		}
 		id = port->flow_list->id + 1;
 	}
+
+	if (port->nic_to_pmd_rx_metadata == 0 &&
+	   (actions->type == RTE_FLOW_ACTION_TYPE_MARK ||
+	    actions->type == RTE_FLOW_ACTION_TYPE_FLAG)) {
+		fprintf(stderr,
+			"rx metadata is not negotiated with PMD\n");
+		return -EINVAL;
+	}
+
 	if (tunnel_ops->enabled) {
 		pft = port_flow_tunnel_offload_cmd_prep(port_id, pattern,
 							actions, tunnel_ops);
app/test-pmd/testpmd.c +3 -2
index 134d79a555..66d5a2634a 100644
@@ -1604,8 +1604,6 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id)
 	int ret;
 	int i;
 
-	eth_rx_metadata_negotiate_mp(pid);
-
 	port->dev_conf.txmode = tx_mode;
 	port->dev_conf.rxmode = rx_mode;
 
@@ -2946,6 +2944,9 @@ start_port(portid_t pid)
 				port->update_conf = 0;
 			}
 
+			if (port->nic_to_pmd_rx_metadata)
+				eth_rx_metadata_negotiate_mp(pi);
+
 			/* configure port */
 			diag = eth_dev_configure_mp(pi, nb_rxq + nb_hairpinq,
 						     nb_txq + nb_hairpinq,
app/test-pmd/testpmd.h +1 -0
index 7d24d25970..f44756173b 100644
@@ -309,6 +309,7 @@ struct rte_port {
 	uint8_t                 need_setup;     /**< port just attached */
 	uint8_t                 need_reconfig;  /**< need reconfiguring port or not */
 	uint8_t                 need_reconfig_queues; /**< need reconfiguring queues or not */
+	uint8_t                 nic_to_pmd_rx_metadata; /**< send rx metadata to PMD. */
 	uint8_t                 rss_flag;   /**< enable rss or not */
 	uint8_t                 dcb_flag;   /**< enable dcb */
 	uint16_t                nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */
doc/guides/testpmd_app_ug/testpmd_funcs.rst +6 -0
index 0037506a79..024dbf6012 100644
@@ -1558,6 +1558,12 @@ Enable or disable a per port Rx offloading on all Rx queues of a port::
 
 This command should be run when the port is stopped, or else it will fail.
 
+Enable Rx metadata negotiation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable NIC to PMD Rx metadata negotiation::
+   testpmd> enable port <port_id> nic_to_pmd_rx_metadata
+
 config per queue Rx offloading
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.25.1
#25 lore raw

Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

21/12/2022 03:07, Hanumanth Pothula:

Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

As said in previous versions, please don't add such option in testpmd. The problem is somewhere else, probably in your driver.
You should make sure your driver is not sending metadata if not needed. By the way you didn't reply to the last comments on v3 in December.

#26 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 28 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, January 18, 2023 4:03 PM
To: Hanumanth Reddy Pothula <[email protected]>
Cc: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; [email protected]
Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

External Email

----------------------------------------------------------------------
21/12/2022 03:07, Hanumanth Pothula:

Quoted 10 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Quoted 8 lines
Quoted 1 line

As said in previous versions, please don't add such option in testpmd. The problem is somewhere else, probably in your driver.
You should make sure your driver is not sending metadata if not needed. By the way you didn't reply to the last comments on v3 in December.

I added following comment on V4,
- As per spec rte_eth_rx_metadata_negotiate() is processed only when dev_configured is set. Hence can't enable(Rx metadata negotiation) automatically when a flow command requests metadata.
- Add new testpmd command to allow NIC to PMD Rx metadata negotiation.

As we can't enable Rx metadata negotiation on fly, introduced new testpmd command to enable Rx metadata negotiation by resetting the ports.

#27 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

19/01/2023 11:33, Hanumanth Reddy Pothula:

Quoted 14 lines

From: Thomas Monjalon <[email protected]>

Quoted 13 lines

21/12/2022 03:07, Hanumanth Pothula:

Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Quoted 8 lines
Quoted 5 lines

As said in previous versions, please don't add such option in testpmd. The problem is somewhere else, probably in your driver.
You should make sure your driver is not sending metadata if not needed. By the way you didn't reply to the last comments on v3 in December.

I added following comment on V4,
- As per spec rte_eth_rx_metadata_negotiate() is processed only when dev_configured is set.

Not exactly. It is said
"
Invoke this API before the first rte_eth_dev_configure() invocation to let the PMD make preparations that are inconvenient to do later. "

Quoted 2 lines

Hence can't enable(Rx metadata negotiation) automatically when a flow command requests metadata.

This sentence does not make any sense.
First you negotiate to prepare the feature.
Later you enable per flow.

Quoted 5 lines

- Add new testpmd command to allow NIC to PMD Rx metadata negotiation.

As we can't enable Rx metadata negotiation on fly, introduced new testpmd command to enable Rx metadata negotiation by resetting the ports.

You can enable on the fly. Fix your driver.

#28 lore raw

Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

In reply to Hanumanth Pothula
Quoted 11 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#29 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

++ Ivan Malov and Andrew Rybchenko

Quoted 31 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, January 24, 2023 11:34 PM
To: Hanumanth Reddy Pothula <[email protected]>; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>
Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

External Email

----------------------------------------------------------------------

Quoted 11 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

Quoted 7 lines

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

We can update the driver if the purpose of this API is clear.

#30 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 24 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 21 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Quoted 7 lines
Quoted 3 lines

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Quoted 2 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

It is just a configuration negotiation specific to metadata.

Quoted 2 lines

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

#31 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 29 lines · Thomas Monjalon

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 28 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 24 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

Quoted 7 lines
Quoted 3 lines

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Hi Thomas,

Not just for saving cycles, but from testing perspective too, do you think does it work if a way to disable these Rx metadata added by keeping default behavior as it is?

And new command can be in a consistent command syntax like:
"port config <port_id> ..."

Quoted 5 lines
Quoted 2 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

It is just a configuration negotiation specific to metadata.

Quoted 9 lines
Quoted 2 lines

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

Is following understanding correct?

API Flow Rule Result
----- ------------ --------
Enable No Rule Feature Disabled
Enable Rule exist Feature Enabled
Disable X Feature Disabled

#32 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

25/01/2023 14:55, Ferruh Yigit:

Quoted 38 lines · Thomas Monjalon
Quoted 29 lines

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 28 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 24 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

Quoted 7 lines
Quoted 3 lines

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Quoted 8 lines

Hi Thomas,

Not just for saving cycles, but from testing perspective too, do you think does it work if a way to disable these Rx metadata added by keeping default behavior as it is?

And new command can be in a consistent command syntax like:
"port config <port_id> ..."

Yes I agree it would be good to have a way to test different values. And it would allow to completely disable metadata I suppose.

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

Quoted 14 lines
Quoted 5 lines
Quoted 2 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

It is just a configuration negotiation specific to metadata.

Quoted 8 lines
Quoted 2 lines

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

Quoted 7 lines

Is following understanding correct?

API Flow Rule Result
----- ------------ --------
Enable No Rule Feature Disabled
Enable Rule exist Feature Enabled
Disable X Feature Disabled

In the API column, you should say "negotiated" instead of "Enable".

#33 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 3 lines
Quoted 3 lines

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

The spirit of the negotiating features/Rx/Tx offloads upfront is to have it disabled by default and enable the feature only when needed. Having the features enabled by default is probably against that spirit.

We understand the concerns with drivers that didn't not implement that API.
Why not disable it by default(like other offloads) and modify rte_flow action creation in testpmd to check for if !ENOSUP and feature disabled and add print to enable. So for the PMD's that won't support rte_eth_rx_metadata_negotiate(), there won't be any difference and for very few PMD's that support this API, they need to enable it before using RTE_FLOW with MARK/FLAG. Behavior change would be seen only with two PMD's(cnxk, sfc).

Quoted 3 lines

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

The purpose of negotiate is to tell the PMD upfront so that PMD can prepare HW appropriately. Having these new actions would be very late to inform PMD and I think won't solve the purpose.

Quoted 98 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, January 25, 2023 7:30 PM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; Ivan Malov <[email protected]>; Andrew Rybchenko <[email protected]>; [email protected]; Hanumanth Reddy Pothula <[email protected]>; Ferruh Yigit <[email protected]>
Cc: [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; [email protected]
Subject: Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

25/01/2023 14:55, Ferruh Yigit:

Quoted 26 lines · Thomas Monjalon
Quoted 25 lines

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 24 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 21 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by

testpmd.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We thought it was added so that when that metadata is not needed, application need

not call this

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Quoted 8 lines

Hi Thomas,

Not just for saving cycles, but from testing perspective too, do you think does it work if a way to disable these Rx metadata added by keeping default behavior as it is?

And new command can be in a consistent command syntax like:
"port config <port_id> ..."

Yes I agree it would be good to have a way to test different values. And it would allow to completely disable metadata I suppose.

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

Quoted 1 line
Quoted 1 line
Quoted 1 line

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before

device is

Quoted 1 line
Quoted 1 line
Quoted 1 line

configured. We thought that is the purpose of having this negotiate API and avoid

depleting offload flags.

Quoted 4 lines
Quoted 4 lines

It is just a configuration negotiation specific to metadata.

Quoted 1 line

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd

and we would have

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

Quoted 7 lines

Is following understanding correct?

API Flow Rule Result
----- ------------ --------
Enable No Rule Feature Disabled
Enable Rule exist Feature Enabled
Disable X Feature Disabled

In the API column, you should say "negotiated" instead of "Enable".

#34 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Please reply inline below instead of doing an incomplete copy of the replies on top.

25/01/2023 15:42, Nithin Kumar Dabilpuram:

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

The spirit of the negotiating features/Rx/Tx offloads upfront is to have it disabled by default and enable the feature only when needed. Having the features enabled by default is probably against that spirit.

We understand the concerns with drivers that didn't not implement that API.

There is no such concern I think.

Quoted 2 lines

Why not disable it by default(like other offloads) and modify rte_flow action creation in testpmd to check for if !ENOSUP and feature disabled and add print to enable. So for the PMD's that won't support rte_eth_rx_metadata_negotiate(), there won't be any difference and for very few PMD's that support this API, they need to enable it before using RTE_FLOW with MARK/FLAG. Behavior change would be seen only with two PMD's(cnxk, sfc).

I think you missed the whole point.
Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Quoted 7 lines
Quoted 3 lines

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

The purpose of negotiate is to tell the PMD upfront so that PMD can prepare HW appropriately. Having these new actions would be very late to inform PMD and I think won't solve the purpose.

I am not talking about your problem here.
I am just saying that TAG and META should be negotiated as well in rte_eth_rx_metadata_negotiate().

Quoted 89 lines

From: Thomas Monjalon <[email protected]>

Quoted 86 lines

25/01/2023 14:55, Ferruh Yigit:

Quoted 26 lines · Thomas Monjalon
Quoted 25 lines

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 24 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 21 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by

testpmd.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We thought it was added so that when that metadata is not needed, application need

not call this

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Quoted 8 lines

Hi Thomas,

Not just for saving cycles, but from testing perspective too, do you think does it work if a way to disable these Rx metadata added by keeping default behavior as it is?

And new command can be in a consistent command syntax like:
"port config <port_id> ..."

Yes I agree it would be good to have a way to test different values. And it would allow to completely disable metadata I suppose.

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

Quoted 1 line
Quoted 1 line
Quoted 1 line

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before

device is

Quoted 1 line
Quoted 1 line
Quoted 1 line

configured. We thought that is the purpose of having this negotiate API and avoid

depleting offload flags.

Quoted 4 lines
Quoted 4 lines

It is just a configuration negotiation specific to metadata.

Quoted 1 line

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd

and we would have

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

Quoted 7 lines

Is following understanding correct?

API Flow Rule Result
----- ------------ --------
Enable No Rule Feature Disabled
Enable Rule exist Feature Enabled
Disable X Feature Disabled

In the API column, you should say "negotiated" instead of "Enable".

#35 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Please see inline.

Quoted 12 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, January 26, 2023 4:33 PM
To: Nithin Kumar Dabilpuram <[email protected]>
Cc: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; Ivan Malov <[email protected]>; Andrew Rybchenko <[email protected]>; [email protected]; Hanumanth Reddy Pothula <[email protected]>; Ferruh Yigit <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 2 lines

Please reply inline below instead of doing an incomplete copy of the replies on top.

Ack, was just trying converge threads.

Quoted 20 lines

25/01/2023 15:42, Nithin Kumar Dabilpuram:

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

The spirit of the negotiating features/Rx/Tx offloads upfront is to have it disabled by

default and enable the feature only when needed. Having the features enabled by default is probably against that spirit.

Quoted 2 lines

We understand the concerns with drivers that didn't not implement that API.

There is no such concern I think.

Quoted 1 line

Why not disable it by default(like other offloads) and modify rte_flow action creation in

testpmd to check for if !ENOSUP and feature disabled and add print to enable. So for the PMD's that won't support rte_eth_rx_metadata_negotiate(), there won't be any difference and for very few PMD's that support this API, they need to enable it before using RTE_FLOW with MARK/FLAG.

Quoted 7 lines
Quoted 1 line

Behavior change would be seen only with two PMD's(cnxk, sfc).

I think you missed the whole point.
Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

Quoted 108 lines
Quoted 7 lines
Quoted 3 lines

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

The purpose of negotiate is to tell the PMD upfront so that PMD can prepare HW appropriately. Having these new actions would be very late to inform PMD and I think won't solve the purpose.

I am not talking about your problem here.
I am just saying that TAG and META should be negotiated as well in rte_eth_rx_metadata_negotiate().

Quoted 33 lines

From: Thomas Monjalon <[email protected]>

Quoted 32 lines

25/01/2023 14:55, Ferruh Yigit:

Quoted 31 lines · Thomas Monjalon
Quoted 30 lines

25/01/2023 10:30, Hanumanth Reddy Pothula:

Quoted 29 lines

++ Ivan Malov and Andrew Rybchenko

From: Ferruh Yigit <[email protected]>

Quoted 17 lines · Hanumanth Pothula
Quoted 11 lines

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

Quoted 7 lines

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always

called by

Quoted 2 lines
Quoted 2 lines

testpmd.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We thought it was added so that when that metadata is not needed, application

need

Quoted 24 lines
Quoted 24 lines

not call this

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

thereby saving cycles/bandwidth.

testpmd is for testing all features. That's why all is negotiated. Cycles should be saved if you don't enable it until a flow rule requires it.

Quoted 8 lines

Hi Thomas,

Not just for saving cycles, but from testing perspective too, do you think does it work if a way to disable these Rx metadata added by keeping default behavior as it is?

And new command can be in a consistent command syntax like:
"port config <port_id> ..."

Yes I agree it would be good to have a way to test different values. And it would allow to completely disable metadata I suppose.

Note: I don't understand why we don't have RTE_FLOW_ACTION_TYPE_SET_TAG and RTE_FLOW_ACTION_TYPE_SET_META negotiated in this function. Probably something to add.

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before

device is

Quoted 1 line
Quoted 1 line
Quoted 1 line

configured. We thought that is the purpose of having this negotiate API and avoid

depleting offload flags.

Quoted 4 lines
Quoted 4 lines

It is just a configuration negotiation specific to metadata.

Quoted 1 line

#3 Generally any new offloads added to DPDK would be in disabled state in

testpmd

Quoted 22 lines
Quoted 20 lines

and we would have

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

an option to enable it. In this case, testpmd is by default calling this negotiation.

Negotiating is not enabling.

Quoted 1 line

We can update the driver if the purpose of this API is clear.

Please do.

Quoted 7 lines

Is following understanding correct?

API Flow Rule Result
----- ------------ --------
Enable No Rule Feature Disabled
Enable Rule exist Feature Enabled
Disable X Feature Disabled

In the API column, you should say "negotiated" instead of "Enable".

#36 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.
Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

#37 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 20 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, January 27, 2023 2:25 PM
To: Nithin Kumar Dabilpuram <[email protected]>
Cc: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; Ivan Malov <[email protected]>; Andrew Rybchenko <[email protected]>; [email protected]; Hanumanth Reddy Pothula <[email protected]>; Ferruh Yigit <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 5 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Quoted 5 lines
Quoted 3 lines

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines
#38 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 22 lines

From: Thomas Monjalon <[email protected]>

Quoted 11 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Quoted 8 lines

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

I'm not sure what is best.
I will let others discuss this part.

#39 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 28 lines · Thomas Monjalon

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 26 lines

From: Thomas Monjalon <[email protected]>

Quoted 11 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

Quoted 7 lines
Quoted 4 lines

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Quoted 2 lines
#40 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

31/01/2023 17:17, Jerin Jacob:

Quoted 44 lines · Thomas Monjalon
Quoted 28 lines

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 26 lines

From: Thomas Monjalon <[email protected]>

Quoted 11 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

Quoted 7 lines
Quoted 4 lines

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

Quoted 7 lines

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

#41 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Thank you.

Quoted 58 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 44 lines · Thomas Monjalon
Quoted 28 lines

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 26 lines

From: Thomas Monjalon <[email protected]>

Quoted 11 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

Quoted 7 lines
Quoted 4 lines

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

Quoted 7 lines

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

#42 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 60 lines

Thank you.

Quoted 56 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 45 lines · Thomas Monjalon
Quoted 28 lines

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 26 lines

From: Thomas Monjalon <[email protected]>

Quoted 11 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 8 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE),  default fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 3 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement" like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE + RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

Quoted 8 lines
Quoted 5 lines

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example "
--rx-metadata") like other features to avoid calling another
command before rte flow create.

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

Quoted 7 lines

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

The key advantage of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster. I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#43 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 115 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 69 lines

Thank you.

Quoted 65 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 54 lines
Quoted 42 lines · Thomas Monjalon

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 31 lines

From: Thomas Monjalon <[email protected]>

Quoted 6 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 5 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Ferruh is proposing to have a command "port config <port_id> ..." to configure the flags to negotiate.
Are you OK with this approach?

Quoted 7 lines
Quoted 5 lines

Yes, we are fine to have such command to enable and disable the feature
with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced when dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

Quoted 7 lines

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

Quoted 5 lines

The key advantage of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

I think, there is a disconnect here. FAST_FREE is enabled by default. i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

Quoted 16 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#44 lore raw

RE: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 2 lines

From: Thomas Monjalon <[email protected]>

Quoted 1 line

Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature
with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 50 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

Quoted 5 lines

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 7 lines

I think, there is a disconnect here. FAST_FREE is enabled by default. i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Quoted 16 lines
Quoted 16 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#45 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

01/02/2023 10:00, Ori Kam:

Quoted 141 lines

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 2 lines

From: Thomas Monjalon <[email protected]>

Quoted 1 line

Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature
with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 50 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

Quoted 5 lines

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 7 lines

I think, there is a disconnect here. FAST_FREE is enabled by default. i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

Quoted 3 lines

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Let's not change the API please.

Quoted 17 lines
Quoted 16 lines
Quoted 16 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#46 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 136 lines · Thomas Monjalon

01/02/2023 10:00, Ori Kam:

Quoted 135 lines

Hi all,

Sorry for jumping in late,

Quoted 131 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 2 lines

From: Thomas Monjalon <[email protected]>

Quoted 1 line

Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature
with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 50 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

Quoted 5 lines

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

I think, there is a disconnect here. FAST_FREE is enabled by default.

Sorry, I'm lost here. Don't we need to enable FAST_FREE offload? As far as I know all offloads are disabled by default.

Quoted 43 lines
Quoted 9 lines
Quoted 6 lines

i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Let's not change the API please.

Quoted 17 lines
Quoted 16 lines
Quoted 16 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#47 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 137 lines · Andrew Rybchenko
Quoted 135 lines · Thomas Monjalon

01/02/2023 10:00, Ori Kam:

Quoted 134 lines

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 2 lines

From: Thomas Monjalon <[email protected]>

Quoted 1 line

Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the feature
with default being it disabled if supported by PMD. Is default being disabled fine if the feature is supported by a PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 55 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

I think, there is a disconnect here. FAST_FREE is enabled by default.

Sorry, I'm lost here. Don't we need to enable FAST_FREE offload? As far as I know all offloads are disabled by default.

Not the case for FAST_FREE as disabling needs "more cycles on processor" side.

See app/test-pmd/testpmd.c
/*
* Ethernet device configuration.
*/
struct rte_eth_rxmode rx_mode;

struct rte_eth_txmode tx_mode = {
.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
};

Quoted 45 lines
Quoted 44 lines
Quoted 10 lines
Quoted 7 lines

i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Let's not change the API please.

Quoted 17 lines
Quoted 16 lines
Quoted 16 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

So, I'd would vote to keeping the default value as is.

#48 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 152 lines · Jerin Jacob
Quoted 137 lines · Andrew Rybchenko
Quoted 135 lines · Thomas Monjalon

01/02/2023 10:00, Ori Kam:

Quoted 134 lines

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:

Quoted 2 lines

From: Thomas Monjalon <[email protected]>
Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the
feature
with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a
PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 55 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

I think, there is a disconnect here. FAST_FREE is enabled by default.

Sorry, I'm lost here. Don't we need to enable FAST_FREE offload? As far as I know all offloads are disabled by default.

Not the case for FAST_FREE as disabling needs "more cycles on processor" side.

See app/test-pmd/testpmd.c
/*
* Ethernet device configuration.
*/
struct rte_eth_rxmode rx_mode;

Quoted 4 lines

struct rte_eth_txmode tx_mode = {
.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
};

Surprised, thanks. So, it one more difference of the testpmd defaults from an abstract application.

Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 10 lines
Quoted 7 lines

i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Let's not change the API please.

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

So, I'd would vote to keeping the default value as is.

Two above paragraphs still stand.

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

#49 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 154 lines · Andrew Rybchenko
Quoted 152 lines · Jerin Jacob
Quoted 137 lines · Andrew Rybchenko
Quoted 135 lines · Thomas Monjalon

01/02/2023 10:00, Ori Kam:

Quoted 134 lines

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

27/01/2023 06:02, Nithin Kumar Dabilpuram:
From: Thomas Monjalon <[email protected]>
Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the
feature
with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a
PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 55 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 11 lines

dumping packets.

Quoted 4 lines

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double
enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Quoted 8 lines

Isn't it enough if

#1 We have enough print when rte_flow is being create without negotiation done and ask user to enable rx metadata using "port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example " --rx-metadata") like other features to avoid calling another command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

I think, there is a disconnect here. FAST_FREE is enabled by default.

Sorry, I'm lost here. Don't we need to enable FAST_FREE offload? As far as I know all offloads are disabled by default.

Not the case for FAST_FREE as disabling needs "more cycles on processor" side.

See app/test-pmd/testpmd.c
/*
* Ethernet device configuration.
*/
struct rte_eth_rxmode rx_mode;

Quoted 7 lines
Quoted 4 lines

struct rte_eth_txmode tx_mode = {
.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
};

Surprised, thanks. So, it one more difference of the testpmd defaults from an abstract application.

It is not, even l2fwd is same as testpmd. In my view, the ideal application just to select what is
really needed.

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 11 lines
Quoted 8 lines

i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Let's not change the API please.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

But none of the other applications in not negotiating by default.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

So, I'd would vote to keeping the default value as is.

Two above paragraphs still stand.

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

#50 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 225 lines · Jerin Jacob
Quoted 154 lines · Andrew Rybchenko
Quoted 152 lines · Jerin Jacob
Quoted 137 lines · Andrew Rybchenko
Quoted 135 lines · Thomas Monjalon

01/02/2023 10:00, Ori Kam:

Quoted 134 lines

Hi all,

Sorry for jumping in late,

Quoted 130 lines

-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, 1 February 2023 10:53

Quoted 36 lines · Andrew Rybchenko
Quoted 34 lines · Ivan Malov

Hello everyone,

Since making automatic, or implicit, offload decisions does not belong in testpmd responsibility domain, it should be safer to avoid calling the "negotiate metadata delivery" API with some default selection unless the user asks to do so explicitly, via internal CLI or app options.

With that in mind, port config <port_id> ... sounds OK.

PMDs that support flow primitives which can generate metadata but, if in started state, can't enable its delivery may pass appropriate rte_error messages to the user suggesting they enable delivery of such metadata from NIC to PMD first. This way, if the person operating testpmd enters a flow create command and that fails,
they can figure out the inconsistency, stop
the port, negotiate, start and try again.

As for non-debug applications, their developers shall be properly informed about the problem of enabling delivery of metadata from NIC to PMD. This way, they will invoke the negotiate API by default in their apps, with the feature selection (eg. MARK) as per nature of the app's business.

This API should indeed be helpful to some PMDs with regard to collecting upfront knowledge like this. At the same time, should be benign to those PMDs who do not need this knowledge and can enable delivery of metadata right when inserting the flow rules. So I hope the API does not create too much discomfort to vendors not needing it.

Quoted 6 lines
Quoted 6 lines

Thank you.

Quoted 2 lines · Thomas Monjalon

31/01/2023 17:17, Jerin Jacob:

Quoted 1 line

On Fri, Jan 27, 2023 at 8:31 PM Thomas Monjalon

<[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · wrote:

27/01/2023 11:42, Nithin Kumar Dabilpuram:

Quoted 4 lines

From: Thomas Monjalon <[email protected]>
27/01/2023 06:02, Nithin Kumar Dabilpuram:
From: Thomas Monjalon <[email protected]>
Ferruh is proposing to have a command "port config <port_id>

..."

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

to configure the flags to negotiate.
Are you OK with this approach?

Yes, we are fine to have such command to enable and disable the
feature
with default being it disabled if supported by PMD.
Is default being disabled fine if the feature is supported by a
PMD ?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

I think the default should be enabled for ease of use.

Since testpmd is used extensively for benchmarking purposes, we
thought it should have minimum features
enabled by default. The default testpmd doesn't have any Rx/Tx
offloads enabled(except for FAST FREE), default
fwd mode being "iofwd" and the Rx metadata is only referenced

when

Quoted 55 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 20 lines
Quoted 19 lines

dumping packets.

Do we have similar features disables by default?
I mean do we know features in testpmd which require a "double
enablement"
like one configuration command + one rte_flow rule?

Spec itself is that way i.e "RTE_FLOW_RULE +
RX_METADATA_NEGOTIATE(once)"

Isn't it enough if

#1 We have enough print when rte_flow is being create without
negotiation done and ask user to enable rx metadata using
"port config <port_id>..."
#2 Provide testpmd app arg to enable Rx metadata(for example "
--rx-metadata") like other features to avoid calling another
command before rte flow create.

Quoted 2 lines

I'm not sure what is best.
I will let others discuss this part.

IMO, enabling something always defeat the purpose to negotiate. IMO, someone needs to negotiate
for a feature if the feature is needed. I think, the double enablement is part of the spec itself. In case, The PMD
drivers won't like double enablement, no need to implement the PMD callback. That way, there is no change in the existing flow.

The reason why cnxk driver thought of leveraging negotiate() feature so that it helps for optimization. e.s.p
function template for multiprocess case as we know what features needed in fastpath upfront.

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

If there still concerns with patch we can take up this to TB decide one way or another to make forward progress. Let us know.

Ferruh, Andrew, Ori, Ivan, what is your opinion? Let's progress with this patch to make it in -rc1.

As I understand all agreed that we need testpmd command to control negotiated Rx metadata. May be even command-line option would be useful.

So, remaining question is what should be the default value in testpmd. Note that it is just testpmd question since default value in an abstract application is nothing negotiated (if I'm not mistaken).

The key advantaan ge of the current behaviour is to avoid "double-enabling" in testpmd. It preserves behaviour which we had before before the API addition. It is a strong argument. Basically it puts the feature into the same basket as FAST_FREE - need an action to run faster.

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

I think, there is a disconnect here. FAST_FREE is enabled by default.

Sorry, I'm lost here. Don't we need to enable FAST_FREE offload? As far as I know all offloads are disabled by default.

Not the case for FAST_FREE as disabling needs "more cycles on processor" side.

See app/test-pmd/testpmd.c
/*
* Ethernet device configuration.
*/
struct rte_eth_rxmode rx_mode;

Quoted 7 lines
Quoted 4 lines

struct rte_eth_txmode tx_mode = {
.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
};

Surprised, thanks. So, it one more difference of the testpmd defaults from an abstract application.

It is not, even l2fwd is same as testpmd. In my view, the ideal application just to select what is
really needed.

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 11 lines
Quoted 8 lines

i.e We don't need any specific action to run faster. To align with performance test application, by default the configuration should be run faster. User needs to give explicit configuration to allow more offload or the one causes the mpps drops. IMO, That is the theme followed in testpmd.

I agree with Andrew, the default should stay the same, as now, PMD may already implement logic to only enable the feature if there is a flow rule.
Changing the default will result in breaking applications.

That's not what is discussed here.
We are talking only about testpmd default.

Quoted 4 lines

I want to suggest new approach for this feature,
maybe we can use the rte_flow_configure, and add a new bit that says if those actions are going to be used.
What do you think?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Let's not change the API please.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

I see no problem in such approach.

The key disadvantage is the difference in testpmd and other applications default behaviour.

But none of the other applications in not negotiating by default.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

I'd look at the feature in the following way:
if an application theoretically wants to use USER_FLAG, USER_MARK or TUNNEL_ID it must negotiate corresponding Rx metadata to ensure that the feature is available and HW is informed that application may need it. Since testpmd supports corresponding flow API actions and flow tunnels, it tries to negotiate it by default, but do not fail if the negotiation fails.

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

So, I'd would vote to keeping the default value as is.

Two above paragraphs still stand.

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 5 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Yes, sfc could run faster if no Rx metadata are negotiated. So,
it is better to negotiate nothing by default. But it is always
painful to change defaults. You need to explain that now you
need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only. As an sfc maintainer I don't mind to change testpmd defaults.

#51 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 10 lines
Quoted 9 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

#52 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

Quoted 18 lines
Quoted 11 lines
Quoted 10 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#53 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 28 lines
Quoted 19 lines
Quoted 12 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#54 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 42 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

Quoted 8 lines

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

Quoted 29 lines
Quoted 28 lines
Quoted 19 lines
Quoted 12 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#55 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 52 lines · Jerin Jacob
Quoted 42 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

Quoted 8 lines

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()' to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for optimization purpose.

Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Quoted 20 lines
Quoted 13 lines
Quoted 7 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 5 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#56 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 81 lines · Ferruh Yigit
Quoted 52 lines · Jerin Jacob
Quoted 42 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

Quoted 8 lines

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()' to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 8 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for optimization purpose.

This won't solve concern I have outlined earlier[1].

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care about rte_eth_rx_metadata_negotiate().

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 24 lines
Quoted 17 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 5 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#57 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 91 lines · Jerin Jacob
Quoted 81 lines · Ferruh Yigit
Quoted 52 lines · Jerin Jacob
Quoted 42 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

Quoted 8 lines

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()' to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 8 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 5 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Quoted 5 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 45 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 24 lines
Quoted 17 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 5 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#58 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 103 lines · Ferruh Yigit
Quoted 91 lines · Jerin Jacob
Quoted 81 lines · Ferruh Yigit
Quoted 52 lines · Jerin Jacob
Quoted 42 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 9 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 8 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

Quoted 8 lines

I think it is reasonable to enable all Rx metadata by default in testpmd with a capability to disable it when wanted.

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()' to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 8 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 5 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Quoted 6 lines

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

Quoted 61 lines
Quoted 6 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 45 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 33 lines
Quoted 24 lines
Quoted 17 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 5 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#59 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 118 lines · Ivan Malov
Quoted 116 lines · Ferruh Yigit
Quoted 103 lines · Jerin Jacob
Quoted 90 lines · Ferruh Yigit
Quoted 60 lines · Jerin Jacob
Quoted 51 lines · Ferruh Yigit
Quoted 21 lines · Jerin Jacob
Quoted 16 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 6 lines
Quoted 6 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate
the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

Quoted 2 lines

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 9 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence
I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata
flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd
with a capability to disable it when wanted.

Quoted 6 lines

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in
testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()'
to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 10 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can
disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for
optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 6 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Quoted 9 lines
Quoted 6 lines

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

All other flow rules enabled by creating flow rule, but this one requires an API to enable it, so I believe it is inconsistent in that way.

From application perspective, assume that it doesn't know NIC details, should it call this API or not? Without API call should application assume Rx metadata flow rules are enabled or disabled?

As I understand intention is to get hint from application if it will require Rx metadata flow rules so that PMD can optimize better, but if PMD doesn't enable Rx metadata flow rules when this API call is missing than it becomes a mandatory API to configure the device. But I think it should be optional for optimization.

Also if application not sure to use this flow rule or not, it will by default enable all in any case, this will reduce the benefit. As done in testpmd.

API works in both ways, it request to enable some Rx metadata flow rule, but based on what PMD returns application can know what device supports, this also inconsistent with how other flow rules work, we don't have API to get capability but detect them via flow create/validate. Can there be a case API returns a flow rule negotiated, but it fails when tried to create the flow rule, isn't this confusing for application

I think if we continue this approach there can be multiple enable and capability learning APIs for various flow rules or flow rule groups, and this can make flow API much more harder to use for applications.

Quoted 65 lines
Quoted 65 lines
Quoted 7 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care
about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 48 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 27 lines
Quoted 19 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 7 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per
core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 7 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads.
Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#60 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 123 lines · Ferruh Yigit
Quoted 122 lines · Ivan Malov
Quoted 120 lines · Ferruh Yigit
Quoted 103 lines · Jerin Jacob
Quoted 90 lines · Ferruh Yigit
Quoted 60 lines · Jerin Jacob
Quoted 51 lines · Ferruh Yigit
Quoted 21 lines · Jerin Jacob
Quoted 16 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 6 lines
Quoted 6 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate
the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

Quoted 2 lines

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 9 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence
I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata
flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd
with a capability to disable it when wanted.

Quoted 6 lines

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in
testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()'
to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 10 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can
disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for
optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 6 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

All other flow rules enabled by creating flow rule, but this one

Hold on.. Did you just say "flow rules"? But this API is *not* about flow rules. I suggest you please re-read description of the API. It reads: "Negotiate the NIC's ability to deliver specific kinds of metadata to the PMD". Nothing about flows there.

Why is it decoupled from flow library this way? Because there is a drastic difference between generating and plumbing metadata INSIDE the NIC's flow engine, on the one hand, and delivering these data from the NIC to the host driver, on the other.

Let me explain. Say, one creates the following flow rules:

(a) flow create 0 transfer group 0 pattern [A] / end \
actions mark id XXX jump group 1 / end
(b) flow create 0 transfer group 0 pattern [B] / end \
actions mark id YYY jump group 1 / end

(c) flow create 0 transfer group 1 pattern mark id is XXX / end \
actions represented_port ethdev_id 1 / end
(d) flow create 0 transfer group 1 pattern mark id is YYY / end \
actions drop / end

In this example, metadata of type "MARK" is used to partition flow group (table) 1 into multiple lookup sections. So the mark value is GENERATED by the flow engine and then it is CONSUMED by this very flow engine. The application may NOT necessarily want to receive the mark with mbufs...

And it is only when the application wants these metadata DELIVERED to it that it has to call the negotiate API.

The short of it, nothing prevents the driver from accepting flow create requests that leverage some meta items/actions. Drivers do not need the negotiate API to *configure flow*. They only need this API in order to let the application choose whether metadata will be DELIVERED (!) or not.

Quoted 1 line

requires an API to enable it, so I believe it is inconsistent in that way.

Please see above. Everything is consistent as *flow library* and *negotiate metadata delivery* API are totally decoupled.

Quoted 4 lines

From application perspective, assume that it doesn't know NIC details, should it call this API or not? Without API call should application assume Rx metadata flow rules are enabled or disabled?

Frankly, applications like testpmd need never call this API. Simply because seeing, for example, MARK values in mbufs is useless to it. This API is needed by other applications. For example, OvS has partial MARK+RSS offload. It adds flows that distribute packets across multiple queues and set some MARK values for them. OvS is interested in getting this values with mbufs since they affect further lookups in software... So, OvS, knowing it wants these metadata DELIVERED (!), should invoke this metadata negotiate API to ensure that.

Quoted 4 lines

As I understand intention is to get hint from application if it will require Rx metadata flow rules so that PMD can optimize better, but if

No, nothing about flow rules. Just delivery of metadata with mbufs.

Quoted 1 line

PMD doesn't enable Rx metadata flow rules when this API call is missing

Again, PMD shall not make decisions on whether to enable or disable support for some FLOW primitives based on interactions via this API. This API exists solely to let PMD configure delivery of metadata, i.e. not the way it is generated in the first instance.

Quoted 6 lines

than it becomes a mandatory API to configure the device. But I think it should be optional for optimization.

Also if application not sure to use this flow rule or not, it will by default enable all in any case, this will reduce the benefit. As done in testpmd.

Please see above. PMD does not need this API, I take it.

Quoted 10 lines

API works in both ways, it request to enable some Rx metadata flow rule, but based on what PMD returns application can know what device supports, this also inconsistent with how other flow rules work, we don't have API to get capability but detect them via flow create/validate. Can there be a case API returns a flow rule negotiated, but it fails when tried to create the flow rule, isn't this confusing for application

Quoted 3 lines

I think if we continue this approach there can be multiple enable and capability learning APIs for various flow rules or flow rule groups, and this can make flow API much more harder to use for applications.

See my explanations above. This API is not about flows. Period.

Quoted 70 lines
Quoted 68 lines
Quoted 68 lines
Quoted 10 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care
about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 48 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 27 lines
Quoted 19 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 7 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per
core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 7 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads.
Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#61 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

I apologise, there was a typo in the previous mail: "PMD does not need this API". Should read as "TESTPMD does not need it".

Thank you.

Quoted 301 lines · Ivan Malov
Quoted 123 lines · Ferruh Yigit
Quoted 122 lines · Ivan Malov
Quoted 120 lines · Ferruh Yigit
Quoted 103 lines · Jerin Jacob
Quoted 90 lines · Ferruh Yigit
Quoted 60 lines · Jerin Jacob
Quoted 51 lines · Ferruh Yigit
Quoted 21 lines · Jerin Jacob
Quoted 16 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so
important if we have a way to change it. Reasons should be
really strong to change existing defaults.

Quoted 6 lines
Quoted 6 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate
the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

Quoted 2 lines

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 9 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence
I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata
flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd
with a capability to disable it when wanted.

Quoted 6 lines

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in
testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()'
to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 10 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can
disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for
optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 6 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

All other flow rules enabled by creating flow rule, but this one

Hold on.. Did you just say "flow rules"? But this API is *not* about flow rules. I suggest you please re-read description of the API. It reads: "Negotiate the NIC's ability to deliver specific kinds of metadata to the PMD". Nothing about flows there.

Why is it decoupled from flow library this way? Because there is a drastic difference between generating and plumbing metadata INSIDE the NIC's flow engine, on the one hand, and delivering these data from the NIC to the host driver, on the other.

Let me explain. Say, one creates the following flow rules:

(a) flow create 0 transfer group 0 pattern [A] / end \
actions mark id XXX jump group 1 / end
(b) flow create 0 transfer group 0 pattern [B] / end \
actions mark id YYY jump group 1 / end

(c) flow create 0 transfer group 1 pattern mark id is XXX / end \
actions represented_port ethdev_id 1 / end
(d) flow create 0 transfer group 1 pattern mark id is YYY / end \
actions drop / end

In this example, metadata of type "MARK" is used to partition flow group (table) 1 into multiple lookup sections. So the mark value is GENERATED by the flow engine and then it is CONSUMED by this very flow engine. The application may NOT necessarily want to receive the mark with mbufs...

And it is only when the application wants these metadata DELIVERED to it that it has to call the negotiate API.

The short of it, nothing prevents the driver from accepting flow create requests that leverage some meta items/actions. Drivers do not need the negotiate API to *configure flow*. They only need this API in order to let the application choose whether metadata will be DELIVERED (!) or not.

Quoted 1 line

requires an API to enable it, so I believe it is inconsistent in that way.

Please see above. Everything is consistent as *flow library* and *negotiate metadata delivery* API are totally decoupled.

Quoted 4 lines

From application perspective, assume that it doesn't know NIC details, should it call this API or not? Without API call should application assume Rx metadata flow rules are enabled or disabled?

Frankly, applications like testpmd need never call this API. Simply because seeing, for example, MARK values in mbufs is useless to it. This API is needed by other applications. For example, OvS has partial MARK+RSS offload. It adds flows that distribute packets across multiple queues and set some MARK values for them. OvS is interested in getting this values with mbufs since they affect further lookups in software... So, OvS, knowing it wants these metadata DELIVERED (!), should invoke this metadata negotiate API to ensure that.

Quoted 4 lines

As I understand intention is to get hint from application if it will require Rx metadata flow rules so that PMD can optimize better, but if

No, nothing about flow rules. Just delivery of metadata with mbufs.

Quoted 1 line

PMD doesn't enable Rx metadata flow rules when this API call is missing

Again, PMD shall not make decisions on whether to enable or disable support for some FLOW primitives based on interactions via this API. This API exists solely to let PMD configure delivery of metadata, i.e. not the way it is generated in the first instance.

Quoted 6 lines

than it becomes a mandatory API to configure the device. But I think it should be optional for optimization.

Also if application not sure to use this flow rule or not, it will by default enable all in any case, this will reduce the benefit. As done in testpmd.

Please see above. PMD does not need this API, I take it.

Quoted 10 lines

API works in both ways, it request to enable some Rx metadata flow rule, but based on what PMD returns application can know what device supports, this also inconsistent with how other flow rules work, we don't have API to get capability but detect them via flow create/validate. Can there be a case API returns a flow rule negotiated, but it fails when tried to create the flow rule, isn't this confusing for application

Quoted 3 lines

I think if we continue this approach there can be multiple enable and capability learning APIs for various flow rules or flow rule groups, and this can make flow API much more harder to use for applications.

See my explanations above. This API is not about flows. Period.

Quoted 70 lines
Quoted 68 lines
Quoted 68 lines
Quoted 10 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care
about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 48 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 27 lines
Quoted 19 lines
Quoted 11 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 7 lines

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per
core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 7 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads.
Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#62 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

OK we are progressing on this topic :)

02/02/2023 11:48, Ivan Malov:

Quoted 2 lines

I apologise, there was a typo in the previous mail: "PMD does not need this API". Should read as "TESTPMD does not need it".

testpmd needs all ethdev API,
because its purpose is to test the whole all ethdev API.

Maybe the use of this function is misplaced in testpmd. It should be a specific command.
By the way, what is the driver default if negotiation is not done?

Quoted 303 lines · Ivan Malov
Quoted 301 lines · Ferruh Yigit
Quoted 124 lines · Ivan Malov
Quoted 122 lines · Ferruh Yigit
Quoted 121 lines · Jerin Jacob
Quoted 103 lines
Quoted 90 lines · Ferruh Yigit
Quoted 60 lines · Jerin Jacob
Quoted 51 lines · Ferruh Yigit
Quoted 21 lines · Jerin Jacob
Quoted 16 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines

On Wed, Feb 1, 2023 at 2:59 PM Andrew Rybchenko
<[email protected]> wrote:
Frankly speaking I don't understand why default value is so
important if we have a way to change it. Reasons should be
really strong to change existing defaults.

Quoted 6 lines
Quoted 6 lines

The only reason is, typically testpmd will be used performance
benchmarking as an industry standard. It is difficult to
tell/educate
the QA or customers
that, "BTW if you need to get better performance add more flag to
testpmd command line".

Quoted 2 lines

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 9 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence
I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata
flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd
with a capability to disable it when wanted.

Quoted 6 lines

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in
testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()'
to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 10 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can
disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for
optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 6 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

All other flow rules enabled by creating flow rule, but this one

Hold on.. Did you just say "flow rules"? But this API is *not* about flow rules. I suggest you please re-read description of the API. It reads: "Negotiate the NIC's ability to deliver specific kinds of metadata to the PMD". Nothing about flows there.

Why is it decoupled from flow library this way? Because there is a drastic difference between generating and plumbing metadata INSIDE the NIC's flow engine, on the one hand, and delivering these data from the NIC to the host driver, on the other.

Let me explain. Say, one creates the following flow rules:

(a) flow create 0 transfer group 0 pattern [A] / end \
actions mark id XXX jump group 1 / end
(b) flow create 0 transfer group 0 pattern [B] / end \
actions mark id YYY jump group 1 / end

(c) flow create 0 transfer group 1 pattern mark id is XXX / end \
actions represented_port ethdev_id 1 / end
(d) flow create 0 transfer group 1 pattern mark id is YYY / end \
actions drop / end

In this example, metadata of type "MARK" is used to partition flow group (table) 1 into multiple lookup sections. So the mark value is GENERATED by the flow engine and then it is CONSUMED by this very flow engine. The application may NOT necessarily want to receive the mark with mbufs...

And it is only when the application wants these metadata DELIVERED to it that it has to call the negotiate API.

The short of it, nothing prevents the driver from accepting flow create requests that leverage some meta items/actions. Drivers do not need the negotiate API to *configure flow*. They only need this API in order to let the application choose whether metadata will be DELIVERED (!) or not.

Quoted 1 line

requires an API to enable it, so I believe it is inconsistent in that way.

Please see above. Everything is consistent as *flow library* and *negotiate metadata delivery* API are totally decoupled.

Quoted 4 lines

From application perspective, assume that it doesn't know NIC details, should it call this API or not? Without API call should application assume Rx metadata flow rules are enabled or disabled?

Frankly, applications like testpmd need never call this API. Simply because seeing, for example, MARK values in mbufs is useless to it. This API is needed by other applications. For example, OvS has partial MARK+RSS offload. It adds flows that distribute packets across multiple queues and set some MARK values for them. OvS is interested in getting this values with mbufs since they affect further lookups in software... So, OvS, knowing it wants these metadata DELIVERED (!), should invoke this metadata negotiate API to ensure that.

Quoted 4 lines

As I understand intention is to get hint from application if it will require Rx metadata flow rules so that PMD can optimize better, but if

No, nothing about flow rules. Just delivery of metadata with mbufs.

Quoted 1 line

PMD doesn't enable Rx metadata flow rules when this API call is missing

Again, PMD shall not make decisions on whether to enable or disable support for some FLOW primitives based on interactions via this API. This API exists solely to let PMD configure delivery of metadata, i.e. not the way it is generated in the first instance.

Quoted 6 lines

than it becomes a mandatory API to configure the device. But I think it should be optional for optimization.

Also if application not sure to use this flow rule or not, it will by default enable all in any case, this will reduce the benefit. As done in testpmd.

Please see above. PMD does not need this API, I take it.

Quoted 10 lines

API works in both ways, it request to enable some Rx metadata flow rule, but based on what PMD returns application can know what device supports, this also inconsistent with how other flow rules work, we don't have API to get capability but detect them via flow create/validate. Can there be a case API returns a flow rule negotiated, but it fails when tried to create the flow rule, isn't this confusing for application

Quoted 3 lines

I think if we continue this approach there can be multiple enable and capability learning APIs for various flow rules or flow rule groups, and this can make flow API much more harder to use for applications.

See my explanations above. This API is not about flows. Period.

Quoted 70 lines
Quoted 68 lines
Quoted 68 lines
Quoted 10 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care
about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 48 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 27 lines
Quoted 19 lines
Quoted 18 lines

To make that worst, only some PMD needs to give the additional
parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the
situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact
the per
core performance of sfc or
is it just PCI bandwidth thing which really dont show any
difference in testpmd?

Quoted 7 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads.
Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#63 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 1 line · Thomas Monjalon

OK we are progressing on this topic :)

Indeed we are.

Quoted 7 lines

02/02/2023 11:48, Ivan Malov:

Quoted 2 lines

I apologise, there was a typo in the previous mail: "PMD does not need this API". Should read as "TESTPMD does not need it".

testpmd needs all ethdev API,
because its purpose is to test the whole all ethdev API.

Touché.

Quoted 3 lines

Maybe the use of this function is misplaced in testpmd. It should be a specific command.

So.. indeed. A specific command which, as I said, is invoked explicitly by the person operating testpmd.

Quoted 1 line

By the way, what is the driver default if negotiation is not done?

The answer is in the question. It's the driver's default. If the driver believes it shall NOT deliver metadata for the sake of improved performance, default = all disabled. If this delivery is a don't care to performance, then the driver might want to enable everything by default.

This decision is made by a PMD maintainer, I take it.

Quoted 311 lines
Quoted 305 lines · Ivan Malov
Quoted 301 lines · Ferruh Yigit
Quoted 124 lines · Ivan Malov
Quoted 122 lines · Ferruh Yigit
Quoted 121 lines · Jerin Jacob
Quoted 103 lines
Quoted 90 lines · Ferruh Yigit
Quoted 60 lines · Jerin Jacob
Quoted 51 lines · Ferruh Yigit
Quoted 21 lines · Jerin Jacob
Quoted 16 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 13 lines · Jerin Jacob

On Wed, Feb 1, 2023 at 2:59 PM Andrew Rybchenko
<[email protected]> wrote:
Frankly speaking I don't understand why default value is so
important if we have a way to change it. Reasons should be
really strong to change existing defaults.

The only reason is, typically testpmd will be used performance
benchmarking as an industry standard. It is difficult to
tell/educate
the QA or customers
that, "BTW if you need to get better performance add more flag to
testpmd command line".

Quoted 2 lines

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 9 lines

IMO, We tune the system resources like queue depth not the disabling features for raw performance.
queue depth etc people know to tune so it is obvious. What is not obvious is, testpmd only
negotiated some features by default.I am not using that feature, hence
I need to explicitly
disable it.

When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I believe that is the case for almost all applications since API is a relatively new one, PMD default behavior should be to enable Rx metadata
flow rules, in case user requests them later.

So, enabling all in application is same with not calling the API at all.

In this perspective, disabling Rx metadata is additional optimization/tuning that application can do if it is sure that Rx metadata flow rules won't be used at all.
And API is more meaningful when it is used to disable Rx metadata.

I think it is reasonable to enable all Rx metadata by default in testpmd
with a capability to disable it when wanted.

Quoted 6 lines

OR

May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in
testpmd, it is only called when it is requested explicitly from user, enable or disable.

Quoted 8 lines

Second option looks good to me.
When
1) user request for action which is needed negotiate(), AND
2) rte_eth_rx_metadata_negotiate() != ENOSUP then, testpmd print a warning that need to enable rte_eth_rx_metadata_negotiate().

We are not suggesting same thing.

What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality.

As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created.

With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()'
to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call.

Quoted 10 lines

Instead what I was trying to suggest is reverse,
all PMDs enable the Rx metadata flow rule by default, and don't require double enabling.
But if application knows that it won't use Rx metadata flow rule, it can
disable it to optimize the performance.
This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for
optimization purpose.

Quoted 2 lines

This won't solve concern I have outlined earlier[1].

Yes, it won't.

Quoted 6 lines

I think, The part of the problem there is no enough adaption of rte_eth_rx_metadata_negotiate(),

The view is total different from PMD maintainer PoV vs testpmd application PoV.

Agree,
and I assume it is different for user application too, which may prioritize consistency and portability.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Overall, I am not fan of the 'rte_eth_rx_metadata_negotiate()' API, I think it is confusing.

Forgive me, in which way is it confusing?

All other flow rules enabled by creating flow rule, but this one

Hold on.. Did you just say "flow rules"? But this API is *not* about flow rules. I suggest you please re-read description of the API. It reads: "Negotiate the NIC's ability to deliver specific kinds of metadata to the PMD". Nothing about flows there.

Why is it decoupled from flow library this way? Because there is a drastic difference between generating and plumbing metadata INSIDE the NIC's flow engine, on the one hand, and delivering these data from the NIC to the host driver, on the other.

Let me explain. Say, one creates the following flow rules:

(a) flow create 0 transfer group 0 pattern [A] / end \
actions mark id XXX jump group 1 / end
(b) flow create 0 transfer group 0 pattern [B] / end \
actions mark id YYY jump group 1 / end

(c) flow create 0 transfer group 1 pattern mark id is XXX / end \
actions represented_port ethdev_id 1 / end
(d) flow create 0 transfer group 1 pattern mark id is YYY / end \
actions drop / end

In this example, metadata of type "MARK" is used to partition flow group (table) 1 into multiple lookup sections. So the mark value is GENERATED by the flow engine and then it is CONSUMED by this very flow engine. The application may NOT necessarily want to receive the mark with mbufs...

And it is only when the application wants these metadata DELIVERED to it that it has to call the negotiate API.

The short of it, nothing prevents the driver from accepting flow create requests that leverage some meta items/actions. Drivers do not need the negotiate API to *configure flow*. They only need this API in order to let the application choose whether metadata will be DELIVERED (!) or not.

Quoted 1 line

requires an API to enable it, so I believe it is inconsistent in that way.

Please see above. Everything is consistent as *flow library* and *negotiate metadata delivery* API are totally decoupled.

Quoted 4 lines

From application perspective, assume that it doesn't know NIC details, should it call this API or not? Without API call should application assume Rx metadata flow rules are enabled or disabled?

Frankly, applications like testpmd need never call this API. Simply because seeing, for example, MARK values in mbufs is useless to it. This API is needed by other applications. For example, OvS has partial MARK+RSS offload. It adds flows that distribute packets across multiple queues and set some MARK values for them. OvS is interested in getting this values with mbufs since they affect further lookups in software... So, OvS, knowing it wants these metadata DELIVERED (!), should invoke this metadata negotiate API to ensure that.

Quoted 4 lines

As I understand intention is to get hint from application if it will require Rx metadata flow rules so that PMD can optimize better, but if

No, nothing about flow rules. Just delivery of metadata with mbufs.

Quoted 1 line

PMD doesn't enable Rx metadata flow rules when this API call is missing

Again, PMD shall not make decisions on whether to enable or disable support for some FLOW primitives based on interactions via this API. This API exists solely to let PMD configure delivery of metadata, i.e. not the way it is generated in the first instance.

Quoted 6 lines

than it becomes a mandatory API to configure the device. But I think it should be optional for optimization.

Also if application not sure to use this flow rule or not, it will by default enable all in any case, this will reduce the benefit. As done in testpmd.

Please see above. PMD does not need this API, I take it.

Quoted 10 lines

API works in both ways, it request to enable some Rx metadata flow rule, but based on what PMD returns application can know what device supports, this also inconsistent with how other flow rules work, we don't have API to get capability but detect them via flow create/validate. Can there be a case API returns a flow rule negotiated, but it fails when tried to create the flow rule, isn't this confusing for application

Quoted 3 lines

I think if we continue this approach there can be multiple enable and capability learning APIs for various flow rules or flow rule groups, and this can make flow API much more harder to use for applications.

See my explanations above. This API is not about flows. Period.

Quoted 70 lines
Quoted 68 lines
Quoted 68 lines
Quoted 10 lines

Just to avoid back and forth. We will call off this patch and remove rte_eth_rx_metadata_negotiate()
PMD callback from cnxk driver. Keep it as old behavior, so we don't need to care
about rte_eth_rx_metadata_negotiate().

When you remove 'rx_metadata_negotiate' callback, what will be the PMD behavior? I assume PMD will do the required preparations as if all Rx metadata is enabled.
And what is the performance impact, is removing callback improve the performance?

Quoted 48 lines

[1]
The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".
To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 36 lines
Quoted 27 lines
Quoted 26 lines

To make that worst, only some PMD needs to give the additional
parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the
situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact
the per
core performance of sfc or
is it just PCI bandwidth thing which really dont show any
difference in testpmd?

Yes, sfc could run faster if no Rx metadata are negotiated. So,
it is better to negotiate nothing by default. But it is always
painful to change defaults. You need to explain that now you
need to negotiate Rx metadata to use mark, flag and tunnel
offloads.
Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

if you see MBUF_FAST_FREE, it does nothing. Actually, !MBUF_FAST_FREE is doing more work.

Quoted 2 lines
#64 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

02/02/2023 12:55, Ivan Malov:

Quoted 25 lines · Thomas Monjalon
Quoted 2 lines

OK we are progressing on this topic :)

Indeed we are.

Quoted 7 lines

02/02/2023 11:48, Ivan Malov:

Quoted 2 lines

I apologise, there was a typo in the previous mail: "PMD does not need this API". Should read as "TESTPMD does not need it".

testpmd needs all ethdev API,
because its purpose is to test the whole all ethdev API.

Touché.

Quoted 3 lines

Maybe the use of this function is misplaced in testpmd. It should be a specific command.

So.. indeed. A specific command which, as I said, is invoked explicitly by the person operating testpmd.

Quoted 1 line

By the way, what is the driver default if negotiation is not done?

Quoted 7 lines

The answer is in the question. It's the driver's default. If the driver believes it shall NOT deliver metadata for the sake of improved performance, default = all disabled. If this delivery is a don't care to performance, then the driver might want to enable everything by default.

This decision is made by a PMD maintainer, I take it.

I think it is better to have the same default for all drivers. What others think?

#65 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 32 lines · Thomas Monjalon

02/02/2023 12:55, Ivan Malov:

Quoted 31 lines · Thomas Monjalon
Quoted 2 lines

OK we are progressing on this topic :)

Indeed we are.

Quoted 7 lines

02/02/2023 11:48, Ivan Malov:

Quoted 2 lines

I apologise, there was a typo in the previous mail: "PMD does not need this API". Should read as "TESTPMD does not need it".

testpmd needs all ethdev API,
because its purpose is to test the whole all ethdev API.

Touché.

Quoted 3 lines

Maybe the use of this function is misplaced in testpmd. It should be a specific command.

So.. indeed. A specific command which, as I said, is invoked explicitly by the person operating testpmd.

Quoted 1 line

By the way, what is the driver default if negotiation is not done?

The answer is in the question. It's the driver's default. If the driver believes it shall NOT deliver metadata for the sake of improved performance, default = all disabled. If this delivery is a don't care to performance, then the driver might want to enable everything by default.

Quoted 4 lines
Quoted 1 line

This decision is made by a PMD maintainer, I take it.

I think it is better to have the same default for all drivers. What others think?

Of course, it would be better since it would simplify porting apps from one NIC to another.
The problem is that some NICs do not require negotiation since corresponding data is always available.
If so, the same default should be to provide all Rx metadata by default. However, it would decrease performance for NIC NICs with default settings.

(Similar situation is with Rx checksum offload. Some NICs always calculate Rx checksum and always provide results, however, it is not a good reason to require it for all NICs.)

#66 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

In reply to Thomas Monjalon

Hi Thomas,

Quoted 34 lines · Thomas Monjalon

01/02/2023 11:58, Andrew Rybchenko:

Quoted 7 lines · Jerin Jacob
Quoted 6 lines
Quoted 3 lines · Andrew Rybchenko

Frankly speaking I don't understand why default value is so important if we have a way to change it. Reasons should be really strong to change existing defaults.

Quoted 5 lines
Quoted 5 lines

The only reason is, typically testpmd will be used performance benchmarking as an industry standard. It is difficult to tell/educate the QA or customers
that, "BTW if you need to get better performance add more flag to testpmd command line".

I disagree.
When you do performance benchmark, you tune settings accordingly.

Quoted 10 lines
Quoted 9 lines

To make that worst, only some PMD needs to give the additional parameter to get better number.
And also, testpmd usage will be treated as application modeling.

Since this feature only used on sfc and cnxk driver, What is the situation with sfc driver?
Keeping it as negotiated and not use the feature, will impact the per core performance of sfc or
is it just PCI bandwidth thing which really dont show any difference in testpmd?

Quoted 6 lines

Yes, sfc could run faster if no Rx metadata are negotiated. So, it is better to negotiate nothing by default. But it is always painful to change defaults. You need to explain that now you need to negotiate Rx metadata to use mark, flag and tunnel offloads. Yes, it will be required on sfc and cnxk only.
As an sfc maintainer I don't mind to change testpmd defaults.

Quoted 2 lines

If we change testpmd defaults to "do nothing",
then we should disable MBUF_FAST_FREE as well.

No. These are completely different. MBUF_FAST_FREE is an optimisation technique, it's in the offload namespace. Whilst "negotiate metadata" does not offload anything. It just tells the PMD to enable *delivery* of some data *when it is present*. And whether it will be present or not, - this is decided by flow actions. And, flow actions, in turn, belong in the domain of decisions made by a specific person operating the application. So no need to remove FAST_FREE.

Quoted 3 lines
#67 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

In reply to Hanumanth Reddy Pothula
Quoted 37 lines · Hanumanth Reddy Pothula

++ Ivan Malov and Andrew Rybchenko

Quoted 35 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, January 24, 2023 11:34 PM
To: Hanumanth Reddy Pothula <[email protected]>; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>
Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

External Email

----------------------------------------------------------------------

Quoted 11 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Quoted 8 lines
Quoted 3 lines

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

Purpose looks like to 'negotiate', so it is both ways:
a) To learn Rx Meta capability of HW
b) To configure Rx Meta feature for HW

So it is both to help application to learn what flow rule is supported and to help driver to improve performance.

Before this API application assumed all Rx metadata flow rules are supported, so why enabling all causing performance drop, that was the default without this API.

But other-way around can be true, to disable some offloads can improve driver performance.

Looking again,

Quoted 7 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

We can update the driver if the purpose of this API is clear.

Hi Hanumanth,

After looking the history of the API again, you may be right.

One of the previous version commit log describes the intention better [1], because of negative performance impact of enabling Rx metadata offload by default and difficulty to switch configuration dynamically, there is a desire to learn application intention before configuration.

Although I have some concerns with this API [2] it is already there as stable API.

So it sounds reasonable to make this configurable for a test application, indeed intention of the API is to get this configuration from application and operate based on it.

Next question is what should be the default value, I am not sure about it, there are only a few drivers impacted from this overall. For the Thomas' point, it helps to test the feature of its impact if it is enabled by default.

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

Thanks,
ferruh

[1]
https://inbox.dpdk.org/dev/[email protected]/

[2]
API does two things:
a) Learn Rx Meta capability of HW
b) Configure Rx Meta feature for HW

Functionality (a) conflicts with rest of the flow rules that capability checked via rte_flow_validate() API.

Functionality (b) conflicts with configuring flow actions, this configuration should be controlled by flow rule not with a specific API, although I understand the reasoning behind the API.

RSS_HASH offload seems given example in the discussions but it is still controlled via offload flag, there is no specific API to configure RSS hash functionality, same could be done here.
[/2]

#68 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

Quoted 54 lines · Ferruh Yigit
Quoted 37 lines · Hanumanth Reddy Pothula

++ Ivan Malov and Andrew Rybchenko

Quoted 35 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, January 24, 2023 11:34 PM
To: Hanumanth Reddy Pothula <[email protected]>; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>
Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

External Email

----------------------------------------------------------------------

Quoted 11 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Quoted 8 lines
Quoted 3 lines

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

Purpose looks like to 'negotiate', so it is both ways:
a) To learn Rx Meta capability of HW
b) To configure Rx Meta feature for HW

So it is both to help application to learn what flow rule is supported and to help driver to improve performance.

Quoted 9 lines

Before this API application assumed all Rx metadata flow rules are supported, so why enabling all causing performance drop, that was the default without this API.

But other-way around can be true, to disable some offloads can improve driver performance.

Looking again,

please ignore this email, it has unfinished draft reply by mistake, I will send a new one.

Quoted 60 lines
Quoted 8 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

We can update the driver if the purpose of this API is clear.

Hi Hanumanth,

After looking the history of the API again, you may be right.

One of the previous version commit log describes the intention better [1], because of negative performance impact of enabling Rx metadata offload by default and difficulty to switch configuration dynamically, there is a desire to learn application intention before configuration.

Although I have some concerns with this API [2] it is already there as stable API.

So it sounds reasonable to make this configurable for a test application, indeed intention of the API is to get this configuration from application and operate based on it.

Next question is what should be the default value, I am not sure about it, there are only a few drivers impacted from this overall. For the Thomas' point, it helps to test the feature of its impact if it is enabled by default.

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

Thanks,
ferruh

[1]
https://inbox.dpdk.org/dev/[email protected]/

[2]
API does two things:
a) Learn Rx Meta capability of HW
b) Configure Rx Meta feature for HW

Functionality (a) conflicts with rest of the flow rules that capability checked via rte_flow_validate() API.

Functionality (b) conflicts with configuring flow actions, this configuration should be controlled by flow rule not with a specific API, although I understand the reasoning behind the API.

RSS_HASH offload seems given example in the discussions but it is still controlled via offload flag, there is no specific API to configure RSS hash functionality, same could be done here.
[/2]

#69 lore raw

Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

In reply to Hanumanth Reddy Pothula
Quoted 45 lines · Hanumanth Reddy Pothula

++ Ivan Malov and Andrew Rybchenko

Quoted 31 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, January 24, 2023 11:34 PM
To: Hanumanth Reddy Pothula <[email protected]>; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>
Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation

External Email

----------------------------------------------------------------------

Quoted 11 lines · Hanumanth Pothula

Presently, Rx metadata is sent to PMD by default, leading to a performance drop as processing for the same in Rx path takes extra cycles.

Hence, add new testpmd command,
'enable port <port_id> nic_to_pmd_rx_metadata'

This command helps in sending Rx metadata to PMD and thereby Rx metadata flow command requests are processed.

Hi Hanumanth,

I agree with Thomas for the patch.

Quoted 7 lines

'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be enabled, but at this stage if there is no flow rule for Rx metadata why it is consuming extra cycles?

Can you update driver code to process Rx metadata when it is enabled by application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least one flow rule for it?

#1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. We thought it was added so that when that metadata is not needed, application need not call this thereby saving cycles/bandwidth.

Quoted 7 lines

#2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags.

#3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have an option to enable it. In this case, testpmd is by default calling this negotiation.

We can update the driver if the purpose of this API is clear.

Hi Hanumanth,

After looking the history of the API again, you may be right.

One of the previous version commit log describes the intention better [1], because of negative performance impact of enabling Rx metadata offload by default and difficulty to switch configuration dynamically, there is a desire to learn application intention before configuration.

Although I have some concerns with this API [2] it is already there as stable API.

So it sounds reasonable to make this configurable for a test application, indeed intention of the API is to get this configuration from application and operate based on it.

Next question is what should be the default value, I am not sure about it, there are only a few drivers impacted from this overall. For the Thomas' point, it helps to test the feature of its impact if it is enabled by default.

Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API?

Thanks,
ferruh

[1]
https://inbox.dpdk.org/dev/[email protected]/

[2]
API does two things:
a) Learn Rx Meta capability of HW
b) Configure Rx Meta feature for HW

Functionality (a) conflicts with rest of the flow rules that capability checked via rte_flow_validate() API.

Functionality (b) conflicts with configuring flow actions, this configuration should be controlled by flow rule not with a specific API, although I understand the reasoning behind the API.

RSS_HASH offload seems given example in the discussions but it is still controlled via offload flag, there is no specific API to configure RSS hash functionality, same could be done here.
[/2]

#70 lore raw

RE: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset

In reply to Hanumanth Pothula

Ping

Quoted 56 lines

-----Original Message-----
From: Hanumanth Pothula <[email protected]>
Sent: Wednesday, December 21, 2022 7:37 AM
To: Thomas Monjalon <[email protected]>; Ferruh Yigit <[email protected]>; Andrew Rybchenko <[email protected]>
Cc: [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Hanumanth Reddy Pothula <[email protected]>
Subject: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset

Presently, on device reset, ethdev configuration state, dev_configured, is not reset.

On device reset, reset ethdev configuration state to make sure device reconfiguration happens cleanly.

---
v5:
- Move nic-to-pmd-rx-metadata declaration to struct rte_port.
v4:
- As per spec rte_eth_rx_metadata_negotiate() is processed only when dev_configured is set. Hence can't enable automatically when a flow command requests metadata.
- Add new testpmd command to allow NIC to PMD Rx metadata
negotiation.
v3:
- Updated run_app.rst with the new command line argument, nic-to-pmd-rx-metadata.
- Updated commit text.
v2:
- taken cared alignment issues
- renamed command line argument from rx-metadata to nic-to-pmd-rx-
metadata
- renamed variable name from rx-metadata to nic_to_pmd_rx_metadata

---
 lib/ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
lib/ethdev/rte_ethdev.c index renamed from lib/ethdev/rte_ethdev.c +0 -0

5d5e18db1e..18c59044bc 100644

lib/ethdev/rte_ethdev.c +2 -1
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
 			port_id, rte_strerror(-ret));
 	}
 	ret = dev->dev_ops->dev_reset(dev);
+	if (!ret)
+		dev->data->dev_configured = 0;
 
 	return eth_err(port_id, ret);
 }
--

2.25.1

#71 lore raw

Re: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset

In reply to Hanumanth Pothula

21/12/2022 03:07, Hanumanth Pothula:

Quoted 7 lines

Presently, on device reset, ethdev configuration state, dev_configured, is not reset.

On device reset, reset ethdev configuration state to make sure device reconfiguration happens cleanly.

A "Fixes" line is missing to show the root cause and help backports.

lib/ethdev/rte_ethdev.c rte_eth_dev_reset(uint16_t port_id) · line 1632

Quoted 7 lines
lib/ethdev/rte_ethdev.c +1 -0
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
 			port_id, rte_strerror(-ret));
 	}
 	ret = dev->dev_ops->dev_reset(dev);
+	if (!ret)

Should be if (ret == 0)

Quoted 1 line
lib/ethdev/rte_ethdev.c +1 -0
+		dev->data->dev_configured = 0;
#72 lore raw

Re: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset

Quoted 11 lines · Thomas Monjalon

21/12/2022 03:07, Hanumanth Pothula:

Quoted 7 lines

Presently, on device reset, ethdev configuration state, dev_configured, is not reset.

On device reset, reset ethdev configuration state to make sure device reconfiguration happens cleanly.

A "Fixes" line is missing to show the root cause and help backports.

It should be following, that is when 'dev_configured' flag is introduced but not updated in 'rte_eth_dev_reset()':

Fixes 02edbfab1e7d ("ethdev: add dev configured flag")

@Hanumanth, can you please send a new version with above fixes line and below syntax fix?

Quoted 14 lines

lib/ethdev/rte_ethdev.c rte_eth_dev_reset(uint16_t port_id) · line 1632

Quoted 7 lines
lib/ethdev/rte_ethdev.c +1 -0
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
 			port_id, rte_strerror(-ret));
 	}
 	ret = dev->dev_ops->dev_reset(dev);
+	if (!ret)

Should be if (ret == 0)

Quoted 1 line
lib/ethdev/rte_ethdev.c +1 -0
+		dev->data->dev_configured = 0;