Skip to contentSkip to conversation

Split driver specific commands out of testpmd

RFC PATCH Superseded David Marchand 9 participants 65 messages May 13, 2022 – Aug 25, 2022 Page 3 of 3

Subsystems (3)
lore
Share & tools
lore
#41 lore raw

PATCH v2 1/1 net/i40e: move testpmd commands

In reply to David Marchand

Move related specific testpmd commands into this driver directory. While at it, fix checkpatch warnings.

---
Changes since v1:
- rebased on next-net,
- updated link in documentation to directly point at commands,

Changes since RFC v2:
- updated documentation,
- fixed some indent,

Changes since RFC v1:
- moved more i40e commands,
- fixed checkpatch warnings,

---
 app/test-pmd/cmdline.c                      | 5438 +++++--------------
 app/test-pmd/config.c                       |   43 -
 app/test-pmd/testpmd.h                      |    2 -
 doc/guides/nics/i40e.rst                    |  186 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  178 +-
 drivers/net/i40e/i40e_testpmd.c             | 2634 +++++++++
 drivers/net/i40e/meson.build                |    2 +
 7 files changed, 4185 insertions(+), 4298 deletions(-)
 create mode 100644 drivers/net/i40e/i40e_testpmd.c
app/test-pmd/cmdline.c +1363 -4075
index a59e6166d5..23cf663d3f 100644
@@ -196,21 +196,12 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"read txd (port_id) (queue_id) (txd_id)\n"
 			"    Display a TX descriptor of a port TX queue.\n\n"
 
-			"ddp get list (port_id)\n"
-			"    Get ddp profile info list\n\n"
-
-			"ddp get info (profile_path)\n"
-			"    Get ddp profile information.\n\n"
-
 			"show vf stats (port_id) (vf_id)\n"
 			"    Display a VF's statistics.\n\n"
 
 			"clear vf stats (port_id) (vf_id)\n"
 			"    Reset a VF's statistics.\n\n"
 
-			"show port (port_id) pctype mapping\n"
-			"    Get flow ptype to pctype mapping on a port\n\n"
-
 			"show port meter stats (port_id) (meter_id) (clear)\n"
 			"    Get meter stats on a port\n\n"
 
@@ -366,9 +357,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)\n"
 			"    Configure MACsec secure association (SA).\n\n"
 
-			"set vf broadcast (port_id) (vf_id) (on|off)\n"
-			"    Set VF broadcast for a VF from the PF.\n\n"
-
 			"vlan set stripq (on|off) (port_id,queue_id)\n"
 			"    Set the VLAN strip for a queue on a port.\n\n"
 
@@ -381,21 +369,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set vf vlan antispoof (port_id) (vf_id) (on|off)\n"
 			"    Set VLAN antispoof for a VF from the PF.\n\n"
 
-			"set vf vlan tag (port_id) (vf_id) (on|off)\n"
-			"    Set VLAN tag for a VF from the PF.\n\n"
-
-			"set vf tx max-bandwidth (port_id) (vf_id) (bandwidth)\n"
-			"    Set a VF's max bandwidth(Mbps).\n\n"
-
-			"set vf tc tx min-bandwidth (port_id) (vf_id) (bw1, bw2, ...)\n"
-			"    Set all TCs' min bandwidth(%%) on a VF.\n\n"
-
-			"set vf tc tx max-bandwidth (port_id) (vf_id) (tc_no) (bandwidth)\n"
-			"    Set a TC's max bandwidth(Mbps) on a VF.\n\n"
-
-			"set tx strict-link-priority (port_id) (tc_bitmap)\n"
-			"    Set some TCs' strict link priority mode on a physical port.\n\n"
-
 			"set tc tx min-bandwidth (port_id) (bw1, bw2, ...)\n"
 			"    Set all TCs' min bandwidth(%%) for all PF and VFs.\n\n"
 
@@ -524,12 +497,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set allmulti (port_id|all) (on|off)\n"
 			"    Set the allmulti mode on port_id, or all.\n\n"
 
-			"set vf promisc (port_id) (vf_id) (on|off)\n"
-			"    Set unicast promiscuous mode for a VF from the PF.\n\n"
-
-			"set vf allmulti (port_id) (vf_id) (on|off)\n"
-			"    Set multicast promiscuous mode for a VF from the PF.\n\n"
-
 			"set flow_ctrl rx (on|off) tx (on|off) (high_water)"
 			" (low_water) (pause_time) (send_xon) mac_ctrl_frame_fwd"
 			" (on|off) autoneg (on|off) (port_id)\n"
@@ -661,42 +628,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set link-down port (port_id)\n"
 			"	Set link down for a port.\n\n"
 
-			"ddp add (port_id) (profile_path[,backup_profile_path])\n"
-			"    Load a profile package on a port\n\n"
-
-			"ddp del (port_id) (backup_profile_path)\n"
-			"    Delete a profile package from a port\n\n"
-
-			"ptype mapping get (port_id) (valid_only)\n"
-			"    Get ptype mapping on a port\n\n"
-
-			"ptype mapping replace (port_id) (target) (mask) (pky_type)\n"
-			"    Replace target with the pkt_type in ptype mapping\n\n"
-
-			"ptype mapping reset (port_id)\n"
-			"    Reset ptype mapping on a port\n\n"
-
-			"ptype mapping update (port_id) (hw_ptype) (sw_ptype)\n"
-			"    Update a ptype mapping item on a port\n\n"
-
 			"set port (port_id) ptype_mask (ptype_mask)\n"
 			"    set packet types classification for a specific port\n\n"
 
-			"set port (port_id) queue-region region_id (value) "
-			"queue_start_index (value) queue_num (value)\n"
-			"    Set a queue region on a port\n\n"
-
-			"set port (port_id) queue-region region_id (value) "
-			"flowtype (value)\n"
-			"    Set a flowtype region index on a port\n\n"
-
-			"set port (port_id) queue-region UP (value) region_id (value)\n"
-			"    Set the mapping of User Priority to "
-			"queue region on a port\n\n"
-
-			"set port (port_id) queue-region flush (on|off)\n"
-			"    flush all queue region related configuration\n\n"
-
 			"show port meter cap (port_id)\n"
 			"    Show port meter capability information\n\n"
 
@@ -747,9 +681,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set port meter stats mask (port_id) (mtr_id) (stats_mask)\n"
 			"    meter update stats\n\n"
 
-			"show port (port_id) queue-region\n"
-			"    show all queue region related configuration info\n\n"
-
 			"set port (port_id) fec_mode auto|off|rs|baser\n"
 			"    set fec mode for a specific port\n\n"
 
@@ -846,22 +777,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"port (port_id) (rxq|txq) (queue_id) setup\n"
 			"    Setup a rx/tx queue of port X.\n\n"
 
-			"port config (port_id) pctype mapping reset\n"
-			"    Reset flow type to pctype mapping on a port\n\n"
-
-			"port config (port_id) pctype mapping update"
-			" (pctype_id_0[,pctype_id_1]*) (flow_type_id)\n"
-			"    Update a flow type to pctype mapping item on a port\n\n"
-
-			"port config (port_id) pctype (pctype_id) hash_inset|"
-			"fdir_inset|fdir_flx_inset get|set|clear field\n"
-			" (field_idx)\n"
-			"    Configure RSS|FDIR|FDIR_FLX input set for some pctype\n\n"
-
-			"port config (port_id) pctype (pctype_id) hash_inset|"
-			"fdir_inset|fdir_flx_inset clear all"
-			"    Clear RSS|FDIR|FDIR_FLX input set completely for some pctype\n\n"
-
 			"port config (port_id) udp_tunnel_port add|rm vxlan|geneve|ecpri (udp_port)\n\n"
 			"    Add/remove UDP tunnel port for tunneling offload\n\n"
 
@@ -957,13 +872,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"filters:\n"
 			"--------\n\n"
 
-#ifdef RTE_NET_I40E
-			"flow_director_filter (port_id) mode raw (add|del|update)"
-			" flow (flow_id) (drop|fwd) queue (queue_id)"
-			" fd_id (fd_id_value) packet (packet file name)\n"
-			"    Add/Del a raw type flow director filter.\n\n"
-#endif
-
 			"flow_director_mask (port_id) mode IP vlan (vlan_value)"
 			" src_mask (ipv4_src) (ipv6_src) (src_port)"
 			" dst_mask (ipv4_dst) (ipv6_dst) (dst_port)\n"
@@ -10125,450 +10033,6 @@ static cmdline_parse_inst_t cmd_dump_one = {
 	},
 };
 
-/* *** queue region set *** */
-struct cmd_queue_region_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t port;
-	portid_t port_id;
-	cmdline_fixed_string_t cmd;
-	cmdline_fixed_string_t region;
-	uint8_t  region_id;
-	cmdline_fixed_string_t queue_start_index;
-	uint8_t  queue_id;
-	cmdline_fixed_string_t queue_num;
-	uint8_t  queue_num_value;
-};
-
-static void
-cmd_queue_region_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_queue_region_result *res = parsed_result;
-	int ret = -ENOTSUP;
-#ifdef RTE_NET_I40E
-	struct rte_pmd_i40e_queue_region_conf region_conf;
-	enum rte_pmd_i40e_queue_region_op op_type;
-#endif
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	memset(&region_conf, 0, sizeof(region_conf));
-	op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_SET;
-	region_conf.region_id = res->region_id;
-	region_conf.queue_num = res->queue_num_value;
-	region_conf.queue_start_index = res->queue_id;
-
-	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id,
-				op_type, &region_conf);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented or supported\n");
-		break;
-	default:
-		fprintf(stderr, "queue region config error: (%s)\n",
-			strerror(-ret));
-	}
-}
-
-static cmdline_parse_token_string_t cmd_queue_region_set =
-TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result,
-		set, "set");
-static cmdline_parse_token_string_t cmd_queue_region_port =
-	TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result, port, "port");
-static cmdline_parse_token_num_t cmd_queue_region_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_queue_region_result,
-				port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_queue_region_cmd =
-	TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result,
-				 cmd, "queue-region");
-static cmdline_parse_token_string_t cmd_queue_region_id =
-	TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result,
-				region, "region_id");
-static cmdline_parse_token_num_t cmd_queue_region_index =
-	TOKEN_NUM_INITIALIZER(struct cmd_queue_region_result,
-				region_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_queue_region_queue_start_index =
-	TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result,
-				queue_start_index, "queue_start_index");
-static cmdline_parse_token_num_t cmd_queue_region_queue_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_queue_region_result,
-				queue_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_queue_region_queue_num =
-	TOKEN_STRING_INITIALIZER(struct cmd_queue_region_result,
-				queue_num, "queue_num");
-static cmdline_parse_token_num_t cmd_queue_region_queue_num_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_queue_region_result,
-				queue_num_value, RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_queue_region = {
-	.f = cmd_queue_region_parsed,
-	.data = NULL,
-	.help_str = "set port <port_id> queue-region region_id <value> "
-		"queue_start_index <value> queue_num <value>: Set a queue region",
-	.tokens = {
-		(void *)&cmd_queue_region_set,
-		(void *)&cmd_queue_region_port,
-		(void *)&cmd_queue_region_port_id,
-		(void *)&cmd_queue_region_cmd,
-		(void *)&cmd_queue_region_id,
-		(void *)&cmd_queue_region_index,
-		(void *)&cmd_queue_region_queue_start_index,
-		(void *)&cmd_queue_region_queue_id,
-		(void *)&cmd_queue_region_queue_num,
-		(void *)&cmd_queue_region_queue_num_value,
-		NULL,
-	},
-};
-
-/* *** queue region and flowtype set *** */
-struct cmd_region_flowtype_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t port;
-	portid_t port_id;
-	cmdline_fixed_string_t cmd;
-	cmdline_fixed_string_t region;
-	uint8_t  region_id;
-	cmdline_fixed_string_t flowtype;
-	uint8_t  flowtype_id;
-};
-
-static void
-cmd_region_flowtype_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_region_flowtype_result *res = parsed_result;
-	int ret = -ENOTSUP;
-#ifdef RTE_NET_I40E
-	struct rte_pmd_i40e_queue_region_conf region_conf;
-	enum rte_pmd_i40e_queue_region_op op_type;
-#endif
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	memset(&region_conf, 0, sizeof(region_conf));
-
-	op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_FLOWTYPE_SET;
-	region_conf.region_id = res->region_id;
-	region_conf.hw_flowtype = res->flowtype_id;
-
-	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id,
-			op_type, &region_conf);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented or supported\n");
-		break;
-	default:
-		fprintf(stderr, "region flowtype config error: (%s)\n",
-			strerror(-ret));
-	}
-}
-
-static cmdline_parse_token_string_t cmd_region_flowtype_set =
-TOKEN_STRING_INITIALIZER(struct cmd_region_flowtype_result,
-				set, "set");
-static cmdline_parse_token_string_t cmd_region_flowtype_port =
-	TOKEN_STRING_INITIALIZER(struct cmd_region_flowtype_result,
-				port, "port");
-static cmdline_parse_token_num_t cmd_region_flowtype_port_index =
-	TOKEN_NUM_INITIALIZER(struct cmd_region_flowtype_result,
-				port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_region_flowtype_cmd =
-	TOKEN_STRING_INITIALIZER(struct cmd_region_flowtype_result,
-				cmd, "queue-region");
-static cmdline_parse_token_string_t cmd_region_flowtype_index =
-	TOKEN_STRING_INITIALIZER(struct cmd_region_flowtype_result,
-				region, "region_id");
-static cmdline_parse_token_num_t cmd_region_flowtype_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_region_flowtype_result,
-				region_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_region_flowtype_flow_index =
-	TOKEN_STRING_INITIALIZER(struct cmd_region_flowtype_result,
-				flowtype, "flowtype");
-static cmdline_parse_token_num_t cmd_region_flowtype_flow_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_region_flowtype_result,
-				flowtype_id, RTE_UINT8);
-static cmdline_parse_inst_t cmd_region_flowtype = {
-	.f = cmd_region_flowtype_parsed,
-	.data = NULL,
-	.help_str = "set port <port_id> queue-region region_id <value> "
-		"flowtype <value>: Set a flowtype region index",
-	.tokens = {
-		(void *)&cmd_region_flowtype_set,
-		(void *)&cmd_region_flowtype_port,
-		(void *)&cmd_region_flowtype_port_index,
-		(void *)&cmd_region_flowtype_cmd,
-		(void *)&cmd_region_flowtype_index,
-		(void *)&cmd_region_flowtype_id,
-		(void *)&cmd_region_flowtype_flow_index,
-		(void *)&cmd_region_flowtype_flow_id,
-		NULL,
-	},
-};
-
-/* *** User Priority (UP) to queue region (region_id) set *** */
-struct cmd_user_priority_region_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t port;
-	portid_t port_id;
-	cmdline_fixed_string_t cmd;
-	cmdline_fixed_string_t user_priority;
-	uint8_t  user_priority_id;
-	cmdline_fixed_string_t region;
-	uint8_t  region_id;
-};
-
-static void
-cmd_user_priority_region_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_user_priority_region_result *res = parsed_result;
-	int ret = -ENOTSUP;
-#ifdef RTE_NET_I40E
-	struct rte_pmd_i40e_queue_region_conf region_conf;
-	enum rte_pmd_i40e_queue_region_op op_type;
-#endif
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	memset(&region_conf, 0, sizeof(region_conf));
-	op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_USER_PRIORITY_SET;
-	region_conf.user_priority = res->user_priority_id;
-	region_conf.region_id = res->region_id;
-
-	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id,
-				op_type, &region_conf);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented or supported\n");
-		break;
-	default:
-		fprintf(stderr, "user_priority region config error: (%s)\n",
-			strerror(-ret));
-	}
-}
-
-static cmdline_parse_token_string_t cmd_user_priority_region_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_user_priority_region_result,
-				set, "set");
-static cmdline_parse_token_string_t cmd_user_priority_region_port =
-	TOKEN_STRING_INITIALIZER(struct cmd_user_priority_region_result,
-				port, "port");
-static cmdline_parse_token_num_t cmd_user_priority_region_port_index =
-	TOKEN_NUM_INITIALIZER(struct cmd_user_priority_region_result,
-				port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_user_priority_region_cmd =
-	TOKEN_STRING_INITIALIZER(struct cmd_user_priority_region_result,
-				cmd, "queue-region");
-static cmdline_parse_token_string_t cmd_user_priority_region_UP =
-	TOKEN_STRING_INITIALIZER(struct cmd_user_priority_region_result,
-				user_priority, "UP");
-static cmdline_parse_token_num_t cmd_user_priority_region_UP_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_user_priority_region_result,
-				user_priority_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_user_priority_region_region =
-	TOKEN_STRING_INITIALIZER(struct cmd_user_priority_region_result,
-				region, "region_id");
-static cmdline_parse_token_num_t cmd_user_priority_region_region_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_user_priority_region_result,
-				region_id, RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_user_priority_region = {
-	.f = cmd_user_priority_region_parsed,
-	.data = NULL,
-	.help_str = "set port <port_id> queue-region UP <value> "
-		"region_id <value>: Set the mapping of User Priority (UP) "
-		"to queue region (region_id) ",
-	.tokens = {
-		(void *)&cmd_user_priority_region_set,
-		(void *)&cmd_user_priority_region_port,
-		(void *)&cmd_user_priority_region_port_index,
-		(void *)&cmd_user_priority_region_cmd,
-		(void *)&cmd_user_priority_region_UP,
-		(void *)&cmd_user_priority_region_UP_id,
-		(void *)&cmd_user_priority_region_region,
-		(void *)&cmd_user_priority_region_region_id,
-		NULL,
-	},
-};
-
-/* *** flush all queue region related configuration *** */
-struct cmd_flush_queue_region_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t port;
-	portid_t port_id;
-	cmdline_fixed_string_t cmd;
-	cmdline_fixed_string_t flush;
-	cmdline_fixed_string_t what;
-};
-
-static void
-cmd_flush_queue_region_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_flush_queue_region_result *res = parsed_result;
-	int ret = -ENOTSUP;
-#ifdef RTE_NET_I40E
-	struct rte_pmd_i40e_queue_region_conf region_conf;
-	enum rte_pmd_i40e_queue_region_op op_type;
-#endif
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	memset(&region_conf, 0, sizeof(region_conf));
-
-	if (strcmp(res->what, "on") == 0)
-		op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON;
-	else
-		op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF;
-
-	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id,
-				op_type, &region_conf);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented or supported\n");
-		break;
-	default:
-		fprintf(stderr, "queue region config flush error: (%s)\n",
-			strerror(-ret));
-	}
-}
-
-static cmdline_parse_token_string_t cmd_flush_queue_region_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_flush_queue_region_result,
-				set, "set");
-static cmdline_parse_token_string_t cmd_flush_queue_region_port =
-	TOKEN_STRING_INITIALIZER(struct cmd_flush_queue_region_result,
-				port, "port");
-static cmdline_parse_token_num_t cmd_flush_queue_region_port_index =
-	TOKEN_NUM_INITIALIZER(struct cmd_flush_queue_region_result,
-				port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flush_queue_region_cmd =
-	TOKEN_STRING_INITIALIZER(struct cmd_flush_queue_region_result,
-				cmd, "queue-region");
-static cmdline_parse_token_string_t cmd_flush_queue_region_flush =
-	TOKEN_STRING_INITIALIZER(struct cmd_flush_queue_region_result,
-				flush, "flush");
-static cmdline_parse_token_string_t cmd_flush_queue_region_what =
-	TOKEN_STRING_INITIALIZER(struct cmd_flush_queue_region_result,
-				what, "on#off");
-
-static cmdline_parse_inst_t cmd_flush_queue_region = {
-	.f = cmd_flush_queue_region_parsed,
-	.data = NULL,
-	.help_str = "set port <port_id> queue-region flush on|off"
-		": flush all queue region related configuration",
-	.tokens = {
-		(void *)&cmd_flush_queue_region_set,
-		(void *)&cmd_flush_queue_region_port,
-		(void *)&cmd_flush_queue_region_port_index,
-		(void *)&cmd_flush_queue_region_cmd,
-		(void *)&cmd_flush_queue_region_flush,
-		(void *)&cmd_flush_queue_region_what,
-		NULL,
-	},
-};
-
-/* *** get all queue region related configuration info *** */
-struct cmd_show_queue_region_info {
-	cmdline_fixed_string_t show;
-	cmdline_fixed_string_t port;
-	portid_t port_id;
-	cmdline_fixed_string_t cmd;
-};
-
-static void
-cmd_show_queue_region_info_parsed(void *parsed_result,
-			__rte_unused struct cmdline *cl,
-			__rte_unused void *data)
-{
-	struct cmd_show_queue_region_info *res = parsed_result;
-	int ret = -ENOTSUP;
-#ifdef RTE_NET_I40E
-	struct rte_pmd_i40e_queue_regions rte_pmd_regions;
-	enum rte_pmd_i40e_queue_region_op op_type;
-#endif
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	memset(&rte_pmd_regions, 0, sizeof(rte_pmd_regions));
-
-	op_type = RTE_PMD_I40E_RSS_QUEUE_REGION_INFO_GET;
-
-	ret = rte_pmd_i40e_rss_queue_region_conf(res->port_id,
-					op_type, &rte_pmd_regions);
-
-	port_queue_region_info_display(res->port_id, &rte_pmd_regions);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented or supported\n");
-		break;
-	default:
-		fprintf(stderr, "queue region config info show error: (%s)\n",
-			strerror(-ret));
-	}
-}
-
-static cmdline_parse_token_string_t cmd_show_queue_region_info_get =
-TOKEN_STRING_INITIALIZER(struct cmd_show_queue_region_info,
-				show, "show");
-static cmdline_parse_token_string_t cmd_show_queue_region_info_port =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_queue_region_info,
-				port, "port");
-static cmdline_parse_token_num_t cmd_show_queue_region_info_port_index =
-	TOKEN_NUM_INITIALIZER(struct cmd_show_queue_region_info,
-				port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_show_queue_region_info_cmd =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_queue_region_info,
-				cmd, "queue-region");
-
-static cmdline_parse_inst_t cmd_show_queue_region_info_all = {
-	.f = cmd_show_queue_region_info_parsed,
-	.data = NULL,
-	.help_str = "show port <port_id> queue-region"
-		": show all queue region related configuration info",
-	.tokens = {
-		(void *)&cmd_show_queue_region_info_get,
-		(void *)&cmd_show_queue_region_info_port,
-		(void *)&cmd_show_queue_region_info_port_index,
-		(void *)&cmd_show_queue_region_info_cmd,
-		NULL,
-	},
-};
-
 /* *** Filters Control *** */
 
 #define IPV4_ADDR_TO_UINT(ip_addr, ip) \
@@ -10593,197 +10057,9 @@ do { \
 	} \
 } while (0)
 
-#ifdef RTE_NET_I40E
-
-static uint16_t
-str2flowtype(char *string)
-{
-	uint8_t i = 0;
-	static const struct {
-		char str[32];
-		uint16_t type;
-	} flowtype_str[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"ipv6-ex", RTE_ETH_FLOW_IPV6_EX},
-		{"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX},
-		{"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX},
-		{"gtpu", RTE_ETH_FLOW_GTPU},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str); i++) {
-		if (!strcmp(flowtype_str[i].str, string))
-			return flowtype_str[i].type;
-	}
-
-	if (isdigit(string[0]) && atoi(string) > 0 && atoi(string) < 64)
-		return (uint16_t)atoi(string);
-
-	return RTE_ETH_FLOW_UNKNOWN;
-}
-
-/* *** deal with flow director filter *** */
-struct cmd_flow_director_result {
-	cmdline_fixed_string_t flow_director_filter;
-	portid_t port_id;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t mode_value;
-	cmdline_fixed_string_t ops;
-	cmdline_fixed_string_t flow;
-	cmdline_fixed_string_t flow_type;
-	cmdline_fixed_string_t drop;
-	cmdline_fixed_string_t queue;
-	uint16_t  queue_id;
-	cmdline_fixed_string_t fd_id;
-	uint32_t  fd_id_value;
-	cmdline_fixed_string_t packet;
-	char filepath[];
-};
-
-static void
-cmd_flow_director_filter_parsed(void *parsed_result,
-			  __rte_unused struct cmdline *cl,
-			  __rte_unused void *data)
-{
-	struct cmd_flow_director_result *res = parsed_result;
-	int ret = 0;
-	struct rte_pmd_i40e_flow_type_mapping
-			mapping[RTE_PMD_I40E_FLOW_TYPE_MAX];
-	struct rte_pmd_i40e_pkt_template_conf conf;
-	uint16_t flow_type = str2flowtype(res->flow_type);
-	uint16_t i, port = res->port_id;
-	uint8_t add;
-
-	memset(&conf, 0, sizeof(conf));
-
-	if (flow_type == RTE_ETH_FLOW_UNKNOWN) {
-		fprintf(stderr, "Invalid flow type specified.\n");
-		return;
-	}
-	ret = rte_pmd_i40e_flow_type_mapping_get(res->port_id,
-						 mapping);
-	if (ret)
-		return;
-	if (mapping[flow_type].pctype == 0ULL) {
-		fprintf(stderr, "Invalid flow type specified.\n");
-		return;
-	}
-	for (i = 0; i < RTE_PMD_I40E_PCTYPE_MAX; i++) {
-		if (mapping[flow_type].pctype & (1ULL << i)) {
-			conf.input.pctype = i;
-			break;
-		}
-	}
-
-	conf.input.packet = open_file(res->filepath,
-				&conf.input.length);
-	if (!conf.input.packet)
-		return;
-	if (!strcmp(res->drop, "drop"))
-		conf.action.behavior =
-			RTE_PMD_I40E_PKT_TEMPLATE_REJECT;
-	else
-		conf.action.behavior =
-			RTE_PMD_I40E_PKT_TEMPLATE_ACCEPT;
-	conf.action.report_status =
-			RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID;
-	conf.action.rx_queue = res->queue_id;
-	conf.soft_id = res->fd_id_value;
-	add  = strcmp(res->ops, "del") ? 1 : 0;
-	ret = rte_pmd_i40e_flow_add_del_packet_template(port,
-							&conf,
-							add);
-	if (ret < 0)
-		fprintf(stderr, "flow director config error: (%s)\n",
-			strerror(-ret));
-	close_file(conf.input.packet);
-}
-
-static cmdline_parse_token_string_t cmd_flow_director_filter =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 flow_director_filter, "flow_director_filter");
-static cmdline_parse_token_num_t cmd_flow_director_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
-			      port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_ops =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 ops, "add#del#update");
-static cmdline_parse_token_string_t cmd_flow_director_flow =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 flow, "flow");
-static cmdline_parse_token_string_t cmd_flow_director_flow_type =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-		flow_type, NULL);
-static cmdline_parse_token_string_t cmd_flow_director_drop =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 drop, "drop#fwd");
-static cmdline_parse_token_string_t cmd_flow_director_queue =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 queue, "queue");
-static cmdline_parse_token_num_t cmd_flow_director_queue_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
-			      queue_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_fd_id =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 fd_id, "fd_id");
-static cmdline_parse_token_num_t cmd_flow_director_fd_id_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
-			      fd_id_value, RTE_UINT32);
-
-static cmdline_parse_token_string_t cmd_flow_director_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 mode, "mode");
-static cmdline_parse_token_string_t cmd_flow_director_mode_raw =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 mode_value, "raw");
-static cmdline_parse_token_string_t cmd_flow_director_packet =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 packet, "packet");
-static cmdline_parse_token_string_t cmd_flow_director_filepath =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
-				 filepath, NULL);
-
-static cmdline_parse_inst_t cmd_add_del_raw_flow_director = {
-	.f = cmd_flow_director_filter_parsed,
-	.data = NULL,
-	.help_str = "flow_director_filter ... : Add or delete a raw flow "
-		"director entry on NIC",
-	.tokens = {
-		(void *)&cmd_flow_director_filter,
-		(void *)&cmd_flow_director_port_id,
-		(void *)&cmd_flow_director_mode,
-		(void *)&cmd_flow_director_mode_raw,
-		(void *)&cmd_flow_director_ops,
-		(void *)&cmd_flow_director_flow,
-		(void *)&cmd_flow_director_flow_type,
-		(void *)&cmd_flow_director_drop,
-		(void *)&cmd_flow_director_queue,
-		(void *)&cmd_flow_director_queue_id,
-		(void *)&cmd_flow_director_fd_id,
-		(void *)&cmd_flow_director_fd_id_value,
-		(void *)&cmd_flow_director_packet,
-		(void *)&cmd_flow_director_filepath,
-		NULL,
-	},
-};
-
-#endif /* RTE_NET_I40E */
-
-/* *** deal with flow director mask *** */
-struct cmd_flow_director_mask_result {
-	cmdline_fixed_string_t flow_director_mask;
+/* *** deal with flow director mask *** */
+struct cmd_flow_director_mask_result {
+	cmdline_fixed_string_t flow_director_mask;
 	portid_t port_id;
 	cmdline_fixed_string_t mode;
 	cmdline_fixed_string_t mode_value;
@@ -12390,249 +11666,121 @@ static cmdline_parse_inst_t cmd_set_macsec_sa = {
 	},
 };
 
-/* VF unicast promiscuous mode configuration */
-
-/* Common result structure for VF unicast promiscuous mode */
-struct cmd_vf_promisc_result {
+/* Common definition of VF and TC TX bandwidth configuration */
+struct cmd_vf_tc_bw_result {
 	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t promisc;
+	cmdline_fixed_string_t tc;
+	cmdline_fixed_string_t tx;
+	cmdline_fixed_string_t min_bw;
 	portid_t port_id;
-	uint32_t vf_id;
-	cmdline_fixed_string_t on_off;
+	cmdline_fixed_string_t bw_list;
 };
 
-/* Common CLI fields for VF unicast promiscuous mode enable disable */
-static cmdline_parse_token_string_t cmd_vf_promisc_set =
+static cmdline_parse_token_string_t cmd_vf_tc_bw_set =
 	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_promisc_result,
+		(struct cmd_vf_tc_bw_result,
 		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_promisc_vf =
+static cmdline_parse_token_string_t cmd_vf_tc_bw_tc =
 	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_promisc_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_promisc_promisc =
+		(struct cmd_vf_tc_bw_result,
+		 tc, "tc");
+static cmdline_parse_token_string_t cmd_vf_tc_bw_tx =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_vf_tc_bw_result,
+		 tx, "tx");
+static cmdline_parse_token_string_t cmd_vf_tc_bw_min_bw =
 	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_promisc_result,
-		 promisc, "promisc");
-static cmdline_parse_token_num_t cmd_vf_promisc_port_id =
+		(struct cmd_vf_tc_bw_result,
+		 min_bw, "min-bandwidth");
+static cmdline_parse_token_num_t cmd_vf_tc_bw_port_id =
 	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_promisc_result,
+		(struct cmd_vf_tc_bw_result,
 		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_promisc_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_promisc_result,
-		 vf_id, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_vf_promisc_on_off =
+static cmdline_parse_token_string_t cmd_vf_tc_bw_bw_list =
 	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_promisc_result,
-		 on_off, "on#off");
+		(struct cmd_vf_tc_bw_result,
+		 bw_list, NULL);
 
-static void
-cmd_set_vf_promisc_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
+static int
+vf_tc_min_bw_parse_bw_list(uint8_t *bw_list,
+			   uint8_t *tc_num,
+			   char *str)
 {
-	struct cmd_vf_promisc_result *res = parsed_result;
-	int ret = -ENOTSUP;
-
-	__rte_unused int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_unicast_promisc(res->port_id,
-						  res->vf_id, is_on);
-#endif
+	uint32_t size;
+	const char *p, *p0 = str;
+	char s[256];
+	char *end;
+	char *str_fld[16];
+	uint16_t i;
+	int ret;
 
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d\n", res->vf_id);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+	p = strchr(p0, '(');
+	if (p == NULL) {
+		fprintf(stderr,
+			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
+		return -1;
 	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_promisc = {
-	.f = cmd_set_vf_promisc_parsed,
-	.data = NULL,
-	.help_str = "set vf promisc <port_id> <vf_id> on|off: "
-		"Set unicast promiscuous mode for a VF from the PF",
-	.tokens = {
-		(void *)&cmd_vf_promisc_set,
-		(void *)&cmd_vf_promisc_vf,
-		(void *)&cmd_vf_promisc_promisc,
-		(void *)&cmd_vf_promisc_port_id,
-		(void *)&cmd_vf_promisc_vf_id,
-		(void *)&cmd_vf_promisc_on_off,
-		NULL,
-	},
-};
-
-/* VF multicast promiscuous mode configuration */
-
-/* Common result structure for VF multicast promiscuous mode */
-struct cmd_vf_allmulti_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t allmulti;
-	portid_t port_id;
-	uint32_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
+	p++;
+	p0 = strchr(p, ')');
+	if (p0 == NULL) {
+		fprintf(stderr,
+			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
+		return -1;
+	}
+	size = p0 - p;
+	if (size >= sizeof(s)) {
+		fprintf(stderr,
+			"The string size exceeds the internal buffer size\n");
+		return -1;
+	}
+	snprintf(s, sizeof(s), "%.*s", size, p);
+	ret = rte_strsplit(s, sizeof(s), str_fld, 16, ',');
+	if (ret <= 0) {
+		fprintf(stderr, "Failed to get the bandwidth list.\n");
+		return -1;
+	}
+	*tc_num = ret;
+	for (i = 0; i < ret; i++)
+		bw_list[i] = (uint8_t)strtoul(str_fld[i], &end, 0);
 
-/* Common CLI fields for VF multicast promiscuous mode enable disable */
-static cmdline_parse_token_string_t cmd_vf_allmulti_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_allmulti_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_allmulti_allmulti =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 allmulti, "allmulti");
-static cmdline_parse_token_num_t cmd_vf_allmulti_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_allmulti_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 vf_id, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_vf_allmulti_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_allmulti_result,
-		 on_off, "on#off");
+	return 0;
+}
 
 static void
-cmd_set_vf_allmulti_parsed(
+cmd_tc_min_bw_parsed(
 	void *parsed_result,
 	__rte_unused struct cmdline *cl,
 	__rte_unused void *data)
 {
-	struct cmd_vf_allmulti_result *res = parsed_result;
+	struct cmd_vf_tc_bw_result *res = parsed_result;
+	struct rte_port *port;
+	uint8_t tc_num;
+	uint8_t bw[16];
 	int ret = -ENOTSUP;
 
-	__rte_unused int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
 	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
 		return;
 
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_multicast_promisc(res->port_id,
-						    res->vf_id, is_on);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d\n", res->vf_id);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+	port = &ports[res->port_id];
+	/** Check if the port is not started **/
+	if (port->port_status != RTE_PORT_STOPPED) {
+		fprintf(stderr, "Please stop port %d first\n", res->port_id);
+		return;
 	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_allmulti = {
-	.f = cmd_set_vf_allmulti_parsed,
-	.data = NULL,
-	.help_str = "set vf allmulti <port_id> <vf_id> on|off: "
-		"Set multicast promiscuous mode for a VF from the PF",
-	.tokens = {
-		(void *)&cmd_vf_allmulti_set,
-		(void *)&cmd_vf_allmulti_vf,
-		(void *)&cmd_vf_allmulti_allmulti,
-		(void *)&cmd_vf_allmulti_port_id,
-		(void *)&cmd_vf_allmulti_vf_id,
-		(void *)&cmd_vf_allmulti_on_off,
-		NULL,
-	},
-};
-
-/* vf broadcast mode configuration */
-
-/* Common result structure for vf broadcast */
-struct cmd_set_vf_broadcast_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t broadcast;
-	portid_t port_id;
-	uint16_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
-
-/* Common CLI fields for vf broadcast enable disable */
-static cmdline_parse_token_string_t cmd_set_vf_broadcast_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_set_vf_broadcast_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_set_vf_broadcast_broadcast =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 broadcast, "broadcast");
-static cmdline_parse_token_num_t cmd_set_vf_broadcast_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_set_vf_broadcast_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_vf_broadcast_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_broadcast_result,
-		 on_off, "on#off");
-
-static void
-cmd_set_vf_broadcast_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_vf_broadcast_result *res = parsed_result;
-	int ret = -ENOTSUP;
 
-	__rte_unused int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
+	if (ret)
 		return;
 
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_broadcast(res->port_id,
-					    res->vf_id, is_on);
+#ifdef RTE_NET_IXGBE
+	ret = rte_pmd_ixgbe_set_tc_bw_alloc(res->port_id, tc_num, bw);
 #endif
 
 	switch (ret) {
 	case 0:
 		break;
 	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or is_on %d\n",
-			res->vf_id, is_on);
+		fprintf(stderr, "invalid bandwidth\n");
 		break;
 	case -ENODEV:
 		fprintf(stderr, "invalid port_id %d\n", res->port_id);
@@ -12645,3200 +11793,1434 @@ cmd_set_vf_broadcast_parsed(
 	}
 }
 
-static cmdline_parse_inst_t cmd_set_vf_broadcast = {
-	.f = cmd_set_vf_broadcast_parsed,
+static cmdline_parse_inst_t cmd_tc_min_bw = {
+	.f = cmd_tc_min_bw_parsed,
 	.data = NULL,
-	.help_str = "set vf broadcast <port_id> <vf_id> on|off",
+	.help_str = "set tc tx min-bandwidth <port_id> <bw1, bw2, ...>",
 	.tokens = {
-		(void *)&cmd_set_vf_broadcast_set,
-		(void *)&cmd_set_vf_broadcast_vf,
-		(void *)&cmd_set_vf_broadcast_broadcast,
-		(void *)&cmd_set_vf_broadcast_port_id,
-		(void *)&cmd_set_vf_broadcast_vf_id,
-		(void *)&cmd_set_vf_broadcast_on_off,
+		(void *)&cmd_vf_tc_bw_set,
+		(void *)&cmd_vf_tc_bw_tc,
+		(void *)&cmd_vf_tc_bw_tx,
+		(void *)&cmd_vf_tc_bw_min_bw,
+		(void *)&cmd_vf_tc_bw_port_id,
+		(void *)&cmd_vf_tc_bw_bw_list,
 		NULL,
 	},
 };
 
-/* vf vlan tag configuration */
-
-/* Common result structure for vf vlan tag */
-struct cmd_set_vf_vlan_tag_result {
+/** Set VXLAN encapsulation details */
+struct cmd_set_vxlan_result {
 	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t vlan;
-	cmdline_fixed_string_t tag;
-	portid_t port_id;
-	uint16_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
-
-/* Common CLI fields for vf vlan tag enable disable */
-static cmdline_parse_token_string_t cmd_set_vf_vlan_tag_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_set_vf_vlan_tag_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_set_vf_vlan_tag_vlan =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 vlan, "vlan");
-static cmdline_parse_token_string_t cmd_set_vf_vlan_tag_tag =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 tag, "tag");
-static cmdline_parse_token_num_t cmd_set_vf_vlan_tag_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_set_vf_vlan_tag_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_vf_vlan_tag_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_set_vf_vlan_tag_result,
-		 on_off, "on#off");
-
-static void
-cmd_set_vf_vlan_tag_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_vf_vlan_tag_result *res = parsed_result;
-	int ret = -ENOTSUP;
-
-	__rte_unused int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_vlan_tag(res->port_id,
-					   res->vf_id, is_on);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or is_on %d\n",
-			res->vf_id, is_on);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_vlan_tag = {
-	.f = cmd_set_vf_vlan_tag_parsed,
-	.data = NULL,
-	.help_str = "set vf vlan tag <port_id> <vf_id> on|off",
-	.tokens = {
-		(void *)&cmd_set_vf_vlan_tag_set,
-		(void *)&cmd_set_vf_vlan_tag_vf,
-		(void *)&cmd_set_vf_vlan_tag_vlan,
-		(void *)&cmd_set_vf_vlan_tag_tag,
-		(void *)&cmd_set_vf_vlan_tag_port_id,
-		(void *)&cmd_set_vf_vlan_tag_vf_id,
-		(void *)&cmd_set_vf_vlan_tag_on_off,
-		NULL,
-	},
-};
-
-/* Common definition of VF and TC TX bandwidth configuration */
-struct cmd_vf_tc_bw_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t tc;
-	cmdline_fixed_string_t tx;
-	cmdline_fixed_string_t min_bw;
-	cmdline_fixed_string_t max_bw;
-	cmdline_fixed_string_t strict_link_prio;
-	portid_t port_id;
-	uint16_t vf_id;
-	uint8_t tc_no;
-	uint32_t bw;
-	cmdline_fixed_string_t bw_list;
-	uint8_t tc_map;
-};
-
-static cmdline_parse_token_string_t cmd_vf_tc_bw_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tc, "tc");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tx, "tx");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_strict_link_prio =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 strict_link_prio, "strict-link-priority");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_min_bw =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 min_bw, "min-bandwidth");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_max_bw =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 max_bw, "max-bandwidth");
-static cmdline_parse_token_num_t cmd_vf_tc_bw_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_tc_bw_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_tc_bw_tc_no =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tc_no, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_vf_tc_bw_bw =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 bw, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_vf_tc_bw_bw_list =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 bw_list, NULL);
-static cmdline_parse_token_num_t cmd_vf_tc_bw_tc_map =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tc_map, RTE_UINT8);
-
-/* VF max bandwidth setting */
-static void
-cmd_vf_max_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_max_bw(res->port_id,
-					 res->vf_id, res->bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or bandwidth %d\n",
-			res->vf_id, res->bw);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_vf_max_bw = {
-	.f = cmd_vf_max_bw_parsed,
-	.data = NULL,
-	.help_str = "set vf tx max-bandwidth <port_id> <vf_id> <bandwidth>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_vf,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_max_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_vf_id,
-		(void *)&cmd_vf_tc_bw_bw,
-		NULL,
-	},
-};
-
-static int
-vf_tc_min_bw_parse_bw_list(uint8_t *bw_list,
-			   uint8_t *tc_num,
-			   char *str)
-{
-	uint32_t size;
-	const char *p, *p0 = str;
-	char s[256];
-	char *end;
-	char *str_fld[16];
-	uint16_t i;
-	int ret;
-
-	p = strchr(p0, '(');
-	if (p == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	p++;
-	p0 = strchr(p, ')');
-	if (p0 == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	size = p0 - p;
-	if (size >= sizeof(s)) {
-		fprintf(stderr,
-			"The string size exceeds the internal buffer size\n");
-		return -1;
-	}
-	snprintf(s, sizeof(s), "%.*s", size, p);
-	ret = rte_strsplit(s, sizeof(s), str_fld, 16, ',');
-	if (ret <= 0) {
-		fprintf(stderr, "Failed to get the bandwidth list.\n");
-		return -1;
-	}
-	*tc_num = ret;
-	for (i = 0; i < ret; i++)
-		bw_list[i] = (uint8_t)strtoul(str_fld[i], &end, 0);
-
-	return 0;
-}
-
-/* TC min bandwidth setting */
-static void
-cmd_vf_tc_min_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	uint8_t tc_num;
-	uint8_t bw[16];
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
-	if (ret)
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_tc_bw_alloc(res->port_id, res->vf_id,
-					      tc_num, bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or bandwidth\n", res->vf_id);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_vf_tc_min_bw = {
-	.f = cmd_vf_tc_min_bw_parsed,
-	.data = NULL,
-	.help_str = "set vf tc tx min-bandwidth <port_id> <vf_id>"
-		    " <bw1, bw2, ...>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_vf,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_min_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_vf_id,
-		(void *)&cmd_vf_tc_bw_bw_list,
-		NULL,
-	},
-};
-
-static void
-cmd_tc_min_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	struct rte_port *port;
-	uint8_t tc_num;
-	uint8_t bw[16];
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	port = &ports[res->port_id];
-	/** Check if the port is not started **/
-	if (port->port_status != RTE_PORT_STOPPED) {
-		fprintf(stderr, "Please stop port %d first\n", res->port_id);
-		return;
-	}
-
-	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
-	if (ret)
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_tc_bw_alloc(res->port_id, tc_num, bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid bandwidth\n");
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_tc_min_bw = {
-	.f = cmd_tc_min_bw_parsed,
-	.data = NULL,
-	.help_str = "set tc tx min-bandwidth <port_id> <bw1, bw2, ...>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_min_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_bw_list,
-		NULL,
-	},
-};
-
-/* TC max bandwidth setting */
-static void
-cmd_vf_tc_max_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_vf_tc_max_bw(res->port_id, res->vf_id,
-					    res->tc_no, res->bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr,
-			"invalid vf_id %d, tc_no %d or bandwidth %d\n",
-			res->vf_id, res->tc_no, res->bw);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_vf_tc_max_bw = {
-	.f = cmd_vf_tc_max_bw_parsed,
-	.data = NULL,
-	.help_str = "set vf tc tx max-bandwidth <port_id> <vf_id> <tc_no>"
-		    " <bandwidth>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_vf,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_max_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_vf_id,
-		(void *)&cmd_vf_tc_bw_tc_no,
-		(void *)&cmd_vf_tc_bw_bw,
-		NULL,
-	},
-};
-
-/** Set VXLAN encapsulation details */
-struct cmd_set_vxlan_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vxlan;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-	uint32_t vni;
-	uint16_t udp_src;
-	uint16_t udp_dst;
-	cmdline_ipaddr_t ip_src;
-	cmdline_ipaddr_t ip_dst;
-	uint16_t tci;
-	uint8_t tos;
-	uint8_t ttl;
-	struct rte_ether_addr eth_src;
-	struct rte_ether_addr eth_dst;
-};
-
-static cmdline_parse_token_string_t cmd_set_vxlan_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, set, "set");
-static cmdline_parse_token_string_t cmd_set_vxlan_vxlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan, "vxlan");
-static cmdline_parse_token_string_t cmd_set_vxlan_vxlan_tos_ttl =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan,
-				 "vxlan-tos-ttl");
-static cmdline_parse_token_string_t cmd_set_vxlan_vxlan_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, vxlan,
-				 "vxlan-with-vlan");
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "ip-version");
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, ip_version,
-				 "ipv4#ipv6");
-static cmdline_parse_token_string_t cmd_set_vxlan_vni =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "vni");
-static cmdline_parse_token_num_t cmd_set_vxlan_vni_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, vni, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_vxlan_udp_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "udp-src");
-static cmdline_parse_token_num_t cmd_set_vxlan_udp_src_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, udp_src, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_vxlan_udp_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "udp-dst");
-static cmdline_parse_token_num_t cmd_set_vxlan_udp_dst_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, udp_dst, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_tos =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "ip-tos");
-static cmdline_parse_token_num_t cmd_set_vxlan_ip_tos_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, tos, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_ttl =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "ip-ttl");
-static cmdline_parse_token_num_t cmd_set_vxlan_ip_ttl_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, ttl, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "ip-src");
-static cmdline_parse_token_ipaddr_t cmd_set_vxlan_ip_src_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_vxlan_result, ip_src);
-static cmdline_parse_token_string_t cmd_set_vxlan_ip_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "ip-dst");
-static cmdline_parse_token_ipaddr_t cmd_set_vxlan_ip_dst_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_vxlan_result, ip_dst);
-static cmdline_parse_token_string_t cmd_set_vxlan_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "vlan-tci");
-static cmdline_parse_token_num_t cmd_set_vxlan_vlan_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_vxlan_result, tci, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_vxlan_eth_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "eth-src");
-static cmdline_parse_token_etheraddr_t cmd_set_vxlan_eth_src_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_vxlan_result, eth_src);
-static cmdline_parse_token_string_t cmd_set_vxlan_eth_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_vxlan_result, pos_token,
-				 "eth-dst");
-static cmdline_parse_token_etheraddr_t cmd_set_vxlan_eth_dst_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_vxlan_result, eth_dst);
-
-static void cmd_set_vxlan_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_vxlan_result *res = parsed_result;
-	union {
-		uint32_t vxlan_id;
-		uint8_t vni[4];
-	} id = {
-		.vxlan_id = rte_cpu_to_be_32(res->vni) & RTE_BE32(0x00ffffff),
-	};
-
-	vxlan_encap_conf.select_tos_ttl = 0;
-	if (strcmp(res->vxlan, "vxlan") == 0)
-		vxlan_encap_conf.select_vlan = 0;
-	else if (strcmp(res->vxlan, "vxlan-with-vlan") == 0)
-		vxlan_encap_conf.select_vlan = 1;
-	else if (strcmp(res->vxlan, "vxlan-tos-ttl") == 0) {
-		vxlan_encap_conf.select_vlan = 0;
-		vxlan_encap_conf.select_tos_ttl = 1;
-	}
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		vxlan_encap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		vxlan_encap_conf.select_ipv4 = 0;
-	else
-		return;
-	rte_memcpy(vxlan_encap_conf.vni, &id.vni[1], 3);
-	vxlan_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src);
-	vxlan_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst);
-	vxlan_encap_conf.ip_tos = res->tos;
-	vxlan_encap_conf.ip_ttl = res->ttl;
-	if (vxlan_encap_conf.select_ipv4) {
-		IPV4_ADDR_TO_UINT(res->ip_src, vxlan_encap_conf.ipv4_src);
-		IPV4_ADDR_TO_UINT(res->ip_dst, vxlan_encap_conf.ipv4_dst);
-	} else {
-		IPV6_ADDR_TO_ARRAY(res->ip_src, vxlan_encap_conf.ipv6_src);
-		IPV6_ADDR_TO_ARRAY(res->ip_dst, vxlan_encap_conf.ipv6_dst);
-	}
-	if (vxlan_encap_conf.select_vlan)
-		vxlan_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
-	rte_memcpy(vxlan_encap_conf.eth_src, res->eth_src.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-	rte_memcpy(vxlan_encap_conf.eth_dst, res->eth_dst.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-}
-
-static cmdline_parse_inst_t cmd_set_vxlan = {
-	.f = cmd_set_vxlan_parsed,
-	.data = NULL,
-	.help_str = "set vxlan ip-version ipv4|ipv6 vni <vni> udp-src"
-		" <udp-src> udp-dst <udp-dst> ip-src <ip-src> ip-dst <ip-dst>"
-		" eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_vxlan_set,
-		(void *)&cmd_set_vxlan_vxlan,
-		(void *)&cmd_set_vxlan_ip_version,
-		(void *)&cmd_set_vxlan_ip_version_value,
-		(void *)&cmd_set_vxlan_vni,
-		(void *)&cmd_set_vxlan_vni_value,
-		(void *)&cmd_set_vxlan_udp_src,
-		(void *)&cmd_set_vxlan_udp_src_value,
-		(void *)&cmd_set_vxlan_udp_dst,
-		(void *)&cmd_set_vxlan_udp_dst_value,
-		(void *)&cmd_set_vxlan_ip_src,
-		(void *)&cmd_set_vxlan_ip_src_value,
-		(void *)&cmd_set_vxlan_ip_dst,
-		(void *)&cmd_set_vxlan_ip_dst_value,
-		(void *)&cmd_set_vxlan_eth_src,
-		(void *)&cmd_set_vxlan_eth_src_value,
-		(void *)&cmd_set_vxlan_eth_dst,
-		(void *)&cmd_set_vxlan_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_vxlan_tos_ttl = {
-	.f = cmd_set_vxlan_parsed,
-	.data = NULL,
-	.help_str = "set vxlan-tos-ttl ip-version ipv4|ipv6 vni <vni> udp-src"
-		" <udp-src> udp-dst <udp-dst> ip-tos <ip-tos> ip-ttl <ip-ttl>"
-		" ip-src <ip-src> ip-dst <ip-dst> eth-src <eth-src>"
-		" eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_vxlan_set,
-		(void *)&cmd_set_vxlan_vxlan_tos_ttl,
-		(void *)&cmd_set_vxlan_ip_version,
-		(void *)&cmd_set_vxlan_ip_version_value,
-		(void *)&cmd_set_vxlan_vni,
-		(void *)&cmd_set_vxlan_vni_value,
-		(void *)&cmd_set_vxlan_udp_src,
-		(void *)&cmd_set_vxlan_udp_src_value,
-		(void *)&cmd_set_vxlan_udp_dst,
-		(void *)&cmd_set_vxlan_udp_dst_value,
-		(void *)&cmd_set_vxlan_ip_tos,
-		(void *)&cmd_set_vxlan_ip_tos_value,
-		(void *)&cmd_set_vxlan_ip_ttl,
-		(void *)&cmd_set_vxlan_ip_ttl_value,
-		(void *)&cmd_set_vxlan_ip_src,
-		(void *)&cmd_set_vxlan_ip_src_value,
-		(void *)&cmd_set_vxlan_ip_dst,
-		(void *)&cmd_set_vxlan_ip_dst_value,
-		(void *)&cmd_set_vxlan_eth_src,
-		(void *)&cmd_set_vxlan_eth_src_value,
-		(void *)&cmd_set_vxlan_eth_dst,
-		(void *)&cmd_set_vxlan_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_vxlan_with_vlan = {
-	.f = cmd_set_vxlan_parsed,
-	.data = NULL,
-	.help_str = "set vxlan-with-vlan ip-version ipv4|ipv6 vni <vni>"
-		" udp-src <udp-src> udp-dst <udp-dst> ip-src <ip-src> ip-dst"
-		" <ip-dst> vlan-tci <vlan-tci> eth-src <eth-src> eth-dst"
-		" <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_vxlan_set,
-		(void *)&cmd_set_vxlan_vxlan_with_vlan,
-		(void *)&cmd_set_vxlan_ip_version,
-		(void *)&cmd_set_vxlan_ip_version_value,
-		(void *)&cmd_set_vxlan_vni,
-		(void *)&cmd_set_vxlan_vni_value,
-		(void *)&cmd_set_vxlan_udp_src,
-		(void *)&cmd_set_vxlan_udp_src_value,
-		(void *)&cmd_set_vxlan_udp_dst,
-		(void *)&cmd_set_vxlan_udp_dst_value,
-		(void *)&cmd_set_vxlan_ip_src,
-		(void *)&cmd_set_vxlan_ip_src_value,
-		(void *)&cmd_set_vxlan_ip_dst,
-		(void *)&cmd_set_vxlan_ip_dst_value,
-		(void *)&cmd_set_vxlan_vlan,
-		(void *)&cmd_set_vxlan_vlan_value,
-		(void *)&cmd_set_vxlan_eth_src,
-		(void *)&cmd_set_vxlan_eth_src_value,
-		(void *)&cmd_set_vxlan_eth_dst,
-		(void *)&cmd_set_vxlan_eth_dst_value,
-		NULL,
-	},
-};
-
-/** Set NVGRE encapsulation details */
-struct cmd_set_nvgre_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t nvgre;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t tni;
-	cmdline_ipaddr_t ip_src;
-	cmdline_ipaddr_t ip_dst;
-	uint16_t tci;
-	struct rte_ether_addr eth_src;
-	struct rte_ether_addr eth_dst;
-};
-
-static cmdline_parse_token_string_t cmd_set_nvgre_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, set, "set");
-static cmdline_parse_token_string_t cmd_set_nvgre_nvgre =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, nvgre, "nvgre");
-static cmdline_parse_token_string_t cmd_set_nvgre_nvgre_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, nvgre,
-				 "nvgre-with-vlan");
-static cmdline_parse_token_string_t cmd_set_nvgre_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "ip-version");
-static cmdline_parse_token_string_t cmd_set_nvgre_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, ip_version,
-				 "ipv4#ipv6");
-static cmdline_parse_token_string_t cmd_set_nvgre_tni =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "tni");
-static cmdline_parse_token_num_t cmd_set_nvgre_tni_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_nvgre_result, tni, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_nvgre_ip_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "ip-src");
-static cmdline_parse_token_num_t cmd_set_nvgre_ip_src_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_nvgre_result, ip_src);
-static cmdline_parse_token_string_t cmd_set_nvgre_ip_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "ip-dst");
-static cmdline_parse_token_ipaddr_t cmd_set_nvgre_ip_dst_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_nvgre_result, ip_dst);
-static cmdline_parse_token_string_t cmd_set_nvgre_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "vlan-tci");
-static cmdline_parse_token_num_t cmd_set_nvgre_vlan_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_nvgre_result, tci, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_nvgre_eth_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "eth-src");
-static cmdline_parse_token_etheraddr_t cmd_set_nvgre_eth_src_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_nvgre_result, eth_src);
-static cmdline_parse_token_string_t cmd_set_nvgre_eth_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_nvgre_result, pos_token,
-				 "eth-dst");
-static cmdline_parse_token_etheraddr_t cmd_set_nvgre_eth_dst_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_nvgre_result, eth_dst);
-
-static void cmd_set_nvgre_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_nvgre_result *res = parsed_result;
-	union {
-		uint32_t nvgre_tni;
-		uint8_t tni[4];
-	} id = {
-		.nvgre_tni = rte_cpu_to_be_32(res->tni) & RTE_BE32(0x00ffffff),
-	};
-
-	if (strcmp(res->nvgre, "nvgre") == 0)
-		nvgre_encap_conf.select_vlan = 0;
-	else if (strcmp(res->nvgre, "nvgre-with-vlan") == 0)
-		nvgre_encap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		nvgre_encap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		nvgre_encap_conf.select_ipv4 = 0;
-	else
-		return;
-	rte_memcpy(nvgre_encap_conf.tni, &id.tni[1], 3);
-	if (nvgre_encap_conf.select_ipv4) {
-		IPV4_ADDR_TO_UINT(res->ip_src, nvgre_encap_conf.ipv4_src);
-		IPV4_ADDR_TO_UINT(res->ip_dst, nvgre_encap_conf.ipv4_dst);
-	} else {
-		IPV6_ADDR_TO_ARRAY(res->ip_src, nvgre_encap_conf.ipv6_src);
-		IPV6_ADDR_TO_ARRAY(res->ip_dst, nvgre_encap_conf.ipv6_dst);
-	}
-	if (nvgre_encap_conf.select_vlan)
-		nvgre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
-	rte_memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-	rte_memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-}
-
-static cmdline_parse_inst_t cmd_set_nvgre = {
-	.f = cmd_set_nvgre_parsed,
-	.data = NULL,
-	.help_str = "set nvgre ip-version <ipv4|ipv6> tni <tni> ip-src"
-		" <ip-src> ip-dst <ip-dst> eth-src <eth-src>"
-		" eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_nvgre_set,
-		(void *)&cmd_set_nvgre_nvgre,
-		(void *)&cmd_set_nvgre_ip_version,
-		(void *)&cmd_set_nvgre_ip_version_value,
-		(void *)&cmd_set_nvgre_tni,
-		(void *)&cmd_set_nvgre_tni_value,
-		(void *)&cmd_set_nvgre_ip_src,
-		(void *)&cmd_set_nvgre_ip_src_value,
-		(void *)&cmd_set_nvgre_ip_dst,
-		(void *)&cmd_set_nvgre_ip_dst_value,
-		(void *)&cmd_set_nvgre_eth_src,
-		(void *)&cmd_set_nvgre_eth_src_value,
-		(void *)&cmd_set_nvgre_eth_dst,
-		(void *)&cmd_set_nvgre_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_nvgre_with_vlan = {
-	.f = cmd_set_nvgre_parsed,
-	.data = NULL,
-	.help_str = "set nvgre-with-vlan ip-version <ipv4|ipv6> tni <tni>"
-		" ip-src <ip-src> ip-dst <ip-dst> vlan-tci <vlan-tci>"
-		" eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_nvgre_set,
-		(void *)&cmd_set_nvgre_nvgre_with_vlan,
-		(void *)&cmd_set_nvgre_ip_version,
-		(void *)&cmd_set_nvgre_ip_version_value,
-		(void *)&cmd_set_nvgre_tni,
-		(void *)&cmd_set_nvgre_tni_value,
-		(void *)&cmd_set_nvgre_ip_src,
-		(void *)&cmd_set_nvgre_ip_src_value,
-		(void *)&cmd_set_nvgre_ip_dst,
-		(void *)&cmd_set_nvgre_ip_dst_value,
-		(void *)&cmd_set_nvgre_vlan,
-		(void *)&cmd_set_nvgre_vlan_value,
-		(void *)&cmd_set_nvgre_eth_src,
-		(void *)&cmd_set_nvgre_eth_src_value,
-		(void *)&cmd_set_nvgre_eth_dst,
-		(void *)&cmd_set_nvgre_eth_dst_value,
-		NULL,
-	},
-};
-
-/** Set L2 encapsulation details */
-struct cmd_set_l2_encap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t l2_encap;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-	uint16_t tci;
-	struct rte_ether_addr eth_src;
-	struct rte_ether_addr eth_dst;
-};
-
-static cmdline_parse_token_string_t cmd_set_l2_encap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, set, "set");
-static cmdline_parse_token_string_t cmd_set_l2_encap_l2_encap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, l2_encap, "l2_encap");
-static cmdline_parse_token_string_t cmd_set_l2_encap_l2_encap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, l2_encap,
-				 "l2_encap-with-vlan");
-static cmdline_parse_token_string_t cmd_set_l2_encap_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, pos_token,
-				 "ip-version");
-static cmdline_parse_token_string_t cmd_set_l2_encap_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, ip_version,
-				 "ipv4#ipv6");
-static cmdline_parse_token_string_t cmd_set_l2_encap_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, pos_token,
-				 "vlan-tci");
-static cmdline_parse_token_num_t cmd_set_l2_encap_vlan_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_l2_encap_result, tci, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_l2_encap_eth_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, pos_token,
-				 "eth-src");
-static cmdline_parse_token_etheraddr_t cmd_set_l2_encap_eth_src_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_l2_encap_result, eth_src);
-static cmdline_parse_token_string_t cmd_set_l2_encap_eth_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_encap_result, pos_token,
-				 "eth-dst");
-static cmdline_parse_token_etheraddr_t cmd_set_l2_encap_eth_dst_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_l2_encap_result, eth_dst);
-
-static void cmd_set_l2_encap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_l2_encap_result *res = parsed_result;
-
-	if (strcmp(res->l2_encap, "l2_encap") == 0)
-		l2_encap_conf.select_vlan = 0;
-	else if (strcmp(res->l2_encap, "l2_encap-with-vlan") == 0)
-		l2_encap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		l2_encap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		l2_encap_conf.select_ipv4 = 0;
-	else
-		return;
-	if (l2_encap_conf.select_vlan)
-		l2_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
-	rte_memcpy(l2_encap_conf.eth_src, res->eth_src.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-	rte_memcpy(l2_encap_conf.eth_dst, res->eth_dst.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-}
-
-static cmdline_parse_inst_t cmd_set_l2_encap = {
-	.f = cmd_set_l2_encap_parsed,
-	.data = NULL,
-	.help_str = "set l2_encap ip-version ipv4|ipv6"
-		" eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_l2_encap_set,
-		(void *)&cmd_set_l2_encap_l2_encap,
-		(void *)&cmd_set_l2_encap_ip_version,
-		(void *)&cmd_set_l2_encap_ip_version_value,
-		(void *)&cmd_set_l2_encap_eth_src,
-		(void *)&cmd_set_l2_encap_eth_src_value,
-		(void *)&cmd_set_l2_encap_eth_dst,
-		(void *)&cmd_set_l2_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_l2_encap_with_vlan = {
-	.f = cmd_set_l2_encap_parsed,
-	.data = NULL,
-	.help_str = "set l2_encap-with-vlan ip-version ipv4|ipv6"
-		" vlan-tci <vlan-tci> eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_l2_encap_set,
-		(void *)&cmd_set_l2_encap_l2_encap_with_vlan,
-		(void *)&cmd_set_l2_encap_ip_version,
-		(void *)&cmd_set_l2_encap_ip_version_value,
-		(void *)&cmd_set_l2_encap_vlan,
-		(void *)&cmd_set_l2_encap_vlan_value,
-		(void *)&cmd_set_l2_encap_eth_src,
-		(void *)&cmd_set_l2_encap_eth_src_value,
-		(void *)&cmd_set_l2_encap_eth_dst,
-		(void *)&cmd_set_l2_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-/** Set L2 decapsulation details */
-struct cmd_set_l2_decap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t l2_decap;
-	cmdline_fixed_string_t pos_token;
-	uint32_t vlan_present:1;
-};
-
-static cmdline_parse_token_string_t cmd_set_l2_decap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_decap_result, set, "set");
-static cmdline_parse_token_string_t cmd_set_l2_decap_l2_decap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_decap_result, l2_decap,
-				 "l2_decap");
-static cmdline_parse_token_string_t cmd_set_l2_decap_l2_decap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_l2_decap_result, l2_decap,
-				 "l2_decap-with-vlan");
-
-static void cmd_set_l2_decap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_l2_decap_result *res = parsed_result;
-
-	if (strcmp(res->l2_decap, "l2_decap") == 0)
-		l2_decap_conf.select_vlan = 0;
-	else if (strcmp(res->l2_decap, "l2_decap-with-vlan") == 0)
-		l2_decap_conf.select_vlan = 1;
-}
-
-static cmdline_parse_inst_t cmd_set_l2_decap = {
-	.f = cmd_set_l2_decap_parsed,
-	.data = NULL,
-	.help_str = "set l2_decap",
-	.tokens = {
-		(void *)&cmd_set_l2_decap_set,
-		(void *)&cmd_set_l2_decap_l2_decap,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_l2_decap_with_vlan = {
-	.f = cmd_set_l2_decap_parsed,
-	.data = NULL,
-	.help_str = "set l2_decap-with-vlan",
-	.tokens = {
-		(void *)&cmd_set_l2_decap_set,
-		(void *)&cmd_set_l2_decap_l2_decap_with_vlan,
-		NULL,
-	},
-};
-
-/** Set MPLSoGRE encapsulation details */
-struct cmd_set_mplsogre_encap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t mplsogre;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-	uint32_t label;
-	cmdline_ipaddr_t ip_src;
-	cmdline_ipaddr_t ip_dst;
-	uint16_t tci;
-	struct rte_ether_addr eth_src;
-	struct rte_ether_addr eth_dst;
-};
-
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, set,
-				 "set");
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_mplsogre_encap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, mplsogre,
-				 "mplsogre_encap");
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_mplsogre_encap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 mplsogre, "mplsogre_encap-with-vlan");
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "ip-version");
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 ip_version, "ipv4#ipv6");
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_label =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "label");
-static cmdline_parse_token_num_t cmd_set_mplsogre_encap_label_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsogre_encap_result, label,
-			      RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "ip-src");
-static cmdline_parse_token_ipaddr_t cmd_set_mplsogre_encap_ip_src_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, ip_src);
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "ip-dst");
-static cmdline_parse_token_ipaddr_t cmd_set_mplsogre_encap_ip_dst_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, ip_dst);
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "vlan-tci");
-static cmdline_parse_token_num_t cmd_set_mplsogre_encap_vlan_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsogre_encap_result, tci,
-			      RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_eth_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "eth-src");
-static cmdline_parse_token_etheraddr_t cmd_set_mplsogre_encap_eth_src_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				    eth_src);
-static cmdline_parse_token_string_t cmd_set_mplsogre_encap_eth_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				 pos_token, "eth-dst");
-static cmdline_parse_token_etheraddr_t cmd_set_mplsogre_encap_eth_dst_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result,
-				    eth_dst);
-
-static void cmd_set_mplsogre_encap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_mplsogre_encap_result *res = parsed_result;
-	union {
-		uint32_t mplsogre_label;
-		uint8_t label[4];
-	} id = {
-		.mplsogre_label = rte_cpu_to_be_32(res->label<<12),
-	};
-
-	if (strcmp(res->mplsogre, "mplsogre_encap") == 0)
-		mplsogre_encap_conf.select_vlan = 0;
-	else if (strcmp(res->mplsogre, "mplsogre_encap-with-vlan") == 0)
-		mplsogre_encap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		mplsogre_encap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		mplsogre_encap_conf.select_ipv4 = 0;
-	else
-		return;
-	rte_memcpy(mplsogre_encap_conf.label, &id.label, 3);
-	if (mplsogre_encap_conf.select_ipv4) {
-		IPV4_ADDR_TO_UINT(res->ip_src, mplsogre_encap_conf.ipv4_src);
-		IPV4_ADDR_TO_UINT(res->ip_dst, mplsogre_encap_conf.ipv4_dst);
-	} else {
-		IPV6_ADDR_TO_ARRAY(res->ip_src, mplsogre_encap_conf.ipv6_src);
-		IPV6_ADDR_TO_ARRAY(res->ip_dst, mplsogre_encap_conf.ipv6_dst);
-	}
-	if (mplsogre_encap_conf.select_vlan)
-		mplsogre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
-	rte_memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-	rte_memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-}
-
-static cmdline_parse_inst_t cmd_set_mplsogre_encap = {
-	.f = cmd_set_mplsogre_encap_parsed,
-	.data = NULL,
-	.help_str = "set mplsogre_encap ip-version ipv4|ipv6 label <label>"
-		" ip-src <ip-src> ip-dst <ip-dst> eth-src <eth-src>"
-		" eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_mplsogre_encap_set,
-		(void *)&cmd_set_mplsogre_encap_mplsogre_encap,
-		(void *)&cmd_set_mplsogre_encap_ip_version,
-		(void *)&cmd_set_mplsogre_encap_ip_version_value,
-		(void *)&cmd_set_mplsogre_encap_label,
-		(void *)&cmd_set_mplsogre_encap_label_value,
-		(void *)&cmd_set_mplsogre_encap_ip_src,
-		(void *)&cmd_set_mplsogre_encap_ip_src_value,
-		(void *)&cmd_set_mplsogre_encap_ip_dst,
-		(void *)&cmd_set_mplsogre_encap_ip_dst_value,
-		(void *)&cmd_set_mplsogre_encap_eth_src,
-		(void *)&cmd_set_mplsogre_encap_eth_src_value,
-		(void *)&cmd_set_mplsogre_encap_eth_dst,
-		(void *)&cmd_set_mplsogre_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_mplsogre_encap_with_vlan = {
-	.f = cmd_set_mplsogre_encap_parsed,
-	.data = NULL,
-	.help_str = "set mplsogre_encap-with-vlan ip-version ipv4|ipv6"
-		" label <label> ip-src <ip-src> ip-dst <ip-dst>"
-		" vlan-tci <vlan-tci> eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_mplsogre_encap_set,
-		(void *)&cmd_set_mplsogre_encap_mplsogre_encap_with_vlan,
-		(void *)&cmd_set_mplsogre_encap_ip_version,
-		(void *)&cmd_set_mplsogre_encap_ip_version_value,
-		(void *)&cmd_set_mplsogre_encap_label,
-		(void *)&cmd_set_mplsogre_encap_label_value,
-		(void *)&cmd_set_mplsogre_encap_ip_src,
-		(void *)&cmd_set_mplsogre_encap_ip_src_value,
-		(void *)&cmd_set_mplsogre_encap_ip_dst,
-		(void *)&cmd_set_mplsogre_encap_ip_dst_value,
-		(void *)&cmd_set_mplsogre_encap_vlan,
-		(void *)&cmd_set_mplsogre_encap_vlan_value,
-		(void *)&cmd_set_mplsogre_encap_eth_src,
-		(void *)&cmd_set_mplsogre_encap_eth_src_value,
-		(void *)&cmd_set_mplsogre_encap_eth_dst,
-		(void *)&cmd_set_mplsogre_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-/** Set MPLSoGRE decapsulation details */
-struct cmd_set_mplsogre_decap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t mplsogre;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-};
-
-static cmdline_parse_token_string_t cmd_set_mplsogre_decap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_decap_result, set,
-				 "set");
-static cmdline_parse_token_string_t cmd_set_mplsogre_decap_mplsogre_decap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_decap_result, mplsogre,
-				 "mplsogre_decap");
-static cmdline_parse_token_string_t cmd_set_mplsogre_decap_mplsogre_decap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_decap_result,
-				 mplsogre, "mplsogre_decap-with-vlan");
-static cmdline_parse_token_string_t cmd_set_mplsogre_decap_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_decap_result,
-				 pos_token, "ip-version");
-static cmdline_parse_token_string_t cmd_set_mplsogre_decap_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_decap_result,
-				 ip_version, "ipv4#ipv6");
-
-static void cmd_set_mplsogre_decap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_mplsogre_decap_result *res = parsed_result;
-
-	if (strcmp(res->mplsogre, "mplsogre_decap") == 0)
-		mplsogre_decap_conf.select_vlan = 0;
-	else if (strcmp(res->mplsogre, "mplsogre_decap-with-vlan") == 0)
-		mplsogre_decap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		mplsogre_decap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		mplsogre_decap_conf.select_ipv4 = 0;
-}
-
-static cmdline_parse_inst_t cmd_set_mplsogre_decap = {
-	.f = cmd_set_mplsogre_decap_parsed,
-	.data = NULL,
-	.help_str = "set mplsogre_decap ip-version ipv4|ipv6",
-	.tokens = {
-		(void *)&cmd_set_mplsogre_decap_set,
-		(void *)&cmd_set_mplsogre_decap_mplsogre_decap,
-		(void *)&cmd_set_mplsogre_decap_ip_version,
-		(void *)&cmd_set_mplsogre_decap_ip_version_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_mplsogre_decap_with_vlan = {
-	.f = cmd_set_mplsogre_decap_parsed,
-	.data = NULL,
-	.help_str = "set mplsogre_decap-with-vlan ip-version ipv4|ipv6",
-	.tokens = {
-		(void *)&cmd_set_mplsogre_decap_set,
-		(void *)&cmd_set_mplsogre_decap_mplsogre_decap_with_vlan,
-		(void *)&cmd_set_mplsogre_decap_ip_version,
-		(void *)&cmd_set_mplsogre_decap_ip_version_value,
-		NULL,
-	},
-};
-
-/** Set MPLSoUDP encapsulation details */
-struct cmd_set_mplsoudp_encap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t mplsoudp;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-	uint32_t label;
-	uint16_t udp_src;
-	uint16_t udp_dst;
-	cmdline_ipaddr_t ip_src;
-	cmdline_ipaddr_t ip_dst;
-	uint16_t tci;
-	struct rte_ether_addr eth_src;
-	struct rte_ether_addr eth_dst;
-};
-
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result, set,
-				 "set");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_mplsoudp_encap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result, mplsoudp,
-				 "mplsoudp_encap");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_mplsoudp_encap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 mplsoudp, "mplsoudp_encap-with-vlan");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "ip-version");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 ip_version, "ipv4#ipv6");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_label =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "label");
-static cmdline_parse_token_num_t cmd_set_mplsoudp_encap_label_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsoudp_encap_result, label,
-			      RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_udp_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "udp-src");
-static cmdline_parse_token_num_t cmd_set_mplsoudp_encap_udp_src_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsoudp_encap_result, udp_src,
-			      RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_udp_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "udp-dst");
-static cmdline_parse_token_num_t cmd_set_mplsoudp_encap_udp_dst_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsoudp_encap_result, udp_dst,
-			      RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_ip_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "ip-src");
-static cmdline_parse_token_ipaddr_t cmd_set_mplsoudp_encap_ip_src_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsoudp_encap_result, ip_src);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_ip_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "ip-dst");
-static cmdline_parse_token_ipaddr_t cmd_set_mplsoudp_encap_ip_dst_value =
-	TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsoudp_encap_result, ip_dst);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "vlan-tci");
-static cmdline_parse_token_num_t cmd_set_mplsoudp_encap_vlan_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_mplsoudp_encap_result, tci,
-			      RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_eth_src =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "eth-src");
-static cmdline_parse_token_etheraddr_t cmd_set_mplsoudp_encap_eth_src_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				    eth_src);
-static cmdline_parse_token_string_t cmd_set_mplsoudp_encap_eth_dst =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				 pos_token, "eth-dst");
-static cmdline_parse_token_etheraddr_t cmd_set_mplsoudp_encap_eth_dst_value =
-	TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsoudp_encap_result,
-				    eth_dst);
-
-static void cmd_set_mplsoudp_encap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_mplsoudp_encap_result *res = parsed_result;
-	union {
-		uint32_t mplsoudp_label;
-		uint8_t label[4];
-	} id = {
-		.mplsoudp_label = rte_cpu_to_be_32(res->label<<12),
-	};
-
-	if (strcmp(res->mplsoudp, "mplsoudp_encap") == 0)
-		mplsoudp_encap_conf.select_vlan = 0;
-	else if (strcmp(res->mplsoudp, "mplsoudp_encap-with-vlan") == 0)
-		mplsoudp_encap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		mplsoudp_encap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		mplsoudp_encap_conf.select_ipv4 = 0;
-	else
-		return;
-	rte_memcpy(mplsoudp_encap_conf.label, &id.label, 3);
-	mplsoudp_encap_conf.udp_src = rte_cpu_to_be_16(res->udp_src);
-	mplsoudp_encap_conf.udp_dst = rte_cpu_to_be_16(res->udp_dst);
-	if (mplsoudp_encap_conf.select_ipv4) {
-		IPV4_ADDR_TO_UINT(res->ip_src, mplsoudp_encap_conf.ipv4_src);
-		IPV4_ADDR_TO_UINT(res->ip_dst, mplsoudp_encap_conf.ipv4_dst);
-	} else {
-		IPV6_ADDR_TO_ARRAY(res->ip_src, mplsoudp_encap_conf.ipv6_src);
-		IPV6_ADDR_TO_ARRAY(res->ip_dst, mplsoudp_encap_conf.ipv6_dst);
-	}
-	if (mplsoudp_encap_conf.select_vlan)
-		mplsoudp_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
-	rte_memcpy(mplsoudp_encap_conf.eth_src, res->eth_src.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-	rte_memcpy(mplsoudp_encap_conf.eth_dst, res->eth_dst.addr_bytes,
-		   RTE_ETHER_ADDR_LEN);
-}
-
-static cmdline_parse_inst_t cmd_set_mplsoudp_encap = {
-	.f = cmd_set_mplsoudp_encap_parsed,
-	.data = NULL,
-	.help_str = "set mplsoudp_encap ip-version ipv4|ipv6 label <label>"
-		" udp-src <udp-src> udp-dst <udp-dst> ip-src <ip-src>"
-		" ip-dst <ip-dst> eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_mplsoudp_encap_set,
-		(void *)&cmd_set_mplsoudp_encap_mplsoudp_encap,
-		(void *)&cmd_set_mplsoudp_encap_ip_version,
-		(void *)&cmd_set_mplsoudp_encap_ip_version_value,
-		(void *)&cmd_set_mplsoudp_encap_label,
-		(void *)&cmd_set_mplsoudp_encap_label_value,
-		(void *)&cmd_set_mplsoudp_encap_udp_src,
-		(void *)&cmd_set_mplsoudp_encap_udp_src_value,
-		(void *)&cmd_set_mplsoudp_encap_udp_dst,
-		(void *)&cmd_set_mplsoudp_encap_udp_dst_value,
-		(void *)&cmd_set_mplsoudp_encap_ip_src,
-		(void *)&cmd_set_mplsoudp_encap_ip_src_value,
-		(void *)&cmd_set_mplsoudp_encap_ip_dst,
-		(void *)&cmd_set_mplsoudp_encap_ip_dst_value,
-		(void *)&cmd_set_mplsoudp_encap_eth_src,
-		(void *)&cmd_set_mplsoudp_encap_eth_src_value,
-		(void *)&cmd_set_mplsoudp_encap_eth_dst,
-		(void *)&cmd_set_mplsoudp_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_mplsoudp_encap_with_vlan = {
-	.f = cmd_set_mplsoudp_encap_parsed,
-	.data = NULL,
-	.help_str = "set mplsoudp_encap-with-vlan ip-version ipv4|ipv6"
-		" label <label> udp-src <udp-src> udp-dst <udp-dst>"
-		" ip-src <ip-src> ip-dst <ip-dst> vlan-tci <vlan-tci>"
-		" eth-src <eth-src> eth-dst <eth-dst>",
-	.tokens = {
-		(void *)&cmd_set_mplsoudp_encap_set,
-		(void *)&cmd_set_mplsoudp_encap_mplsoudp_encap_with_vlan,
-		(void *)&cmd_set_mplsoudp_encap_ip_version,
-		(void *)&cmd_set_mplsoudp_encap_ip_version_value,
-		(void *)&cmd_set_mplsoudp_encap_label,
-		(void *)&cmd_set_mplsoudp_encap_label_value,
-		(void *)&cmd_set_mplsoudp_encap_udp_src,
-		(void *)&cmd_set_mplsoudp_encap_udp_src_value,
-		(void *)&cmd_set_mplsoudp_encap_udp_dst,
-		(void *)&cmd_set_mplsoudp_encap_udp_dst_value,
-		(void *)&cmd_set_mplsoudp_encap_ip_src,
-		(void *)&cmd_set_mplsoudp_encap_ip_src_value,
-		(void *)&cmd_set_mplsoudp_encap_ip_dst,
-		(void *)&cmd_set_mplsoudp_encap_ip_dst_value,
-		(void *)&cmd_set_mplsoudp_encap_vlan,
-		(void *)&cmd_set_mplsoudp_encap_vlan_value,
-		(void *)&cmd_set_mplsoudp_encap_eth_src,
-		(void *)&cmd_set_mplsoudp_encap_eth_src_value,
-		(void *)&cmd_set_mplsoudp_encap_eth_dst,
-		(void *)&cmd_set_mplsoudp_encap_eth_dst_value,
-		NULL,
-	},
-};
-
-/** Set MPLSoUDP decapsulation details */
-struct cmd_set_mplsoudp_decap_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t mplsoudp;
-	cmdline_fixed_string_t pos_token;
-	cmdline_fixed_string_t ip_version;
-	uint32_t vlan_present:1;
-};
-
-static cmdline_parse_token_string_t cmd_set_mplsoudp_decap_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_decap_result, set,
-				 "set");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_decap_mplsoudp_decap =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_decap_result, mplsoudp,
-				 "mplsoudp_decap");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_decap_mplsoudp_decap_with_vlan =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_decap_result,
-				 mplsoudp, "mplsoudp_decap-with-vlan");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_decap_ip_version =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_decap_result,
-				 pos_token, "ip-version");
-static cmdline_parse_token_string_t cmd_set_mplsoudp_decap_ip_version_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_mplsoudp_decap_result,
-				 ip_version, "ipv4#ipv6");
-
-static void cmd_set_mplsoudp_decap_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_mplsoudp_decap_result *res = parsed_result;
-
-	if (strcmp(res->mplsoudp, "mplsoudp_decap") == 0)
-		mplsoudp_decap_conf.select_vlan = 0;
-	else if (strcmp(res->mplsoudp, "mplsoudp_decap-with-vlan") == 0)
-		mplsoudp_decap_conf.select_vlan = 1;
-	if (strcmp(res->ip_version, "ipv4") == 0)
-		mplsoudp_decap_conf.select_ipv4 = 1;
-	else if (strcmp(res->ip_version, "ipv6") == 0)
-		mplsoudp_decap_conf.select_ipv4 = 0;
-}
-
-static cmdline_parse_inst_t cmd_set_mplsoudp_decap = {
-	.f = cmd_set_mplsoudp_decap_parsed,
-	.data = NULL,
-	.help_str = "set mplsoudp_decap ip-version ipv4|ipv6",
-	.tokens = {
-		(void *)&cmd_set_mplsoudp_decap_set,
-		(void *)&cmd_set_mplsoudp_decap_mplsoudp_decap,
-		(void *)&cmd_set_mplsoudp_decap_ip_version,
-		(void *)&cmd_set_mplsoudp_decap_ip_version_value,
-		NULL,
-	},
-};
-
-static cmdline_parse_inst_t cmd_set_mplsoudp_decap_with_vlan = {
-	.f = cmd_set_mplsoudp_decap_parsed,
-	.data = NULL,
-	.help_str = "set mplsoudp_decap-with-vlan ip-version ipv4|ipv6",
-	.tokens = {
-		(void *)&cmd_set_mplsoudp_decap_set,
-		(void *)&cmd_set_mplsoudp_decap_mplsoudp_decap_with_vlan,
-		(void *)&cmd_set_mplsoudp_decap_ip_version,
-		(void *)&cmd_set_mplsoudp_decap_ip_version_value,
-		NULL,
-	},
-};
-
-/** Set connection tracking object common details */
-struct cmd_set_conntrack_common_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t conntrack;
-	cmdline_fixed_string_t common;
-	cmdline_fixed_string_t peer;
-	cmdline_fixed_string_t is_orig;
-	cmdline_fixed_string_t enable;
-	cmdline_fixed_string_t live;
-	cmdline_fixed_string_t sack;
-	cmdline_fixed_string_t cack;
-	cmdline_fixed_string_t last_dir;
-	cmdline_fixed_string_t liberal;
-	cmdline_fixed_string_t state;
-	cmdline_fixed_string_t max_ack_win;
-	cmdline_fixed_string_t retrans;
-	cmdline_fixed_string_t last_win;
-	cmdline_fixed_string_t last_seq;
-	cmdline_fixed_string_t last_ack;
-	cmdline_fixed_string_t last_end;
-	cmdline_fixed_string_t last_index;
-	uint8_t stat;
-	uint8_t factor;
-	uint16_t peer_port;
-	uint32_t is_original;
-	uint32_t en;
-	uint32_t is_live;
-	uint32_t s_ack;
-	uint32_t c_ack;
-	uint32_t ld;
-	uint32_t lb;
-	uint8_t re_num;
-	uint8_t li;
-	uint16_t lw;
-	uint32_t ls;
-	uint32_t la;
-	uint32_t le;
-};
-
-static cmdline_parse_token_string_t cmd_set_conntrack_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 set, "set");
-static cmdline_parse_token_string_t cmd_set_conntrack_conntrack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 conntrack, "conntrack");
-static cmdline_parse_token_string_t cmd_set_conntrack_common_com =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 common, "com");
-static cmdline_parse_token_string_t cmd_set_conntrack_common_peer =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 peer, "peer");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_peer_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      peer_port, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_is_orig =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 is_orig, "is_orig");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_is_orig_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      is_original, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_enable =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 enable, "enable");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_enable_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      en, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_live =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 live, "live");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_live_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      is_live, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_sack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 sack, "sack");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_sack_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      s_ack, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_cack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 cack, "cack");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_cack_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      c_ack, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_dir =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_dir, "last_dir");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_dir_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      ld, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_liberal =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 liberal, "liberal");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_liberal_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      lb, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_state =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 state, "state");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_state_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      stat, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_max_ackwin =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 max_ack_win, "max_ack_win");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_max_ackwin_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      factor, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_retrans =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 retrans, "r_lim");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_retrans_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      re_num, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_win =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_win, "last_win");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_win_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      lw, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_seq =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_seq, "last_seq");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_seq_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      ls, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_ack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_ack, "last_ack");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_ack_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      la, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_end =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_end, "last_end");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_end_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      le, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_common_last_index =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_common_result,
-				 last_index, "last_index");
-static cmdline_parse_token_num_t cmd_set_conntrack_common_last_index_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_common_result,
-			      li, RTE_UINT8);
-
-static void cmd_set_conntrack_common_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_conntrack_common_result *res = parsed_result;
-
-	/* No need to swap to big endian. */
-	conntrack_context.peer_port = res->peer_port;
-	conntrack_context.is_original_dir = res->is_original;
-	conntrack_context.enable = res->en;
-	conntrack_context.live_connection = res->is_live;
-	conntrack_context.selective_ack = res->s_ack;
-	conntrack_context.challenge_ack_passed = res->c_ack;
-	conntrack_context.last_direction = res->ld;
-	conntrack_context.liberal_mode = res->lb;
-	conntrack_context.state = (enum rte_flow_conntrack_state)res->stat;
-	conntrack_context.max_ack_window = res->factor;
-	conntrack_context.retransmission_limit = res->re_num;
-	conntrack_context.last_window = res->lw;
-	conntrack_context.last_index =
-		(enum rte_flow_conntrack_tcp_last_index)res->li;
-	conntrack_context.last_seq = res->ls;
-	conntrack_context.last_ack = res->la;
-	conntrack_context.last_end = res->le;
-}
-
-static cmdline_parse_inst_t cmd_set_conntrack_common = {
-	.f = cmd_set_conntrack_common_parsed,
-	.data = NULL,
-	.help_str = "set conntrack com peer <port_id> is_orig <dir> enable <en>"
-		" live <ack_seen> sack <en> cack <passed> last_dir <dir>"
-		" liberal <en> state <s> max_ack_win <factor> r_lim <num>"
-		" last_win <win> last_seq <seq> last_ack <ack> last_end <end>"
-		" last_index <flag>",
-	.tokens = {
-		(void *)&cmd_set_conntrack_set,
-		(void *)&cmd_set_conntrack_conntrack,
-		(void *)&cmd_set_conntrack_common_com,
-		(void *)&cmd_set_conntrack_common_peer,
-		(void *)&cmd_set_conntrack_common_peer_value,
-		(void *)&cmd_set_conntrack_common_is_orig,
-		(void *)&cmd_set_conntrack_common_is_orig_value,
-		(void *)&cmd_set_conntrack_common_enable,
-		(void *)&cmd_set_conntrack_common_enable_value,
-		(void *)&cmd_set_conntrack_common_live,
-		(void *)&cmd_set_conntrack_common_live_value,
-		(void *)&cmd_set_conntrack_common_sack,
-		(void *)&cmd_set_conntrack_common_sack_value,
-		(void *)&cmd_set_conntrack_common_cack,
-		(void *)&cmd_set_conntrack_common_cack_value,
-		(void *)&cmd_set_conntrack_common_last_dir,
-		(void *)&cmd_set_conntrack_common_last_dir_value,
-		(void *)&cmd_set_conntrack_common_liberal,
-		(void *)&cmd_set_conntrack_common_liberal_value,
-		(void *)&cmd_set_conntrack_common_state,
-		(void *)&cmd_set_conntrack_common_state_value,
-		(void *)&cmd_set_conntrack_common_max_ackwin,
-		(void *)&cmd_set_conntrack_common_max_ackwin_value,
-		(void *)&cmd_set_conntrack_common_retrans,
-		(void *)&cmd_set_conntrack_common_retrans_value,
-		(void *)&cmd_set_conntrack_common_last_win,
-		(void *)&cmd_set_conntrack_common_last_win_value,
-		(void *)&cmd_set_conntrack_common_last_seq,
-		(void *)&cmd_set_conntrack_common_last_seq_value,
-		(void *)&cmd_set_conntrack_common_last_ack,
-		(void *)&cmd_set_conntrack_common_last_ack_value,
-		(void *)&cmd_set_conntrack_common_last_end,
-		(void *)&cmd_set_conntrack_common_last_end_value,
-		(void *)&cmd_set_conntrack_common_last_index,
-		(void *)&cmd_set_conntrack_common_last_index_value,
-		NULL,
-	},
-};
-
-/** Set connection tracking object both directions' details */
-struct cmd_set_conntrack_dir_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t conntrack;
-	cmdline_fixed_string_t dir;
-	cmdline_fixed_string_t scale;
-	cmdline_fixed_string_t fin;
-	cmdline_fixed_string_t ack_seen;
-	cmdline_fixed_string_t unack;
-	cmdline_fixed_string_t sent_end;
-	cmdline_fixed_string_t reply_end;
-	cmdline_fixed_string_t max_win;
-	cmdline_fixed_string_t max_ack;
-	uint32_t factor;
-	uint32_t f;
-	uint32_t as;
-	uint32_t un;
-	uint32_t se;
-	uint32_t re;
-	uint32_t mw;
-	uint32_t ma;
-};
-
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_dir =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 dir, "orig#rply");
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_scale =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 scale, "scale");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_scale_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      factor, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_fin =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 fin, "fin");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_fin_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      f, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_ack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 ack_seen, "acked");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_ack_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      as, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_unack_data =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 unack, "unack_data");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_unack_data_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      un, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_sent_end =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 sent_end, "sent_end");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_sent_end_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      se, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_reply_end =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 reply_end, "reply_end");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_reply_end_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      re, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_max_win =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 max_win, "max_win");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_max_win_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      mw, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_set_conntrack_dir_max_ack =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_conntrack_dir_result,
-				 max_ack, "max_ack");
-static cmdline_parse_token_num_t cmd_set_conntrack_dir_max_ack_value =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_conntrack_dir_result,
-			      ma, RTE_UINT32);
-
-static void cmd_set_conntrack_dir_parsed(void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_set_conntrack_dir_result *res = parsed_result;
-	struct rte_flow_tcp_dir_param *dir = NULL;
-
-	if (strcmp(res->dir, "orig") == 0)
-		dir = &conntrack_context.original_dir;
-	else if (strcmp(res->dir, "rply") == 0)
-		dir = &conntrack_context.reply_dir;
-	else
-		return;
-	dir->scale = res->factor;
-	dir->close_initiated = res->f;
-	dir->last_ack_seen = res->as;
-	dir->data_unacked = res->un;
-	dir->sent_end = res->se;
-	dir->reply_end = res->re;
-	dir->max_ack = res->ma;
-	dir->max_win = res->mw;
-}
-
-static cmdline_parse_inst_t cmd_set_conntrack_dir = {
-	.f = cmd_set_conntrack_dir_parsed,
-	.data = NULL,
-	.help_str = "set conntrack orig|rply scale <factor> fin <sent>"
-		    " acked <seen> unack_data <unack> sent_end <sent>"
-		    " reply_end <reply> max_win <win> max_ack <ack>",
-	.tokens = {
-		(void *)&cmd_set_conntrack_set,
-		(void *)&cmd_set_conntrack_conntrack,
-		(void *)&cmd_set_conntrack_dir_dir,
-		(void *)&cmd_set_conntrack_dir_scale,
-		(void *)&cmd_set_conntrack_dir_scale_value,
-		(void *)&cmd_set_conntrack_dir_fin,
-		(void *)&cmd_set_conntrack_dir_fin_value,
-		(void *)&cmd_set_conntrack_dir_ack,
-		(void *)&cmd_set_conntrack_dir_ack_value,
-		(void *)&cmd_set_conntrack_dir_unack_data,
-		(void *)&cmd_set_conntrack_dir_unack_data_value,
-		(void *)&cmd_set_conntrack_dir_sent_end,
-		(void *)&cmd_set_conntrack_dir_sent_end_value,
-		(void *)&cmd_set_conntrack_dir_reply_end,
-		(void *)&cmd_set_conntrack_dir_reply_end_value,
-		(void *)&cmd_set_conntrack_dir_max_win,
-		(void *)&cmd_set_conntrack_dir_max_win_value,
-		(void *)&cmd_set_conntrack_dir_max_ack,
-		(void *)&cmd_set_conntrack_dir_max_ack_value,
-		NULL,
-	},
-};
-
-/* Strict link priority scheduling mode setting */
-static void
-cmd_strict_link_prio_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_I40E
-	ret = rte_pmd_i40e_set_tc_strict_prio(res->port_id, res->tc_map);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid tc_bitmap 0x%x\n", res->tc_map);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_strict_link_prio = {
-	.f = cmd_strict_link_prio_parsed,
-	.data = NULL,
-	.help_str = "set tx strict-link-priority <port_id> <tc_bitmap>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_strict_link_prio,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_tc_map,
-		NULL,
-	},
-};
-
-/* Load dynamic device personalization*/
-struct cmd_ddp_add_result {
-	cmdline_fixed_string_t ddp;
-	cmdline_fixed_string_t add;
-	portid_t port_id;
-	char filepath[];
+	cmdline_fixed_string_t vxlan;
+	cmdline_fixed_string_t pos_token;
+	cmdline_fixed_string_t ip_version;
+	uint32_t vlan_present:1;
+	uint32_t vni;
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

app/test-pmd/config.c +0 -43

43 lines not on this page · raw message

app/test-pmd/testpmd.h +0 -2
index ab333c7324..eeefb5e70f 100644

Lines of this file are not shown. View the raw message.

doc/guides/nics/i40e.rst +184 -2

186 lines not on this page · raw message

doc/guides/testpmd_app_ug/testpmd_funcs.rst +2 -176

178 lines not on this page · raw message

drivers/net/i40e/i40e_testpmd.c new file +2634 -0

2,634 lines not on this page · raw message

drivers/net/i40e/meson.build +2 -0
index ce5317b811..84fd42754e 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.36.1

Part of the diff is not shown here. View the raw message.

Acked-by on v2 1/1 Applied
#42 lore raw

Re: [PATCH v2] net/i40e: move testpmd commands

Quoted 4 lines · David Marchand

Move related specific testpmd commands into this driver directory. While at it, fix checkpatch warnings.

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

doc/guides/testpmd_app_ug/testpmd_funcs.rst Driver specific commands · line 5548

Quoted 6 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +2 -0
@@ -5720,3 +5544,5 @@ Driver specific commands
 
  Some drivers provide specific features.
  See:
+
+- :ref:`net_i40e_testpmd_commands`

To have link text more distinctive, updating as following while merging:

- :ref:net/i40e testpmd driver specific commands <net_i40e_testpmd_commands>

#43 lore raw

PATCH 5/6 app/testpmd: drop ixgbe bypass commands

In reply to David Marchand

This code is dead from the moment we switched to meson, because RTE_LIBRTE_IXGBE_BYPASS is never defined at build time. There was no complaint about the loss of those commands, drop all associated code and documentation.

---
 app/test-pmd/cmdline.c                      | 368 --------------------
 app/test-pmd/testpmd.c                      |  14 -
 app/test-pmd/testpmd.h                      |   4 -
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  42 ---
 4 files changed, 428 deletions(-)
app/test-pmd/cmdline.c +0 -368
index 17778c2275..e496fa1d14 100644
@@ -554,29 +554,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"   Flush (default) or don't flush RX streams before"
 			" forwarding. Mainly used with PCAP drivers.\n\n"
 
-			"set bypass mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the bypass mode for the lowest port on bypass enabled"
-			" NIC.\n\n"
-
-			"set bypass event (timeout|os_on|os_off|power_on|power_off) "
-			"mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the event required to initiate specified bypass mode for"
-			" the lowest port on a bypass enabled NIC where:\n"
-			"       timeout   = enable bypass after watchdog timeout.\n"
-			"       os_on     = enable bypass when OS/board is powered on.\n"
-			"       os_off    = enable bypass when OS/board is powered off.\n"
-			"       power_on  = enable bypass when power supply is turned on.\n"
-			"       power_off = enable bypass when power supply is turned off."
-			"\n\n"
-
-			"set bypass timeout (0|1.5|2|3|4|8|16|32)\n"
-			"   Set the bypass watchdog timeout to 'n' seconds"
-			" where 0 = instant.\n\n"
-
-			"show bypass config (port_id)\n"
-			"   Show the bypass configuration for a bypass enabled NIC"
-			" using the lowest port on the NIC.\n\n"
-
 			"set link-up port (port_id)\n"
 			"	Set link up for a port.\n\n"
 
@@ -5446,347 +5423,6 @@ static cmdline_parse_inst_t cmd_set_link_check = {
 	},
 };
 
-/* *** SET NIC BYPASS MODE *** */
-struct cmd_set_bypass_mode_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_mode_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_set_bypass_mode_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int32_t rc = -EINVAL;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the bypass mode for the relevant port. */
-	rc = rte_pmd_ixgbe_bypass_state_set(port_id, &bypass_mode);
-#endif
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass mode for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_mode_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_mode_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_mode_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_mode_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_mode_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_mode = {
-	.f = cmd_set_bypass_mode_parsed,
-	.help_str = "set bypass mode normal|bypass|isolate <port_id>: "
-	            "Set the NIC bypass mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_mode_set,
-		(void *)&cmd_setbypass_mode_bypass,
-		(void *)&cmd_setbypass_mode_mode,
-		(void *)&cmd_setbypass_mode_value,
-		(void *)&cmd_setbypass_mode_port,
-		NULL,
-	},
-};
-
-/* *** SET NIC BYPASS EVENT *** */
-struct cmd_set_bypass_event_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t event;
-	cmdline_fixed_string_t event_value;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t mode_value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_event_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	int32_t rc = -EINVAL;
-	struct cmd_set_bypass_event_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->event_value, "timeout"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT;
-	else if (!strcmp(res->event_value, "os_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_ON;
-	else if (!strcmp(res->event_value, "os_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_OFF;
-	else if (!strcmp(res->event_value, "power_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_ON;
-	else if (!strcmp(res->event_value, "power_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_OFF;
-	else
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-
-	if (!strcmp(res->mode_value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->mode_value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the watchdog timeout. */
-	if (bypass_event == RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT) {
-
-		rc = -EINVAL;
-		if (RTE_PMD_IXGBE_BYPASS_TMT_VALID(bypass_timeout)) {
-			rc = rte_pmd_ixgbe_bypass_wd_timeout_store(port_id,
-							   bypass_timeout);
-		}
-		if (rc != 0) {
-			fprintf(stderr,
-				"Failed to set timeout value %u for port %d, errto code: %d.\n",
-				bypass_timeout, port_id, rc);
-		}
-	}
-
-	/* Set the bypass event to transition to bypass mode. */
-	rc = rte_pmd_ixgbe_bypass_event_store(port_id, bypass_event,
-					      bypass_mode);
-#endif
-
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass event for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_event_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_event_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_event_event =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event, "event");
-static cmdline_parse_token_string_t cmd_setbypass_event_event_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event_value, "none#timeout#os_off#os_on#power_on#power_off");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode_value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_event_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_event_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_event = {
-	.f = cmd_set_bypass_event_parsed,
-	.help_str = "set bypass event none|timeout|os_on|os_off|power_on|"
-		"power_off mode normal|bypass|isolate <port_id>: "
-		"Set the NIC bypass event mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_event_set,
-		(void *)&cmd_setbypass_event_bypass,
-		(void *)&cmd_setbypass_event_event,
-		(void *)&cmd_setbypass_event_event_value,
-		(void *)&cmd_setbypass_event_mode,
-		(void *)&cmd_setbypass_event_mode_value,
-		(void *)&cmd_setbypass_event_port,
-		NULL,
-	},
-};
-
-
-/* *** SET NIC BYPASS TIMEOUT *** */
-struct cmd_set_bypass_timeout_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t timeout;
-	cmdline_fixed_string_t value;
-};
-
-static void
-cmd_set_bypass_timeout_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	__rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	if (!strcmp(res->value, "1.5"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC;
-	else if (!strcmp(res->value, "2"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_2_SEC;
-	else if (!strcmp(res->value, "3"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_3_SEC;
-	else if (!strcmp(res->value, "4"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_4_SEC;
-	else if (!strcmp(res->value, "8"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_8_SEC;
-	else if (!strcmp(res->value, "16"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_16_SEC;
-	else if (!strcmp(res->value, "32"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_32_SEC;
-	else
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_timeout_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_timeout =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			timeout, "timeout");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			value, "0#1.5#2#3#4#8#16#32");
-
-static cmdline_parse_inst_t cmd_set_bypass_timeout = {
-	.f = cmd_set_bypass_timeout_parsed,
-	.help_str = "set bypass timeout 0|1.5|2|3|4|8|16|32: "
-		"Set the NIC bypass watchdog timeout in seconds",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_timeout_set,
-		(void *)&cmd_setbypass_timeout_bypass,
-		(void *)&cmd_setbypass_timeout_timeout,
-		(void *)&cmd_setbypass_timeout_value,
-		NULL,
-	},
-};
-
-/* *** SHOW NIC BYPASS MODE *** */
-struct cmd_show_bypass_config_result {
-	cmdline_fixed_string_t show;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t config;
-	portid_t port_id;
-};
-
-static void
-cmd_show_bypass_config_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_show_bypass_config_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int rc = -EINVAL;
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t event_mode;
-	uint32_t bypass_mode;
-	uint32_t timeout = bypass_timeout;
-	unsigned int i;
-
-	static const char * const timeouts[RTE_PMD_IXGBE_BYPASS_TMT_NUM] =
-		{"off", "1.5", "2", "3", "4", "8", "16", "32"};
-	static const char * const modes[RTE_PMD_IXGBE_BYPASS_MODE_NUM] =
-		{"UNKNOWN", "normal", "bypass", "isolate"};
-	static const char * const events[RTE_PMD_IXGBE_BYPASS_EVENT_NUM] = {
-		"NONE",
-		"OS/board on",
-		"power supply on",
-		"OS/board off",
-		"power supply off",
-		"timeout"};
-
-	/* Display the bypass mode.*/
-	if (rte_pmd_ixgbe_bypass_state_show(port_id, &bypass_mode) != 0) {
-		fprintf(stderr, "\tFailed to get bypass mode for port = %d\n",
-			port_id);
-		return;
-	}
-	else {
-		if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(bypass_mode))
-			bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-		printf("\tbypass mode    = %s\n",  modes[bypass_mode]);
-	}
-
-	/* Display the bypass timeout.*/
-	if (!RTE_PMD_IXGBE_BYPASS_TMT_VALID(timeout))
-		timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-
-	printf("\tbypass timeout = %s\n", timeouts[timeout]);
-
-	/* Display the bypass events and associated modes. */
-	for (i = RTE_PMD_IXGBE_BYPASS_EVENT_START; i < RTE_DIM(events); i++) {
-
-		if (rte_pmd_ixgbe_bypass_event_show(port_id, i, &event_mode)) {
-			fprintf(stderr,
-				"\tFailed to get bypass mode for event = %s\n",
-				events[i]);
-		} else {
-			if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(event_mode))
-				event_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-			printf("\tbypass event: %-16s = %s\n", events[i],
-				modes[event_mode]);
-		}
-	}
-#endif
-	if (rc != 0)
-		fprintf(stderr,
-			"\tFailed to get bypass configuration for port = %d\n",
-		       port_id);
-}
-
-static cmdline_parse_token_string_t cmd_showbypass_config_show =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			show, "show");
-static cmdline_parse_token_string_t cmd_showbypass_config_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_showbypass_config_config =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			config, "config");
-static cmdline_parse_token_num_t cmd_showbypass_config_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_show_bypass_config_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_show_bypass_config = {
-	.f = cmd_show_bypass_config_parsed,
-	.help_str = "show bypass config <port_id>: "
-	            "Show the NIC bypass config for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_showbypass_config_show,
-		(void *)&cmd_showbypass_config_bypass,
-		(void *)&cmd_showbypass_config_config,
-		(void *)&cmd_showbypass_config_port,
-		NULL,
-	},
-};
-
 /* *** SET FORWARDING MODE *** */
 struct cmd_set_fwd_mode_result {
 	cmdline_fixed_string_t set;
@@ -14153,10 +13789,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,
 	(cmdline_parse_inst_t *)&cmd_set_flush_rx,
 	(cmdline_parse_inst_t *)&cmd_set_link_check,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_mode,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_event,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_timeout,
-	(cmdline_parse_inst_t *)&cmd_show_bypass_config,
 	(cmdline_parse_inst_t *)&cmd_vlan_offload,
 	(cmdline_parse_inst_t *)&cmd_vlan_tpid,
 	(cmdline_parse_inst_t *)&cmd_rx_vlan_filter_all,
app/test-pmd/testpmd.c +0 -14
index 93ec930b15..caf691a09a 100644
@@ -437,16 +437,6 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) |
  */
 int do_mlockall = 0;
 
-/*
- * NIC bypass mode configuration options.
- */
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-/* The NIC bypass watchdog timeout. */
-uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-
-
 #ifdef RTE_LIB_LATENCYSTATS
 
 /*
@@ -3812,10 +3802,6 @@ init_port_config(void)
 		if (ret != 0)
 			return;
 
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-		rte_pmd_ixgbe_bypass_init(pid);
-#endif
-
 		if (lsc_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_LSC))
 			port->dev_conf.intr_conf.lsc = 1;
 		if (rmv_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_RMV))
app/test-pmd/testpmd.h +0 -4
index 6955c46654..8252daef95 100644
@@ -439,10 +439,6 @@ extern uint8_t hot_plug; /**< enable by "--hot-plug" parameter */
 extern int do_mlockall; /**< set by "--mlockall" or "--no-mlockall" parameter */
 extern uint8_t clear_ptypes; /**< disabled by set ptype cmd */
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
-extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
-#endif
-
 /*
  * Store specified sockets on which memory pool to be used by ports
  * is allocated.
doc/guides/testpmd_app_ug/testpmd_funcs.rst +0 -42

48 lines not on this page · raw message

Signature · 1 line
2.36.1
#44 lore raw

Re: [PATCH 5/6] app/testpmd: drop ixgbe bypass commands

Quoted 6 lines · David Marchand

This code is dead from the moment we switched to meson, because RTE_LIBRTE_IXGBE_BYPASS is never defined at build time. There was no complaint about the loss of those commands, drop all associated code and documentation.

'RTE_LIBRTE_IXGBE_BYPASS' is hardcoded in the 'drivers/net/ixgbe/meson.build'. And for testpmd, macro can be enabled by argument to meson, '-Dc_args=-RTE_LIBRTE_IXGBE_BYPASS'.

If ixgbe bypass mode agreed to remove, we can remove it, but I think above build time flag justification is not sufficient to remove it.

#45 lore raw

PATCH v2 1/3 app/testpmd: restore ixgbe bypass commands

In reply to David Marchand

Since the switch to meson, ixgbe bypass commands were ineffective as the RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the net/ixgbe driver had this feature compiled in.

Fixes 16ade738fd0d ("app/testpmd: build with meson")
---
 app/test-pmd/meson.build | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/meson.build +1 -0
index d13e98125e..69c7595a45 100644
@@ -68,6 +68,7 @@ if dpdk_conf.has('RTE_NET_I40E')
     deps += 'net_i40e'
 endif
 if dpdk_conf.has('RTE_NET_IXGBE')
+    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
     deps += 'net_ixgbe'
 endif
 if dpdk_conf.has('RTE_NET_DPAA')
Signature · 1 line
2.36.1
#46 lore raw

PATCH v2 2/3 net/ixgbe: move testpmd commands

Move related specific testpmd commands into this driver directory. The bypass init is left in testpmd at this point and can be moved later. While at it, fix checkpatch warnings.

---
Changes since v1:
- rebased on next-net,
- updated link in documentation to directly point at commands,
- moved bypass code but separated bypass init change in the next patch,

Changes since RFC v2:
- dropped bypass commands,
- updated documentation,
- fixed some indent,

---
 app/test-pmd/cmdline.c                      |  977 +-----------------
 app/test-pmd/testpmd.c                      |   10 -
 app/test-pmd/testpmd.h                      |    5 +-
 doc/guides/nics/ixgbe.rst                   |   95 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   90 +-
 drivers/net/ixgbe/ixgbe_testpmd.c           | 1008 +++++++++++++++++++
 drivers/net/ixgbe/meson.build               |    2 +
 7 files changed, 1109 insertions(+), 1078 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_testpmd.c
app/test-pmd/cmdline.c +1 -976
index a59e6166d5..73a9e5ac4c 100644
@@ -73,8 +73,6 @@ static cmdline_parse_ctx_t *main_ctx;
 static TAILQ_HEAD(, testpmd_driver_commands) driver_commands_head =
 	TAILQ_HEAD_INITIALIZER(driver_commands_head);
 
-static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
-
 /* *** Help command with introduction. *** */
 struct cmd_help_brief_result {
 	cmdline_fixed_string_t help;
@@ -348,24 +346,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set all queues drop (port_id) (on|off)\n"
 			"    Set drop enable bit for all queues.\n\n"
 
-			"set vf split drop (port_id) (vf_id) (on|off)\n"
-			"    Set split drop enable bit for a VF from the PF.\n\n"
-
 			"set vf mac antispoof (port_id) (vf_id) (on|off).\n"
 			"    Set MAC antispoof for a VF from the PF.\n\n"
 
-			"set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)\n"
-			"    Enable MACsec offload.\n\n"
-
-			"set macsec offload (port_id) off\n"
-			"    Disable MACsec offload.\n\n"
-
-			"set macsec sc (tx|rx) (port_id) (mac) (pi)\n"
-			"    Configure MACsec secure connection (SC).\n\n"
-
-			"set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)\n"
-			"    Configure MACsec secure association (SA).\n\n"
-
 			"set vf broadcast (port_id) (vf_id) (on|off)\n"
 			"    Set VF broadcast for a VF from the PF.\n\n"
 
@@ -396,9 +379,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set tx strict-link-priority (port_id) (tc_bitmap)\n"
 			"    Set some TCs' strict link priority mode on a physical port.\n\n"
 
-			"set tc tx min-bandwidth (port_id) (bw1, bw2, ...)\n"
-			"    Set all TCs' min bandwidth(%%) for all PF and VFs.\n\n"
-
 			"vlan set (strip|filter|qinq_strip|extend) (on|off) (port_id)\n"
 			"    Set the VLAN strip or filter or qinq strip or extend\n\n"
 
@@ -594,29 +574,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"   Flush (default) or don't flush RX streams before"
 			" forwarding. Mainly used with PCAP drivers.\n\n"
 
-			"set bypass mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the bypass mode for the lowest port on bypass enabled"
-			" NIC.\n\n"
-
-			"set bypass event (timeout|os_on|os_off|power_on|power_off) "
-			"mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the event required to initiate specified bypass mode for"
-			" the lowest port on a bypass enabled NIC where:\n"
-			"       timeout   = enable bypass after watchdog timeout.\n"
-			"       os_on     = enable bypass when OS/board is powered on.\n"
-			"       os_off    = enable bypass when OS/board is powered off.\n"
-			"       power_on  = enable bypass when power supply is turned on.\n"
-			"       power_off = enable bypass when power supply is turned off."
-			"\n\n"
-
-			"set bypass timeout (0|1.5|2|3|4|8|16|32)\n"
-			"   Set the bypass watchdog timeout to 'n' seconds"
-			" where 0 = instant.\n\n"
-
-			"show bypass config (port_id)\n"
-			"   Show the bypass configuration for a bypass enabled NIC"
-			" using the lowest port on the NIC.\n\n"
-
 #ifdef RTE_NET_BOND
 			"create bonded device (mode) (socket)\n"
 			"	Create a new bonded device with specific bonding mode and socket.\n\n"
@@ -5592,347 +5549,6 @@ static cmdline_parse_inst_t cmd_set_link_check = {
 	},
 };
 
-/* *** SET NIC BYPASS MODE *** */
-struct cmd_set_bypass_mode_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_mode_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_set_bypass_mode_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int32_t rc = -EINVAL;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the bypass mode for the relevant port. */
-	rc = rte_pmd_ixgbe_bypass_state_set(port_id, &bypass_mode);
-#endif
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass mode for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_mode_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_mode_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_mode_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_mode_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_mode_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_mode = {
-	.f = cmd_set_bypass_mode_parsed,
-	.help_str = "set bypass mode normal|bypass|isolate <port_id>: "
-	            "Set the NIC bypass mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_mode_set,
-		(void *)&cmd_setbypass_mode_bypass,
-		(void *)&cmd_setbypass_mode_mode,
-		(void *)&cmd_setbypass_mode_value,
-		(void *)&cmd_setbypass_mode_port,
-		NULL,
-	},
-};
-
-/* *** SET NIC BYPASS EVENT *** */
-struct cmd_set_bypass_event_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t event;
-	cmdline_fixed_string_t event_value;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t mode_value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_event_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	int32_t rc = -EINVAL;
-	struct cmd_set_bypass_event_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->event_value, "timeout"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT;
-	else if (!strcmp(res->event_value, "os_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_ON;
-	else if (!strcmp(res->event_value, "os_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_OFF;
-	else if (!strcmp(res->event_value, "power_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_ON;
-	else if (!strcmp(res->event_value, "power_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_OFF;
-	else
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-
-	if (!strcmp(res->mode_value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->mode_value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the watchdog timeout. */
-	if (bypass_event == RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT) {
-
-		rc = -EINVAL;
-		if (RTE_PMD_IXGBE_BYPASS_TMT_VALID(bypass_timeout)) {
-			rc = rte_pmd_ixgbe_bypass_wd_timeout_store(port_id,
-							   bypass_timeout);
-		}
-		if (rc != 0) {
-			fprintf(stderr,
-				"Failed to set timeout value %u for port %d, errto code: %d.\n",
-				bypass_timeout, port_id, rc);
-		}
-	}
-
-	/* Set the bypass event to transition to bypass mode. */
-	rc = rte_pmd_ixgbe_bypass_event_store(port_id, bypass_event,
-					      bypass_mode);
-#endif
-
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass event for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_event_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_event_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_event_event =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event, "event");
-static cmdline_parse_token_string_t cmd_setbypass_event_event_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event_value, "none#timeout#os_off#os_on#power_on#power_off");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode_value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_event_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_event_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_event = {
-	.f = cmd_set_bypass_event_parsed,
-	.help_str = "set bypass event none|timeout|os_on|os_off|power_on|"
-		"power_off mode normal|bypass|isolate <port_id>: "
-		"Set the NIC bypass event mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_event_set,
-		(void *)&cmd_setbypass_event_bypass,
-		(void *)&cmd_setbypass_event_event,
-		(void *)&cmd_setbypass_event_event_value,
-		(void *)&cmd_setbypass_event_mode,
-		(void *)&cmd_setbypass_event_mode_value,
-		(void *)&cmd_setbypass_event_port,
-		NULL,
-	},
-};
-
-
-/* *** SET NIC BYPASS TIMEOUT *** */
-struct cmd_set_bypass_timeout_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t timeout;
-	cmdline_fixed_string_t value;
-};
-
-static void
-cmd_set_bypass_timeout_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	__rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	if (!strcmp(res->value, "1.5"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC;
-	else if (!strcmp(res->value, "2"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_2_SEC;
-	else if (!strcmp(res->value, "3"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_3_SEC;
-	else if (!strcmp(res->value, "4"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_4_SEC;
-	else if (!strcmp(res->value, "8"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_8_SEC;
-	else if (!strcmp(res->value, "16"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_16_SEC;
-	else if (!strcmp(res->value, "32"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_32_SEC;
-	else
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_timeout_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_timeout =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			timeout, "timeout");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			value, "0#1.5#2#3#4#8#16#32");
-
-static cmdline_parse_inst_t cmd_set_bypass_timeout = {
-	.f = cmd_set_bypass_timeout_parsed,
-	.help_str = "set bypass timeout 0|1.5|2|3|4|8|16|32: "
-		"Set the NIC bypass watchdog timeout in seconds",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_timeout_set,
-		(void *)&cmd_setbypass_timeout_bypass,
-		(void *)&cmd_setbypass_timeout_timeout,
-		(void *)&cmd_setbypass_timeout_value,
-		NULL,
-	},
-};
-
-/* *** SHOW NIC BYPASS MODE *** */
-struct cmd_show_bypass_config_result {
-	cmdline_fixed_string_t show;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t config;
-	portid_t port_id;
-};
-
-static void
-cmd_show_bypass_config_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_show_bypass_config_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int rc = -EINVAL;
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t event_mode;
-	uint32_t bypass_mode;
-	uint32_t timeout = bypass_timeout;
-	unsigned int i;
-
-	static const char * const timeouts[RTE_PMD_IXGBE_BYPASS_TMT_NUM] =
-		{"off", "1.5", "2", "3", "4", "8", "16", "32"};
-	static const char * const modes[RTE_PMD_IXGBE_BYPASS_MODE_NUM] =
-		{"UNKNOWN", "normal", "bypass", "isolate"};
-	static const char * const events[RTE_PMD_IXGBE_BYPASS_EVENT_NUM] = {
-		"NONE",
-		"OS/board on",
-		"power supply on",
-		"OS/board off",
-		"power supply off",
-		"timeout"};
-
-	/* Display the bypass mode.*/
-	if (rte_pmd_ixgbe_bypass_state_show(port_id, &bypass_mode) != 0) {
-		fprintf(stderr, "\tFailed to get bypass mode for port = %d\n",
-			port_id);
-		return;
-	}
-	else {
-		if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(bypass_mode))
-			bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-		printf("\tbypass mode    = %s\n",  modes[bypass_mode]);
-	}
-
-	/* Display the bypass timeout.*/
-	if (!RTE_PMD_IXGBE_BYPASS_TMT_VALID(timeout))
-		timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-
-	printf("\tbypass timeout = %s\n", timeouts[timeout]);
-
-	/* Display the bypass events and associated modes. */
-	for (i = RTE_PMD_IXGBE_BYPASS_EVENT_START; i < RTE_DIM(events); i++) {
-
-		if (rte_pmd_ixgbe_bypass_event_show(port_id, i, &event_mode)) {
-			fprintf(stderr,
-				"\tFailed to get bypass mode for event = %s\n",
-				events[i]);
-		} else {
-			if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(event_mode))
-				event_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-			printf("\tbypass event: %-16s = %s\n", events[i],
-				modes[event_mode]);
-		}
-	}
-#endif
-	if (rc != 0)
-		fprintf(stderr,
-			"\tFailed to get bypass configuration for port = %d\n",
-		       port_id);
-}
-
-static cmdline_parse_token_string_t cmd_showbypass_config_show =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			show, "show");
-static cmdline_parse_token_string_t cmd_showbypass_config_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_showbypass_config_config =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			config, "config");
-static cmdline_parse_token_num_t cmd_showbypass_config_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_show_bypass_config_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_show_bypass_config = {
-	.f = cmd_show_bypass_config_parsed,
-	.help_str = "show bypass config <port_id>: "
-	            "Show the NIC bypass config for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_showbypass_config_show,
-		(void *)&cmd_showbypass_config_bypass,
-		(void *)&cmd_showbypass_config_config,
-		(void *)&cmd_showbypass_config_port,
-		NULL,
-	},
-};
-
 #ifdef RTE_NET_BOND
 /* *** SET BONDING MODE *** */
 struct cmd_set_bonding_mode_result {
@@ -11767,100 +11383,6 @@ static cmdline_parse_inst_t cmd_set_all_queues_drop_en = {
 	},
 };
 
-/* vf split drop enable configuration */
-
-/* Common result structure for vf split drop enable */
-struct cmd_vf_split_drop_en_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t split;
-	cmdline_fixed_string_t drop;
-	portid_t port_id;
-	uint16_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
-
-/* Common CLI fields for vf split drop enable disable */
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_split =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 split, "split");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_drop =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 drop, "drop");
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 on_off, "on#off");
-
-static void
-cmd_set_vf_split_drop_en_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_split_drop_en_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id,
-			is_on);
-#endif
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or is_on %d\n",
-			res->vf_id, is_on);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_split_drop_en = {
-	.f = cmd_set_vf_split_drop_en_parsed,
-	.data = NULL,
-	.help_str = "set vf split drop <port_id> <vf_id> on|off",
-	.tokens = {
-		(void *)&cmd_vf_split_drop_en_set,
-		(void *)&cmd_vf_split_drop_en_vf,
-		(void *)&cmd_vf_split_drop_en_split,
-		(void *)&cmd_vf_split_drop_en_drop,
-		(void *)&cmd_vf_split_drop_en_port_id,
-		(void *)&cmd_vf_split_drop_en_vf_id,
-		(void *)&cmd_vf_split_drop_en_on_off,
-		NULL,
-	},
-};
-
 /* vf mac address configuration */
 
 /* Common result structure for vf mac address */
@@ -11965,431 +11487,6 @@ static cmdline_parse_inst_t cmd_set_vf_mac_addr = {
 	},
 };
 
-/* MACsec configuration */
-
-/* Common result structure for MACsec offload enable */
-struct cmd_macsec_offload_on_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t on;
-	cmdline_fixed_string_t encrypt;
-	cmdline_fixed_string_t en_on_off;
-	cmdline_fixed_string_t replay_protect;
-	cmdline_fixed_string_t rp_on_off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_on_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_on_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_on_on =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 on, "on");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_encrypt =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 encrypt, "encrypt");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 en_on_off, "on#off");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_replay_protect =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 replay_protect, "replay-protect");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_rp_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 rp_on_off, "on#off");
-
-static void
-cmd_set_macsec_offload_on_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_on_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	portid_t port_id = res->port_id;
-	int en = (strcmp(res->en_on_off, "on") == 0) ? 1 : 0;
-	int rp = (strcmp(res->rp_on_off, "on") == 0) ? 1 : 0;
-	struct rte_eth_dev_info dev_info;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp);
-#endif
-	}
-	RTE_SET_USED(en);
-	RTE_SET_USED(rp);
-
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads |=
-						RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_on = {
-	.f = cmd_set_macsec_offload_on_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> on "
-		"encrypt on|off replay-protect on|off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_on_set,
-		(void *)&cmd_macsec_offload_on_macsec,
-		(void *)&cmd_macsec_offload_on_offload,
-		(void *)&cmd_macsec_offload_on_port_id,
-		(void *)&cmd_macsec_offload_on_on,
-		(void *)&cmd_macsec_offload_on_encrypt,
-		(void *)&cmd_macsec_offload_on_en_on_off,
-		(void *)&cmd_macsec_offload_on_replay_protect,
-		(void *)&cmd_macsec_offload_on_rp_on_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec offload disable */
-struct cmd_macsec_offload_off_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_off_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_off_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_off_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 off, "off");
-
-static void
-cmd_set_macsec_offload_off_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_off_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	struct rte_eth_dev_info dev_info;
-	portid_t port_id = res->port_id;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_disable(port_id);
-#endif
-	}
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads &=
-						~RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_off = {
-	.f = cmd_set_macsec_offload_off_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_off_set,
-		(void *)&cmd_macsec_offload_off_macsec,
-		(void *)&cmd_macsec_offload_off_offload,
-		(void *)&cmd_macsec_offload_off_port_id,
-		(void *)&cmd_macsec_offload_off_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sc_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sc;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	struct rte_ether_addr mac;
-	uint16_t pi;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sc_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sc_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sc_sc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 sc, "sc");
-static cmdline_parse_token_string_t cmd_macsec_sc_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sc_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_etheraddr_t cmd_macsec_sc_mac =
-	TOKEN_ETHERADDR_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 mac);
-static cmdline_parse_token_num_t cmd_macsec_sc_pi =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 pi, RTE_UINT16);
-
-static void
-cmd_set_macsec_sc_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sc_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_config_txsc(res->port_id,
-				res->mac.addr_bytes) :
-		rte_pmd_ixgbe_macsec_config_rxsc(res->port_id,
-				res->mac.addr_bytes, res->pi);
-#endif
-	RTE_SET_USED(is_tx);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sc = {
-	.f = cmd_set_macsec_sc_parsed,
-	.data = NULL,
-	.help_str = "set macsec sc tx|rx <port_id> <mac> <pi>",
-	.tokens = {
-		(void *)&cmd_macsec_sc_set,
-		(void *)&cmd_macsec_sc_macsec,
-		(void *)&cmd_macsec_sc_sc,
-		(void *)&cmd_macsec_sc_tx_rx,
-		(void *)&cmd_macsec_sc_port_id,
-		(void *)&cmd_macsec_sc_mac,
-		(void *)&cmd_macsec_sc_pi,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sa_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sa;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	uint8_t idx;
-	uint8_t an;
-	uint32_t pn;
-	cmdline_fixed_string_t key;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sa_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sa_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sa_sa =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 sa, "sa");
-static cmdline_parse_token_string_t cmd_macsec_sa_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sa_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_macsec_sa_idx =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 idx, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_an =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 an, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_pn =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 pn, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_macsec_sa_key =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 key, NULL);
-
-static void
-cmd_set_macsec_sa_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sa_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-	uint8_t key[16] = { 0 };
-	uint8_t xdgt0;
-	uint8_t xdgt1;
-	int key_len;
-	int i;
-
-	key_len = strlen(res->key) / 2;
-	if (key_len > 16)
-		key_len = 16;
-
-	for (i = 0; i < key_len; i++) {
-		xdgt0 = parse_and_check_key_hexa_digit(res->key, (i * 2));
-		if (xdgt0 == 0xFF)
-			return;
-		xdgt1 = parse_and_check_key_hexa_digit(res->key, (i * 2) + 1);
-		if (xdgt1 == 0xFF)
-			return;
-		key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1);
-	}
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_select_txsa(res->port_id,
-			res->idx, res->an, res->pn, key) :
-		rte_pmd_ixgbe_macsec_select_rxsa(res->port_id,
-			res->idx, res->an, res->pn, key);
-#endif
-	RTE_SET_USED(is_tx);
-	RTE_SET_USED(key);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid idx %d or an %d\n", res->idx, res->an);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sa = {
-	.f = cmd_set_macsec_sa_parsed,
-	.data = NULL,
-	.help_str = "set macsec sa tx|rx <port_id> <idx> <an> <pn> <key>",
-	.tokens = {
-		(void *)&cmd_macsec_sa_set,
-		(void *)&cmd_macsec_sa_macsec,
-		(void *)&cmd_macsec_sa_sa,
-		(void *)&cmd_macsec_sa_tx_rx,
-		(void *)&cmd_macsec_sa_port_id,
-		(void *)&cmd_macsec_sa_idx,
-		(void *)&cmd_macsec_sa_an,
-		(void *)&cmd_macsec_sa_pn,
-		(void *)&cmd_macsec_sa_key,
-		NULL,
-	},
-};
-
 /* VF unicast promiscuous mode configuration */
 
 /* Common result structure for VF unicast promiscuous mode */
@@ -12982,68 +12079,6 @@ static cmdline_parse_inst_t cmd_vf_tc_min_bw = {
 	},
 };
 
-static void
-cmd_tc_min_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	struct rte_port *port;
-	uint8_t tc_num;
-	uint8_t bw[16];
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	port = &ports[res->port_id];
-	/** Check if the port is not started **/
-	if (port->port_status != RTE_PORT_STOPPED) {
-		fprintf(stderr, "Please stop port %d first\n", res->port_id);
-		return;
-	}
-
-	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
-	if (ret)
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_tc_bw_alloc(res->port_id, tc_num, bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid bandwidth\n");
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_tc_min_bw = {
-	.f = cmd_tc_min_bw_parsed,
-	.data = NULL,
-	.help_str = "set tc tx min-bandwidth <port_id> <bw1, bw2, ...>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_min_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_bw_list,
-		NULL,
-	},
-};
-
 /* TC max bandwidth setting */
 static void
 cmd_vf_tc_max_bw_parsed(
@@ -17938,10 +16973,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,
 	(cmdline_parse_inst_t *)&cmd_set_flush_rx,
 	(cmdline_parse_inst_t *)&cmd_set_link_check,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_mode,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_event,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_timeout,
-	(cmdline_parse_inst_t *)&cmd_show_bypass_config,
 #ifdef RTE_NET_BOND
 	(cmdline_parse_inst_t *) &cmd_set_bonding_mode,
 	(cmdline_parse_inst_t *) &cmd_show_bonding_config,
@@ -18075,11 +17106,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
 	(cmdline_parse_inst_t *)&cmd_set_tx_loopback,
 	(cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_on,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_off,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sc,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sa,
 	(cmdline_parse_inst_t *)&cmd_set_vf_traffic,
 	(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
 	(cmdline_parse_inst_t *)&cmd_vf_rate_limit,
@@ -18093,7 +17119,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_vf_tc_min_bw,
 	(cmdline_parse_inst_t *)&cmd_vf_tc_max_bw,
 	(cmdline_parse_inst_t *)&cmd_strict_link_prio,
-	(cmdline_parse_inst_t *)&cmd_tc_min_bw,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
@@ -18280,7 +17305,7 @@ prompt_exit(void)
 	}
 }
 
-static void
+void
 cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
 {
 	if (id == (portid_t)RTE_PORT_ALL) {
app/test-pmd/testpmd.c +0 -10
index 205d98ee3d..4e8523f961 100644
@@ -442,16 +442,6 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) |
  */
 int do_mlockall = 0;
 
-/*
- * NIC bypass mode configuration options.
- */
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-/* The NIC bypass watchdog timeout. */
-uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-
-
 #ifdef RTE_LIB_LATENCYSTATS
 
 /*
app/test-pmd/testpmd.h +1 -4
index ab333c7324..00b9c4d9ca 100644
@@ -459,10 +459,6 @@ extern uint8_t hot_plug; /**< enable by "--hot-plug" parameter */
 extern int do_mlockall; /**< set by "--mlockall" or "--no-mlockall" parameter */
 extern uint8_t clear_ptypes; /**< disabled by set ptype cmd */
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
-extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
-#endif
-
 /*
  * Store specified sockets on which memory pool to be used by ports
  * is allocated.
@@ -891,6 +887,7 @@ unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
+void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
 void cmdline_read_from_file(const char *filename);
 int init_cmdline(void);
 void prompt(void);
doc/guides/nics/ixgbe.rst +95 -0

98 lines not on this page · raw message

doc/guides/testpmd_app_ug/testpmd_funcs.rst +2 -88

117 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_testpmd.c new file +1008 -0

1,008 lines not on this page · raw message

drivers/net/ixgbe/meson.build +2 -0
index 162f8d5f46..a18908ef7c 100644
@@ -20,6 +20,8 @@ sources = files(
         'rte_pmd_ixgbe.c',
 )
 
+testpmd_sources = files('ixgbe_testpmd.c')
+
 deps += ['hash', 'security']
 
 if arch_subdir == 'x86'
Signature · 1 line
2.36.1
#47 lore raw

PATCH v2 3/3 net/ixgbe: move bypass init in a testpmd command

In reply to David Marchand

Introduce a new command and remove the last part of specific port init from testpmd.

---
 app/test-pmd/meson.build          |  1 -
 app/test-pmd/testpmd.c            |  4 --
 doc/guides/nics/ixgbe.rst         |  7 +++
 drivers/net/ixgbe/ixgbe_testpmd.c | 82 +++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 5 deletions(-)
app/test-pmd/meson.build +0 -1
index 69c7595a45..d13e98125e 100644
@@ -68,7 +68,6 @@ if dpdk_conf.has('RTE_NET_I40E')
     deps += 'net_i40e'
 endif
 if dpdk_conf.has('RTE_NET_IXGBE')
-    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
     deps += 'net_ixgbe'
 endif
 if dpdk_conf.has('RTE_NET_DPAA')
app/test-pmd/testpmd.c +0 -4
index 4e8523f961..e11e2e2cb8 100644
@@ -3949,10 +3949,6 @@ init_port_config(void)
 		if (ret != 0)
 			return;
 
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-		rte_pmd_ixgbe_bypass_init(pid);
-#endif
-
 		if (lsc_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_LSC))
 			port->dev_conf.intr_conf.lsc = 1;
 		if (rmv_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_RMV))
doc/guides/nics/ixgbe.rst +7 -0
index ea4684c2dc..d450fc1ca0 100644
@@ -418,6 +418,13 @@ Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs::
 
    testpmd> set tc tx min-bandwidth (port_id) (bw1, bw2, ...)
 
+port config bypass
+~~~~~~~~~~~~~~~~~~
+
+Enable/disable bypass feature::
+
+   port config bypass (port_id) (on|off)
+
 set bypass mode
 ~~~~~~~~~~~~~~~
 
drivers/net/ixgbe/ixgbe_testpmd.c +82 -0

118 lines not on this page · raw message

Signature · 1 line
2.36.1
#48 lore raw

Re: [PATCH v2 3/3] net/ixgbe: move bypass init in a testpmd command

Quoted 43 lines · David Marchand

Introduce a new command and remove the last part of specific port init from testpmd.

---
  app/test-pmd/meson.build          |  1 -
  app/test-pmd/testpmd.c            |  4 --
  doc/guides/nics/ixgbe.rst         |  7 +++
  drivers/net/ixgbe/ixgbe_testpmd.c | 82 +++++++++++++++++++++++++++++++
  4 files changed, 89 insertions(+), 5 deletions(-)
app/test-pmd/meson.build +0 -1
index 69c7595a45..d13e98125e 100644
@@ -68,7 +68,6 @@ if dpdk_conf.has('RTE_NET_I40E')
      deps += 'net_i40e'
  endif
  if dpdk_conf.has('RTE_NET_IXGBE')
-    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
      deps += 'net_ixgbe'
  endif
  if dpdk_conf.has('RTE_NET_DPAA')
app/test-pmd/testpmd.c +0 -4
index 4e8523f961..e11e2e2cb8 100644
@@ -3949,10 +3949,6 @@ init_port_config(void)
  		if (ret != 0)
  			return;
 
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-		rte_pmd_ixgbe_bypass_init(pid);
-#endif
-
  		if (lsc_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_LSC))
  			port->dev_conf.intr_conf.lsc = 1;
  		if (rmv_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_RMV))
doc/guides/nics/ixgbe.rst +0 -0
index ea4684c2dc..d450fc1ca0 100644

doc/guides/nics/ixgbe.rst Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs:: · line 427

Quoted 10 lines
doc/guides/nics/ixgbe.rst +7 -0
@@ -418,6 +418,13 @@ Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs::
 
     testpmd> set tc tx min-bandwidth (port_id) (bw1, bw2, ...)
 
+port config bypass
+~~~~~~~~~~~~~~~~~~
+
+Enable/disable bypass feature::
+
+   port config bypass (port_id) (on|off)
+

Hi Qiming, Wenjun, Yu,

For me changes looks good but this set changes ixgbe bypass configuration in testpmd, instead of it being enabled by default, now an explicit command needs to be issued. This also can affect bypass testing.

Can you please test/comment on the set for the ixgbe bypass? For both functional and dts testing perspective?

Thanks,
ferruh

#49 lore raw

RE: [PATCH v2 3/3] net/ixgbe: move bypass init in a testpmd command

Quoted 73 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Tuesday, June 21, 2022 3:04 AM
To: Yang, Qiming <[email protected]>; Wu, Wenjun1 <[email protected]>; Jiang, YuX <[email protected]>
Cc: Li, Xiaoyun <[email protected]>; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>; [email protected]; David Marchand <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [PATCH v2 3/3] net/ixgbe: move bypass init in a testpmd command

Quoted 9 lines · David Marchand

Introduce a new command and remove the last part of specific port init from testpmd.

---
  app/test-pmd/meson.build          |  1 -
  app/test-pmd/testpmd.c            |  4 --
  doc/guides/nics/ixgbe.rst         |  7 +++
  drivers/net/ixgbe/ixgbe_testpmd.c | 82

+++++++++++++++++++++++++++++++

Quoted 19 lines
  4 files changed, 89 insertions(+), 5 deletions(-)
app/test-pmd/meson.build index renamed from app/test-pmd/meson.build +0 -0

69c7595a45..d13e98125e 100644

app/test-pmd/meson.build +0 -1
@@ -68,7 +68,6 @@ if dpdk_conf.has('RTE_NET_I40E')
      deps += 'net_i40e'
  endif
  if dpdk_conf.has('RTE_NET_IXGBE')
-    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
      deps += 'net_ixgbe'
  endif
  if dpdk_conf.has('RTE_NET_DPAA')
app/test-pmd/testpmd.c index renamed from app/test-pmd/testpmd.c +0 -0

4e8523f961..e11e2e2cb8 100644

app/test-pmd/testpmd.c init_port_config(void) · line 3952

Quoted 8 lines
app/test-pmd/testpmd.c +0 -4
@@ -3949,10 +3949,6 @@ init_port_config(void)
  		if (ret != 0)
  			return;
 
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-		rte_pmd_ixgbe_bypass_init(pid);
-#endif
-
  		if (lsc_interrupt && (*port->dev_info.dev_flags &

RTE_ETH_DEV_INTR_LSC))

doc/guides/nics/ixgbe.rst Set all TCs' TX min relative bandwidth (%) globally

Quoted 7 lines
app/test-pmd/testpmd.c +0 -0
  			port->dev_conf.intr_conf.lsc = 1;
  		if (rmv_interrupt && (*port->dev_info.dev_flags &

RTE_ETH_DEV_INTR_RMV)) diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst index ea4684c2dc..d450fc1ca0 100644

doc/guides/nics/ixgbe.rst +0 -0
@@ -418,6 +418,13 @@ Set all TCs' TX min relative bandwidth (%) globally

for all PF and VFs::

doc/guides/nics/ixgbe.rst Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs:: · line 427

Quoted 10 lines
doc/guides/nics/ixgbe.rst +7 -0
     testpmd> set tc tx min-bandwidth (port_id) (bw1, bw2, ...)
 
+port config bypass
+~~~~~~~~~~~~~~~~~~
+
+Enable/disable bypass feature::
+
+   port config bypass (port_id) (on|off)
+

Hi Qiming, Wenjun, Yu,

Quoted 6 lines

For me changes looks good but this set changes ixgbe bypass configuration in testpmd, instead of it being enabled by default, now an explicit command needs to be issued. This also can affect bypass testing.

Can you please test/comment on the set for the ixgbe bypass? For both functional and dts testing perspective?

Thanks for capture this, after internal discussion, though we think its low risk but we prefer to hold on this patch merge before get the result of a ixgbe regression test.

If we missed RC2, we should be able to capture it in RC3.

Thanks
Qi

Quoted 3 lines

Thanks,
ferruh

#50 lore raw

PATCH v3 1/3 app/testpmd: restore ixgbe bypass commands

In reply to David Marchand

Since the switch to meson, ixgbe bypass commands were ineffective as the RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the net/ixgbe driver had this feature compiled in.

Fixes 16ade738fd0d ("app/testpmd: build with meson")
---
 app/test-pmd/meson.build | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/meson.build +1 -0
index 74399178dd..12df1f8eec 100644
@@ -65,6 +65,7 @@ if dpdk_conf.has('RTE_NET_I40E')
     deps += 'net_i40e'
 endif
 if dpdk_conf.has('RTE_NET_IXGBE')
+    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
     deps += 'net_ixgbe'
 endif
 if dpdk_conf.has('RTE_NET_DPAA')
Signature · 1 line
2.36.1
#51 lore raw

PATCH v3 2/3 net/ixgbe: move testpmd commands

Move related specific testpmd commands into this driver directory. The bypass init is left in testpmd at this point and can be moved later. While at it, fix checkpatch warnings.

---
Changes since v2:
- rebased,

Changes since v1:
- rebased on next-net,
- updated link in documentation to directly point at commands,
- moved bypass code but separated bypass init change in the next patch,

Changes since RFC v2:
- dropped bypass commands,
- updated documentation,
- fixed some indent,

---
 app/test-pmd/cmdline.c                      | 1057 +------------------
 app/test-pmd/testpmd.c                      |   10 -
 app/test-pmd/testpmd.h                      |    5 +-
 doc/guides/nics/ixgbe.rst                   |   95 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   89 +-
 drivers/net/ixgbe/ixgbe_testpmd.c           | 1008 ++++++++++++++++++
 drivers/net/ixgbe/meson.build               |    2 +
 7 files changed, 1108 insertions(+), 1158 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_testpmd.c
app/test-pmd/cmdline.c +1 -1056
index b4fe9dfb17..fb1f532c57 100644
@@ -69,8 +69,6 @@ static cmdline_parse_ctx_t *main_ctx;
 static TAILQ_HEAD(, testpmd_driver_commands) driver_commands_head =
 	TAILQ_HEAD_INITIALIZER(driver_commands_head);
 
-static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
-
 /* *** Help command with introduction. *** */
 struct cmd_help_brief_result {
 	cmdline_fixed_string_t help;
@@ -335,24 +333,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set all queues drop (port_id) (on|off)\n"
 			"    Set drop enable bit for all queues.\n\n"
 
-			"set vf split drop (port_id) (vf_id) (on|off)\n"
-			"    Set split drop enable bit for a VF from the PF.\n\n"
-
 			"set vf mac antispoof (port_id) (vf_id) (on|off).\n"
 			"    Set MAC antispoof for a VF from the PF.\n\n"
 
-			"set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)\n"
-			"    Enable MACsec offload.\n\n"
-
-			"set macsec offload (port_id) off\n"
-			"    Disable MACsec offload.\n\n"
-
-			"set macsec sc (tx|rx) (port_id) (mac) (pi)\n"
-			"    Configure MACsec secure connection (SC).\n\n"
-
-			"set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)\n"
-			"    Configure MACsec secure association (SA).\n\n"
-
 			"vlan set stripq (on|off) (port_id,queue_id)\n"
 			"    Set the VLAN strip for a queue on a port.\n\n"
 
@@ -365,9 +348,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set vf vlan antispoof (port_id) (vf_id) (on|off)\n"
 			"    Set VLAN antispoof for a VF from the PF.\n\n"
 
-			"set tc tx min-bandwidth (port_id) (bw1, bw2, ...)\n"
-			"    Set all TCs' min bandwidth(%%) for all PF and VFs.\n\n"
-
 			"vlan set (strip|filter|qinq_strip|extend) (on|off) (port_id)\n"
 			"    Set the VLAN strip or filter or qinq strip or extend\n\n"
 
@@ -557,29 +537,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"   Flush (default) or don't flush RX streams before"
 			" forwarding. Mainly used with PCAP drivers.\n\n"
 
-			"set bypass mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the bypass mode for the lowest port on bypass enabled"
-			" NIC.\n\n"
-
-			"set bypass event (timeout|os_on|os_off|power_on|power_off) "
-			"mode (normal|bypass|isolate) (port_id)\n"
-			"   Set the event required to initiate specified bypass mode for"
-			" the lowest port on a bypass enabled NIC where:\n"
-			"       timeout   = enable bypass after watchdog timeout.\n"
-			"       os_on     = enable bypass when OS/board is powered on.\n"
-			"       os_off    = enable bypass when OS/board is powered off.\n"
-			"       power_on  = enable bypass when power supply is turned on.\n"
-			"       power_off = enable bypass when power supply is turned off."
-			"\n\n"
-
-			"set bypass timeout (0|1.5|2|3|4|8|16|32)\n"
-			"   Set the bypass watchdog timeout to 'n' seconds"
-			" where 0 = instant.\n\n"
-
-			"show bypass config (port_id)\n"
-			"   Show the bypass configuration for a bypass enabled NIC"
-			" using the lowest port on the NIC.\n\n"
-
 			"set link-up port (port_id)\n"
 			"	Set link up for a port.\n\n"
 
@@ -5404,347 +5361,6 @@ static cmdline_parse_inst_t cmd_set_link_check = {
 	},
 };
 
-/* *** SET NIC BYPASS MODE *** */
-struct cmd_set_bypass_mode_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_mode_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_set_bypass_mode_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int32_t rc = -EINVAL;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the bypass mode for the relevant port. */
-	rc = rte_pmd_ixgbe_bypass_state_set(port_id, &bypass_mode);
-#endif
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass mode for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_mode_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_mode_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_mode_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_mode_result,
-			value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_mode_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_mode_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_mode = {
-	.f = cmd_set_bypass_mode_parsed,
-	.help_str = "set bypass mode normal|bypass|isolate <port_id>: "
-	            "Set the NIC bypass mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_mode_set,
-		(void *)&cmd_setbypass_mode_bypass,
-		(void *)&cmd_setbypass_mode_mode,
-		(void *)&cmd_setbypass_mode_value,
-		(void *)&cmd_setbypass_mode_port,
-		NULL,
-	},
-};
-
-/* *** SET NIC BYPASS EVENT *** */
-struct cmd_set_bypass_event_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t event;
-	cmdline_fixed_string_t event_value;
-	cmdline_fixed_string_t mode;
-	cmdline_fixed_string_t mode_value;
-	portid_t port_id;
-};
-
-static void
-cmd_set_bypass_event_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	int32_t rc = -EINVAL;
-	struct cmd_set_bypass_event_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-	uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	if (!strcmp(res->event_value, "timeout"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT;
-	else if (!strcmp(res->event_value, "os_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_ON;
-	else if (!strcmp(res->event_value, "os_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_OS_OFF;
-	else if (!strcmp(res->event_value, "power_on"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_ON;
-	else if (!strcmp(res->event_value, "power_off"))
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_POWER_OFF;
-	else
-		bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE;
-
-	if (!strcmp(res->mode_value, "bypass"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_BYPASS;
-	else if (!strcmp(res->mode_value, "isolate"))
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE;
-	else
-		bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL;
-
-	/* Set the watchdog timeout. */
-	if (bypass_event == RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT) {
-
-		rc = -EINVAL;
-		if (RTE_PMD_IXGBE_BYPASS_TMT_VALID(bypass_timeout)) {
-			rc = rte_pmd_ixgbe_bypass_wd_timeout_store(port_id,
-							   bypass_timeout);
-		}
-		if (rc != 0) {
-			fprintf(stderr,
-				"Failed to set timeout value %u for port %d, errto code: %d.\n",
-				bypass_timeout, port_id, rc);
-		}
-	}
-
-	/* Set the bypass event to transition to bypass mode. */
-	rc = rte_pmd_ixgbe_bypass_event_store(port_id, bypass_event,
-					      bypass_mode);
-#endif
-
-	if (rc != 0)
-		fprintf(stderr, "\t Failed to set bypass event for port = %d.\n",
-			port_id);
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_event_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_event_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_event_event =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event, "event");
-static cmdline_parse_token_string_t cmd_setbypass_event_event_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			event_value, "none#timeout#os_off#os_on#power_on#power_off");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode, "mode");
-static cmdline_parse_token_string_t cmd_setbypass_event_mode_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_event_result,
-			mode_value, "normal#bypass#isolate");
-static cmdline_parse_token_num_t cmd_setbypass_event_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_set_bypass_event_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_set_bypass_event = {
-	.f = cmd_set_bypass_event_parsed,
-	.help_str = "set bypass event none|timeout|os_on|os_off|power_on|"
-		"power_off mode normal|bypass|isolate <port_id>: "
-		"Set the NIC bypass event mode for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_event_set,
-		(void *)&cmd_setbypass_event_bypass,
-		(void *)&cmd_setbypass_event_event,
-		(void *)&cmd_setbypass_event_event_value,
-		(void *)&cmd_setbypass_event_mode,
-		(void *)&cmd_setbypass_event_mode_value,
-		(void *)&cmd_setbypass_event_port,
-		NULL,
-	},
-};
-
-
-/* *** SET NIC BYPASS TIMEOUT *** */
-struct cmd_set_bypass_timeout_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t timeout;
-	cmdline_fixed_string_t value;
-};
-
-static void
-cmd_set_bypass_timeout_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	__rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result;
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	if (!strcmp(res->value, "1.5"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC;
-	else if (!strcmp(res->value, "2"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_2_SEC;
-	else if (!strcmp(res->value, "3"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_3_SEC;
-	else if (!strcmp(res->value, "4"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_4_SEC;
-	else if (!strcmp(res->value, "8"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_8_SEC;
-	else if (!strcmp(res->value, "16"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_16_SEC;
-	else if (!strcmp(res->value, "32"))
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_32_SEC;
-	else
-		bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-}
-
-static cmdline_parse_token_string_t cmd_setbypass_timeout_set =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			set, "set");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_timeout =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			timeout, "timeout");
-static cmdline_parse_token_string_t cmd_setbypass_timeout_value =
-	TOKEN_STRING_INITIALIZER(struct cmd_set_bypass_timeout_result,
-			value, "0#1.5#2#3#4#8#16#32");
-
-static cmdline_parse_inst_t cmd_set_bypass_timeout = {
-	.f = cmd_set_bypass_timeout_parsed,
-	.help_str = "set bypass timeout 0|1.5|2|3|4|8|16|32: "
-		"Set the NIC bypass watchdog timeout in seconds",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_setbypass_timeout_set,
-		(void *)&cmd_setbypass_timeout_bypass,
-		(void *)&cmd_setbypass_timeout_timeout,
-		(void *)&cmd_setbypass_timeout_value,
-		NULL,
-	},
-};
-
-/* *** SHOW NIC BYPASS MODE *** */
-struct cmd_show_bypass_config_result {
-	cmdline_fixed_string_t show;
-	cmdline_fixed_string_t bypass;
-	cmdline_fixed_string_t config;
-	portid_t port_id;
-};
-
-static void
-cmd_show_bypass_config_parsed(void *parsed_result,
-		__rte_unused struct cmdline *cl,
-		__rte_unused void *data)
-{
-	struct cmd_show_bypass_config_result *res = parsed_result;
-	portid_t port_id = res->port_id;
-	int rc = -EINVAL;
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-	uint32_t event_mode;
-	uint32_t bypass_mode;
-	uint32_t timeout = bypass_timeout;
-	unsigned int i;
-
-	static const char * const timeouts[RTE_PMD_IXGBE_BYPASS_TMT_NUM] =
-		{"off", "1.5", "2", "3", "4", "8", "16", "32"};
-	static const char * const modes[RTE_PMD_IXGBE_BYPASS_MODE_NUM] =
-		{"UNKNOWN", "normal", "bypass", "isolate"};
-	static const char * const events[RTE_PMD_IXGBE_BYPASS_EVENT_NUM] = {
-		"NONE",
-		"OS/board on",
-		"power supply on",
-		"OS/board off",
-		"power supply off",
-		"timeout"};
-
-	/* Display the bypass mode.*/
-	if (rte_pmd_ixgbe_bypass_state_show(port_id, &bypass_mode) != 0) {
-		fprintf(stderr, "\tFailed to get bypass mode for port = %d\n",
-			port_id);
-		return;
-	}
-	else {
-		if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(bypass_mode))
-			bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-		printf("\tbypass mode    = %s\n",  modes[bypass_mode]);
-	}
-
-	/* Display the bypass timeout.*/
-	if (!RTE_PMD_IXGBE_BYPASS_TMT_VALID(timeout))
-		timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-
-	printf("\tbypass timeout = %s\n", timeouts[timeout]);
-
-	/* Display the bypass events and associated modes. */
-	for (i = RTE_PMD_IXGBE_BYPASS_EVENT_START; i < RTE_DIM(events); i++) {
-
-		if (rte_pmd_ixgbe_bypass_event_show(port_id, i, &event_mode)) {
-			fprintf(stderr,
-				"\tFailed to get bypass mode for event = %s\n",
-				events[i]);
-		} else {
-			if (!RTE_PMD_IXGBE_BYPASS_MODE_VALID(event_mode))
-				event_mode = RTE_PMD_IXGBE_BYPASS_MODE_NONE;
-
-			printf("\tbypass event: %-16s = %s\n", events[i],
-				modes[event_mode]);
-		}
-	}
-#endif
-	if (rc != 0)
-		fprintf(stderr,
-			"\tFailed to get bypass configuration for port = %d\n",
-		       port_id);
-}
-
-static cmdline_parse_token_string_t cmd_showbypass_config_show =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			show, "show");
-static cmdline_parse_token_string_t cmd_showbypass_config_bypass =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			bypass, "bypass");
-static cmdline_parse_token_string_t cmd_showbypass_config_config =
-	TOKEN_STRING_INITIALIZER(struct cmd_show_bypass_config_result,
-			config, "config");
-static cmdline_parse_token_num_t cmd_showbypass_config_port =
-	TOKEN_NUM_INITIALIZER(struct cmd_show_bypass_config_result,
-				port_id, RTE_UINT16);
-
-static cmdline_parse_inst_t cmd_show_bypass_config = {
-	.f = cmd_show_bypass_config_parsed,
-	.help_str = "show bypass config <port_id>: "
-	            "Show the NIC bypass config for port_id",
-	.data = NULL,
-	.tokens = {
-		(void *)&cmd_showbypass_config_show,
-		(void *)&cmd_showbypass_config_bypass,
-		(void *)&cmd_showbypass_config_config,
-		(void *)&cmd_showbypass_config_port,
-		NULL,
-	},
-};
-
 /* *** SET FORWARDING MODE *** */
 struct cmd_set_fwd_mode_result {
 	cmdline_fixed_string_t set;
@@ -9967,100 +9583,6 @@ static cmdline_parse_inst_t cmd_set_all_queues_drop_en = {
 	},
 };
 
-/* vf split drop enable configuration */
-
-/* Common result structure for vf split drop enable */
-struct cmd_vf_split_drop_en_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t split;
-	cmdline_fixed_string_t drop;
-	portid_t port_id;
-	uint16_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
-
-/* Common CLI fields for vf split drop enable disable */
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_split =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 split, "split");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_drop =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 drop, "drop");
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 on_off, "on#off");
-
-static void
-cmd_set_vf_split_drop_en_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_split_drop_en_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id,
-			is_on);
-#endif
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or is_on %d\n",
-			res->vf_id, is_on);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_split_drop_en = {
-	.f = cmd_set_vf_split_drop_en_parsed,
-	.data = NULL,
-	.help_str = "set vf split drop <port_id> <vf_id> on|off",
-	.tokens = {
-		(void *)&cmd_vf_split_drop_en_set,
-		(void *)&cmd_vf_split_drop_en_vf,
-		(void *)&cmd_vf_split_drop_en_split,
-		(void *)&cmd_vf_split_drop_en_drop,
-		(void *)&cmd_vf_split_drop_en_port_id,
-		(void *)&cmd_vf_split_drop_en_vf_id,
-		(void *)&cmd_vf_split_drop_en_on_off,
-		NULL,
-	},
-};
-
 /* vf mac address configuration */
 
 /* Common result structure for vf mac address */
@@ -10165,573 +9687,6 @@ static cmdline_parse_inst_t cmd_set_vf_mac_addr = {
 	},
 };
 
-/* MACsec configuration */
-
-/* Common result structure for MACsec offload enable */
-struct cmd_macsec_offload_on_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t on;
-	cmdline_fixed_string_t encrypt;
-	cmdline_fixed_string_t en_on_off;
-	cmdline_fixed_string_t replay_protect;
-	cmdline_fixed_string_t rp_on_off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_on_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_on_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_on_on =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 on, "on");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_encrypt =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 encrypt, "encrypt");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 en_on_off, "on#off");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_replay_protect =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 replay_protect, "replay-protect");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_rp_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 rp_on_off, "on#off");
-
-static void
-cmd_set_macsec_offload_on_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_on_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	portid_t port_id = res->port_id;
-	int en = (strcmp(res->en_on_off, "on") == 0) ? 1 : 0;
-	int rp = (strcmp(res->rp_on_off, "on") == 0) ? 1 : 0;
-	struct rte_eth_dev_info dev_info;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp);
-#endif
-	}
-	RTE_SET_USED(en);
-	RTE_SET_USED(rp);
-
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads |=
-						RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_on = {
-	.f = cmd_set_macsec_offload_on_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> on "
-		"encrypt on|off replay-protect on|off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_on_set,
-		(void *)&cmd_macsec_offload_on_macsec,
-		(void *)&cmd_macsec_offload_on_offload,
-		(void *)&cmd_macsec_offload_on_port_id,
-		(void *)&cmd_macsec_offload_on_on,
-		(void *)&cmd_macsec_offload_on_encrypt,
-		(void *)&cmd_macsec_offload_on_en_on_off,
-		(void *)&cmd_macsec_offload_on_replay_protect,
-		(void *)&cmd_macsec_offload_on_rp_on_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec offload disable */
-struct cmd_macsec_offload_off_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_off_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_off_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_off_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 off, "off");
-
-static void
-cmd_set_macsec_offload_off_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_off_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	struct rte_eth_dev_info dev_info;
-	portid_t port_id = res->port_id;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_disable(port_id);
-#endif
-	}
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads &=
-						~RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_off = {
-	.f = cmd_set_macsec_offload_off_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_off_set,
-		(void *)&cmd_macsec_offload_off_macsec,
-		(void *)&cmd_macsec_offload_off_offload,
-		(void *)&cmd_macsec_offload_off_port_id,
-		(void *)&cmd_macsec_offload_off_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sc_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sc;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	struct rte_ether_addr mac;
-	uint16_t pi;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sc_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sc_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sc_sc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 sc, "sc");
-static cmdline_parse_token_string_t cmd_macsec_sc_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sc_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_etheraddr_t cmd_macsec_sc_mac =
-	TOKEN_ETHERADDR_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 mac);
-static cmdline_parse_token_num_t cmd_macsec_sc_pi =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 pi, RTE_UINT16);
-
-static void
-cmd_set_macsec_sc_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sc_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_config_txsc(res->port_id,
-				res->mac.addr_bytes) :
-		rte_pmd_ixgbe_macsec_config_rxsc(res->port_id,
-				res->mac.addr_bytes, res->pi);
-#endif
-	RTE_SET_USED(is_tx);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sc = {
-	.f = cmd_set_macsec_sc_parsed,
-	.data = NULL,
-	.help_str = "set macsec sc tx|rx <port_id> <mac> <pi>",
-	.tokens = {
-		(void *)&cmd_macsec_sc_set,
-		(void *)&cmd_macsec_sc_macsec,
-		(void *)&cmd_macsec_sc_sc,
-		(void *)&cmd_macsec_sc_tx_rx,
-		(void *)&cmd_macsec_sc_port_id,
-		(void *)&cmd_macsec_sc_mac,
-		(void *)&cmd_macsec_sc_pi,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sa_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sa;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	uint8_t idx;
-	uint8_t an;
-	uint32_t pn;
-	cmdline_fixed_string_t key;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sa_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sa_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sa_sa =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 sa, "sa");
-static cmdline_parse_token_string_t cmd_macsec_sa_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sa_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_macsec_sa_idx =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 idx, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_an =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 an, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_pn =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 pn, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_macsec_sa_key =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 key, NULL);
-
-static void
-cmd_set_macsec_sa_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sa_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-	uint8_t key[16] = { 0 };
-	uint8_t xdgt0;
-	uint8_t xdgt1;
-	int key_len;
-	int i;
-
-	key_len = strlen(res->key) / 2;
-	if (key_len > 16)
-		key_len = 16;
-
-	for (i = 0; i < key_len; i++) {
-		xdgt0 = parse_and_check_key_hexa_digit(res->key, (i * 2));
-		if (xdgt0 == 0xFF)
-			return;
-		xdgt1 = parse_and_check_key_hexa_digit(res->key, (i * 2) + 1);
-		if (xdgt1 == 0xFF)
-			return;
-		key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1);
-	}
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_select_txsa(res->port_id,
-			res->idx, res->an, res->pn, key) :
-		rte_pmd_ixgbe_macsec_select_rxsa(res->port_id,
-			res->idx, res->an, res->pn, key);
-#endif
-	RTE_SET_USED(is_tx);
-	RTE_SET_USED(key);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid idx %d or an %d\n", res->idx, res->an);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sa = {
-	.f = cmd_set_macsec_sa_parsed,
-	.data = NULL,
-	.help_str = "set macsec sa tx|rx <port_id> <idx> <an> <pn> <key>",
-	.tokens = {
-		(void *)&cmd_macsec_sa_set,
-		(void *)&cmd_macsec_sa_macsec,
-		(void *)&cmd_macsec_sa_sa,
-		(void *)&cmd_macsec_sa_tx_rx,
-		(void *)&cmd_macsec_sa_port_id,
-		(void *)&cmd_macsec_sa_idx,
-		(void *)&cmd_macsec_sa_an,
-		(void *)&cmd_macsec_sa_pn,
-		(void *)&cmd_macsec_sa_key,
-		NULL,
-	},
-};
-
-/* Common definition of VF and TC TX bandwidth configuration */
-struct cmd_vf_tc_bw_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t tc;
-	cmdline_fixed_string_t tx;
-	cmdline_fixed_string_t min_bw;
-	portid_t port_id;
-	cmdline_fixed_string_t bw_list;
-};
-
-static cmdline_parse_token_string_t cmd_vf_tc_bw_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tc, "tc");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tx, "tx");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_min_bw =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 min_bw, "min-bandwidth");
-static cmdline_parse_token_num_t cmd_vf_tc_bw_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_vf_tc_bw_bw_list =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 bw_list, NULL);
-
-static int
-vf_tc_min_bw_parse_bw_list(uint8_t *bw_list,
-			   uint8_t *tc_num,
-			   char *str)
-{
-	uint32_t size;
-	const char *p, *p0 = str;
-	char s[256];
-	char *end;
-	char *str_fld[16];
-	uint16_t i;
-	int ret;
-
-	p = strchr(p0, '(');
-	if (p == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	p++;
-	p0 = strchr(p, ')');
-	if (p0 == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	size = p0 - p;
-	if (size >= sizeof(s)) {
-		fprintf(stderr,
-			"The string size exceeds the internal buffer size\n");
-		return -1;
-	}
-	snprintf(s, sizeof(s), "%.*s", size, p);
-	ret = rte_strsplit(s, sizeof(s), str_fld, 16, ',');
-	if (ret <= 0) {
-		fprintf(stderr, "Failed to get the bandwidth list.\n");
-		return -1;
-	}
-	*tc_num = ret;
-	for (i = 0; i < ret; i++)
-		bw_list[i] = (uint8_t)strtoul(str_fld[i], &end, 0);
-
-	return 0;
-}
-
-static void
-cmd_tc_min_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	struct rte_port *port;
-	uint8_t tc_num;
-	uint8_t bw[16];
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	port = &ports[res->port_id];
-	/** Check if the port is not started **/
-	if (port->port_status != RTE_PORT_STOPPED) {
-		fprintf(stderr, "Please stop port %d first\n", res->port_id);
-		return;
-	}
-
-	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
-	if (ret)
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_tc_bw_alloc(res->port_id, tc_num, bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid bandwidth\n");
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_tc_min_bw = {
-	.f = cmd_tc_min_bw_parsed,
-	.data = NULL,
-	.help_str = "set tc tx min-bandwidth <port_id> <bw1, bw2, ...>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_min_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_bw_list,
-		NULL,
-	},
-};
-
 /** Set VXLAN encapsulation details */
 struct cmd_set_vxlan_result {
 	cmdline_fixed_string_t set;
@@ -14180,10 +13135,6 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,
 	(cmdline_parse_inst_t *)&cmd_set_flush_rx,
 	(cmdline_parse_inst_t *)&cmd_set_link_check,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_mode,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_event,
-	(cmdline_parse_inst_t *)&cmd_set_bypass_timeout,
-	(cmdline_parse_inst_t *)&cmd_show_bypass_config,
 	(cmdline_parse_inst_t *)&cmd_vlan_offload,
 	(cmdline_parse_inst_t *)&cmd_vlan_tpid,
 	(cmdline_parse_inst_t *)&cmd_rx_vlan_filter_all,
@@ -14304,17 +13255,11 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
 	(cmdline_parse_inst_t *)&cmd_set_tx_loopback,
 	(cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_on,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_off,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sc,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sa,
 	(cmdline_parse_inst_t *)&cmd_set_vf_traffic,
 	(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
 	(cmdline_parse_inst_t *)&cmd_vf_rate_limit,
 	(cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
 	(cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
-	(cmdline_parse_inst_t *)&cmd_tc_min_bw,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
@@ -14482,7 +13427,7 @@ prompt_exit(void)
 	}
 }
 
-static void
+void
 cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
 {
 	if (id == (portid_t)RTE_PORT_ALL) {
app/test-pmd/testpmd.c +0 -10
index addcbcac85..51da386fe8 100644
@@ -445,16 +445,6 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) |
  */
 int do_mlockall = 0;
 
-/*
- * NIC bypass mode configuration options.
- */
-
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-/* The NIC bypass watchdog timeout. */
-uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
-#endif
-
-
 #ifdef RTE_LIB_LATENCYSTATS
 
 /*
app/test-pmd/testpmd.h +1 -4
index fb2f5195d3..e2cc5a1d5b 100644
@@ -461,10 +461,6 @@ extern uint8_t hot_plug; /**< enable by "--hot-plug" parameter */
 extern int do_mlockall; /**< set by "--mlockall" or "--no-mlockall" parameter */
 extern uint8_t clear_ptypes; /**< disabled by set ptype cmd */
 
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
-extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
-#endif
-
 /*
  * Store specified sockets on which memory pool to be used by ports
  * is allocated.
@@ -893,6 +889,7 @@ unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
+void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
 void cmdline_read_from_file(const char *filename);
 int init_cmdline(void);
 void prompt(void);
doc/guides/nics/ixgbe.rst +95 -0

98 lines not on this page · raw message

doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -88

116 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_testpmd.c new file +1008 -0

1,008 lines not on this page · raw message

drivers/net/ixgbe/meson.build +2 -0
index 162f8d5f46..a18908ef7c 100644
@@ -20,6 +20,8 @@ sources = files(
         'rte_pmd_ixgbe.c',
 )
 
+testpmd_sources = files('ixgbe_testpmd.c')
+
 deps += ['hash', 'security']
 
 if arch_subdir == 'x86'
Signature · 1 line
2.36.1
#52 lore raw

PATCH v3 3/3 net/ixgbe: move bypass init in a testpmd command

In reply to David Marchand

Introduce a new command and remove the last part of specific port init from testpmd.

---
 app/test-pmd/meson.build          |  1 -
 app/test-pmd/testpmd.c            |  4 --
 doc/guides/nics/ixgbe.rst         |  7 +++
 drivers/net/ixgbe/ixgbe_testpmd.c | 82 +++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 5 deletions(-)
app/test-pmd/meson.build +0 -1
index 12df1f8eec..74399178dd 100644
@@ -65,7 +65,6 @@ if dpdk_conf.has('RTE_NET_I40E')
     deps += 'net_i40e'
 endif
 if dpdk_conf.has('RTE_NET_IXGBE')
-    cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
     deps += 'net_ixgbe'
 endif
 if dpdk_conf.has('RTE_NET_DPAA')
app/test-pmd/testpmd.c +0 -4
index 51da386fe8..b81d9b03a6 100644
@@ -3962,10 +3962,6 @@ init_port_config(void)
 		if (ret != 0)
 			return;
 
-#if defined RTE_NET_IXGBE && defined RTE_LIBRTE_IXGBE_BYPASS
-		rte_pmd_ixgbe_bypass_init(pid);
-#endif
-
 		if (lsc_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_LSC))
 			port->dev_conf.intr_conf.lsc = 1;
 		if (rmv_interrupt && (*port->dev_info.dev_flags & RTE_ETH_DEV_INTR_RMV))
doc/guides/nics/ixgbe.rst +7 -0
index ea4684c2dc..d450fc1ca0 100644
@@ -418,6 +418,13 @@ Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs::
 
    testpmd> set tc tx min-bandwidth (port_id) (bw1, bw2, ...)
 
+port config bypass
+~~~~~~~~~~~~~~~~~~
+
+Enable/disable bypass feature::
+
+   port config bypass (port_id) (on|off)
+
 set bypass mode
 ~~~~~~~~~~~~~~~
 
drivers/net/ixgbe/ixgbe_testpmd.c +82 -0

118 lines not on this page · raw message

Signature · 1 line
2.36.1
#53 lore raw

Re: [PATCH v3 3/3] net/ixgbe: move bypass init in a testpmd command

Quoted 4 lines · David Marchand

Introduce a new command and remove the last part of specific port init from testpmd.

Since there is no objection, I will proceed with this set, it was intended for previous release anyway.

In this release we will have time to address any possible issue.

Acked-by on v3 1/3
#54 lore raw

Re: [PATCH v3 1/3] app/testpmd: restore ixgbe bypass commands

In reply to David Marchand
Quoted 8 lines · David Marchand

Since the switch to meson, ixgbe bypass commands were ineffective as the RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the net/ixgbe driver had this feature compiled in.

Fixes 16ade738fd0d ("app/testpmd: build with meson")

For series,

Series applied to dpdk-next-net/main, thanks.

#55 lore raw

PATCH 6/6 net/ixgbe: move testpmd commands

In reply to David Marchand

Move related specific testpmd commands into this driver directory. While at it, fix checkpatch warnings.

---
Changes since RFC v2:
- dropped bypass commands,
- updated documentation,
- fixed some indent,

---
 app/test-pmd/cmdline.c                      | 688 +-------------------
 app/test-pmd/testpmd.h                      |   1 +
 doc/guides/nics/ixgbe.rst                   |  51 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  47 +-
 drivers/net/ixgbe/ixgbe_testpmd.c           | 657 +++++++++++++++++++
 drivers/net/ixgbe/meson.build               |   2 +
 6 files changed, 713 insertions(+), 733 deletions(-)
 create mode 100644 drivers/net/ixgbe/ixgbe_testpmd.c
app/test-pmd/cmdline.c +1 -687
index e496fa1d14..75e6c805d2 100644
@@ -69,8 +69,6 @@ static cmdline_parse_ctx_t *main_ctx;
 static TAILQ_HEAD(, testpmd_commands) commands_head =
 	TAILQ_HEAD_INITIALIZER(commands_head);
 
-static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
-
 /* *** Help command with introduction. *** */
 struct cmd_help_brief_result {
 	cmdline_fixed_string_t help;
@@ -335,24 +333,9 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set all queues drop (port_id) (on|off)\n"
 			"    Set drop enable bit for all queues.\n\n"
 
-			"set vf split drop (port_id) (vf_id) (on|off)\n"
-			"    Set split drop enable bit for a VF from the PF.\n\n"
-
 			"set vf mac antispoof (port_id) (vf_id) (on|off).\n"
 			"    Set MAC antispoof for a VF from the PF.\n\n"
 
-			"set macsec offload (port_id) on encrypt (on|off) replay-protect (on|off)\n"
-			"    Enable MACsec offload.\n\n"
-
-			"set macsec offload (port_id) off\n"
-			"    Disable MACsec offload.\n\n"
-
-			"set macsec sc (tx|rx) (port_id) (mac) (pi)\n"
-			"    Configure MACsec secure connection (SC).\n\n"
-
-			"set macsec sa (tx|rx) (port_id) (idx) (an) (pn) (key)\n"
-			"    Configure MACsec secure association (SA).\n\n"
-
 			"vlan set stripq (on|off) (port_id,queue_id)\n"
 			"    Set the VLAN strip for a queue on a port.\n\n"
 
@@ -365,8 +348,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set vf vlan antispoof (port_id) (vf_id) (on|off)\n"
 			"    Set VLAN antispoof for a VF from the PF.\n\n"
 
-			"set tc tx min-bandwidth (port_id) (bw1, bw2, ...)\n"
-			"    Set all TCs' min bandwidth(%%) for all PF and VFs.\n\n"
 
 			"vlan set (strip|filter|qinq_strip|extend) (on|off) (port_id)\n"
 			"    Set the VLAN strip or filter or qinq strip or extend\n\n"
@@ -9644,100 +9625,6 @@ static cmdline_parse_inst_t cmd_set_all_queues_drop_en = {
 	},
 };
 
-/* vf split drop enable configuration */
-
-/* Common result structure for vf split drop enable */
-struct cmd_vf_split_drop_en_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t vf;
-	cmdline_fixed_string_t split;
-	cmdline_fixed_string_t drop;
-	portid_t port_id;
-	uint16_t vf_id;
-	cmdline_fixed_string_t on_off;
-};
-
-/* Common CLI fields for vf split drop enable disable */
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_vf =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf, "vf");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_split =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 split, "split");
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_drop =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 drop, "drop");
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_vf_split_drop_en_vf_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 vf_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_vf_split_drop_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_split_drop_en_result,
-		 on_off, "on#off");
-
-static void
-cmd_set_vf_split_drop_en_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_split_drop_en_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_on = (strcmp(res->on_off, "on") == 0) ? 1 : 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_vf_split_drop_en(res->port_id, res->vf_id,
-			is_on);
-#endif
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid vf_id %d or is_on %d\n",
-			res->vf_id, is_on);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_vf_split_drop_en = {
-	.f = cmd_set_vf_split_drop_en_parsed,
-	.data = NULL,
-	.help_str = "set vf split drop <port_id> <vf_id> on|off",
-	.tokens = {
-		(void *)&cmd_vf_split_drop_en_set,
-		(void *)&cmd_vf_split_drop_en_vf,
-		(void *)&cmd_vf_split_drop_en_split,
-		(void *)&cmd_vf_split_drop_en_drop,
-		(void *)&cmd_vf_split_drop_en_port_id,
-		(void *)&cmd_vf_split_drop_en_vf_id,
-		(void *)&cmd_vf_split_drop_en_on_off,
-		NULL,
-	},
-};
-
 /* vf mac address configuration */
 
 /* Common result structure for vf mac address */
@@ -9842,573 +9729,6 @@ static cmdline_parse_inst_t cmd_set_vf_mac_addr = {
 	},
 };
 
-/* MACsec configuration */
-
-/* Common result structure for MACsec offload enable */
-struct cmd_macsec_offload_on_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t on;
-	cmdline_fixed_string_t encrypt;
-	cmdline_fixed_string_t en_on_off;
-	cmdline_fixed_string_t replay_protect;
-	cmdline_fixed_string_t rp_on_off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_on_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_on_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_on_on =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 on, "on");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_encrypt =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 encrypt, "encrypt");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_en_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 en_on_off, "on#off");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_replay_protect =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 replay_protect, "replay-protect");
-static cmdline_parse_token_string_t cmd_macsec_offload_on_rp_on_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_on_result,
-		 rp_on_off, "on#off");
-
-static void
-cmd_set_macsec_offload_on_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_on_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	portid_t port_id = res->port_id;
-	int en = (strcmp(res->en_on_off, "on") == 0) ? 1 : 0;
-	int rp = (strcmp(res->rp_on_off, "on") == 0) ? 1 : 0;
-	struct rte_eth_dev_info dev_info;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp);
-#endif
-	}
-	RTE_SET_USED(en);
-	RTE_SET_USED(rp);
-
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads |=
-						RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_on = {
-	.f = cmd_set_macsec_offload_on_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> on "
-		"encrypt on|off replay-protect on|off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_on_set,
-		(void *)&cmd_macsec_offload_on_macsec,
-		(void *)&cmd_macsec_offload_on_offload,
-		(void *)&cmd_macsec_offload_on_port_id,
-		(void *)&cmd_macsec_offload_on_on,
-		(void *)&cmd_macsec_offload_on_encrypt,
-		(void *)&cmd_macsec_offload_on_en_on_off,
-		(void *)&cmd_macsec_offload_on_replay_protect,
-		(void *)&cmd_macsec_offload_on_rp_on_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec offload disable */
-struct cmd_macsec_offload_off_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t offload;
-	portid_t port_id;
-	cmdline_fixed_string_t off;
-};
-
-/* Common CLI fields for MACsec offload disable */
-static cmdline_parse_token_string_t cmd_macsec_offload_off_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_offload_off_offload =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 offload, "offload");
-static cmdline_parse_token_num_t cmd_macsec_offload_off_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_macsec_offload_off_off =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_offload_off_result,
-		 off, "off");
-
-static void
-cmd_set_macsec_offload_off_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_offload_off_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	struct rte_eth_dev_info dev_info;
-	portid_t port_id = res->port_id;
-
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (!port_is_stopped(port_id)) {
-		fprintf(stderr, "Please stop port %d first\n", port_id);
-		return;
-	}
-
-	ret = eth_dev_info_get_print_err(port_id, &dev_info);
-	if (ret != 0)
-		return;
-
-	if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT) {
-#ifdef RTE_NET_IXGBE
-		ret = rte_pmd_ixgbe_macsec_disable(port_id);
-#endif
-	}
-	switch (ret) {
-	case 0:
-		ports[port_id].dev_conf.txmode.offloads &=
-						~RTE_ETH_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_offload_off = {
-	.f = cmd_set_macsec_offload_off_parsed,
-	.data = NULL,
-	.help_str = "set macsec offload <port_id> off",
-	.tokens = {
-		(void *)&cmd_macsec_offload_off_set,
-		(void *)&cmd_macsec_offload_off_macsec,
-		(void *)&cmd_macsec_offload_off_offload,
-		(void *)&cmd_macsec_offload_off_port_id,
-		(void *)&cmd_macsec_offload_off_off,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sc_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sc;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	struct rte_ether_addr mac;
-	uint16_t pi;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sc_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sc_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sc_sc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 sc, "sc");
-static cmdline_parse_token_string_t cmd_macsec_sc_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sc_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_etheraddr_t cmd_macsec_sc_mac =
-	TOKEN_ETHERADDR_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 mac);
-static cmdline_parse_token_num_t cmd_macsec_sc_pi =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sc_result,
-		 pi, RTE_UINT16);
-
-static void
-cmd_set_macsec_sc_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sc_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_config_txsc(res->port_id,
-				res->mac.addr_bytes) :
-		rte_pmd_ixgbe_macsec_config_rxsc(res->port_id,
-				res->mac.addr_bytes, res->pi);
-#endif
-	RTE_SET_USED(is_tx);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sc = {
-	.f = cmd_set_macsec_sc_parsed,
-	.data = NULL,
-	.help_str = "set macsec sc tx|rx <port_id> <mac> <pi>",
-	.tokens = {
-		(void *)&cmd_macsec_sc_set,
-		(void *)&cmd_macsec_sc_macsec,
-		(void *)&cmd_macsec_sc_sc,
-		(void *)&cmd_macsec_sc_tx_rx,
-		(void *)&cmd_macsec_sc_port_id,
-		(void *)&cmd_macsec_sc_mac,
-		(void *)&cmd_macsec_sc_pi,
-		NULL,
-	},
-};
-
-/* Common result structure for MACsec secure connection configure */
-struct cmd_macsec_sa_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t macsec;
-	cmdline_fixed_string_t sa;
-	cmdline_fixed_string_t tx_rx;
-	portid_t port_id;
-	uint8_t idx;
-	uint8_t an;
-	uint32_t pn;
-	cmdline_fixed_string_t key;
-};
-
-/* Common CLI fields for MACsec secure connection configure */
-static cmdline_parse_token_string_t cmd_macsec_sa_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_macsec_sa_macsec =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 macsec, "macsec");
-static cmdline_parse_token_string_t cmd_macsec_sa_sa =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 sa, "sa");
-static cmdline_parse_token_string_t cmd_macsec_sa_tx_rx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 tx_rx, "tx#rx");
-static cmdline_parse_token_num_t cmd_macsec_sa_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_num_t cmd_macsec_sa_idx =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 idx, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_an =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 an, RTE_UINT8);
-static cmdline_parse_token_num_t cmd_macsec_sa_pn =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 pn, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_macsec_sa_key =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_macsec_sa_result,
-		 key, NULL);
-
-static void
-cmd_set_macsec_sa_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_macsec_sa_result *res = parsed_result;
-	int ret = -ENOTSUP;
-	int is_tx = (strcmp(res->tx_rx, "tx") == 0) ? 1 : 0;
-	uint8_t key[16] = { 0 };
-	uint8_t xdgt0;
-	uint8_t xdgt1;
-	int key_len;
-	int i;
-
-	key_len = strlen(res->key) / 2;
-	if (key_len > 16)
-		key_len = 16;
-
-	for (i = 0; i < key_len; i++) {
-		xdgt0 = parse_and_check_key_hexa_digit(res->key, (i * 2));
-		if (xdgt0 == 0xFF)
-			return;
-		xdgt1 = parse_and_check_key_hexa_digit(res->key, (i * 2) + 1);
-		if (xdgt1 == 0xFF)
-			return;
-		key[i] = (uint8_t) ((xdgt0 * 16) + xdgt1);
-	}
-
-#ifdef RTE_NET_IXGBE
-	ret = is_tx ?
-		rte_pmd_ixgbe_macsec_select_txsa(res->port_id,
-			res->idx, res->an, res->pn, key) :
-		rte_pmd_ixgbe_macsec_select_rxsa(res->port_id,
-			res->idx, res->an, res->pn, key);
-#endif
-	RTE_SET_USED(is_tx);
-	RTE_SET_USED(key);
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid idx %d or an %d\n", res->idx, res->an);
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "not supported on port %d\n", res->port_id);
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_set_macsec_sa = {
-	.f = cmd_set_macsec_sa_parsed,
-	.data = NULL,
-	.help_str = "set macsec sa tx|rx <port_id> <idx> <an> <pn> <key>",
-	.tokens = {
-		(void *)&cmd_macsec_sa_set,
-		(void *)&cmd_macsec_sa_macsec,
-		(void *)&cmd_macsec_sa_sa,
-		(void *)&cmd_macsec_sa_tx_rx,
-		(void *)&cmd_macsec_sa_port_id,
-		(void *)&cmd_macsec_sa_idx,
-		(void *)&cmd_macsec_sa_an,
-		(void *)&cmd_macsec_sa_pn,
-		(void *)&cmd_macsec_sa_key,
-		NULL,
-	},
-};
-
-/* Common definition of VF and TC TX bandwidth configuration */
-struct cmd_vf_tc_bw_result {
-	cmdline_fixed_string_t set;
-	cmdline_fixed_string_t tc;
-	cmdline_fixed_string_t tx;
-	cmdline_fixed_string_t min_bw;
-	portid_t port_id;
-	cmdline_fixed_string_t bw_list;
-};
-
-static cmdline_parse_token_string_t cmd_vf_tc_bw_set =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 set, "set");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tc =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tc, "tc");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_tx =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 tx, "tx");
-static cmdline_parse_token_string_t cmd_vf_tc_bw_min_bw =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 min_bw, "min-bandwidth");
-static cmdline_parse_token_num_t cmd_vf_tc_bw_port_id =
-	TOKEN_NUM_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_vf_tc_bw_bw_list =
-	TOKEN_STRING_INITIALIZER
-		(struct cmd_vf_tc_bw_result,
-		 bw_list, NULL);
-
-static int
-vf_tc_min_bw_parse_bw_list(uint8_t *bw_list,
-			   uint8_t *tc_num,
-			   char *str)
-{
-	uint32_t size;
-	const char *p, *p0 = str;
-	char s[256];
-	char *end;
-	char *str_fld[16];
-	uint16_t i;
-	int ret;
-
-	p = strchr(p0, '(');
-	if (p == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	p++;
-	p0 = strchr(p, ')');
-	if (p0 == NULL) {
-		fprintf(stderr,
-			"The bandwidth-list should be '(bw1, bw2, ...)'\n");
-		return -1;
-	}
-	size = p0 - p;
-	if (size >= sizeof(s)) {
-		fprintf(stderr,
-			"The string size exceeds the internal buffer size\n");
-		return -1;
-	}
-	snprintf(s, sizeof(s), "%.*s", size, p);
-	ret = rte_strsplit(s, sizeof(s), str_fld, 16, ',');
-	if (ret <= 0) {
-		fprintf(stderr, "Failed to get the bandwidth list.\n");
-		return -1;
-	}
-	*tc_num = ret;
-	for (i = 0; i < ret; i++)
-		bw_list[i] = (uint8_t)strtoul(str_fld[i], &end, 0);
-
-	return 0;
-}
-
-static void
-cmd_tc_min_bw_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_vf_tc_bw_result *res = parsed_result;
-	struct rte_port *port;
-	uint8_t tc_num;
-	uint8_t bw[16];
-	int ret = -ENOTSUP;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	port = &ports[res->port_id];
-	/** Check if the port is not started **/
-	if (port->port_status != RTE_PORT_STOPPED) {
-		fprintf(stderr, "Please stop port %d first\n", res->port_id);
-		return;
-	}
-
-	ret = vf_tc_min_bw_parse_bw_list(bw, &tc_num, res->bw_list);
-	if (ret)
-		return;
-
-#ifdef RTE_NET_IXGBE
-	ret = rte_pmd_ixgbe_set_tc_bw_alloc(res->port_id, tc_num, bw);
-#endif
-
-	switch (ret) {
-	case 0:
-		break;
-	case -EINVAL:
-		fprintf(stderr, "invalid bandwidth\n");
-		break;
-	case -ENODEV:
-		fprintf(stderr, "invalid port_id %d\n", res->port_id);
-		break;
-	case -ENOTSUP:
-		fprintf(stderr, "function not implemented\n");
-		break;
-	default:
-		fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
-	}
-}
-
-static cmdline_parse_inst_t cmd_tc_min_bw = {
-	.f = cmd_tc_min_bw_parsed,
-	.data = NULL,
-	.help_str = "set tc tx min-bandwidth <port_id> <bw1, bw2, ...>",
-	.tokens = {
-		(void *)&cmd_vf_tc_bw_set,
-		(void *)&cmd_vf_tc_bw_tc,
-		(void *)&cmd_vf_tc_bw_tx,
-		(void *)&cmd_vf_tc_bw_min_bw,
-		(void *)&cmd_vf_tc_bw_port_id,
-		(void *)&cmd_vf_tc_bw_bw_list,
-		NULL,
-	},
-};
-
 /** Set VXLAN encapsulation details */
 struct cmd_set_vxlan_result {
 	cmdline_fixed_string_t set;
@@ -13904,17 +13224,11 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,
 	(cmdline_parse_inst_t *)&cmd_set_tx_loopback,
 	(cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_on,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_offload_off,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sc,
-	(cmdline_parse_inst_t *)&cmd_set_macsec_sa,
 	(cmdline_parse_inst_t *)&cmd_set_vf_traffic,
 	(cmdline_parse_inst_t *)&cmd_set_vf_rxmode,
 	(cmdline_parse_inst_t *)&cmd_vf_rate_limit,
 	(cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,
 	(cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,
-	(cmdline_parse_inst_t *)&cmd_tc_min_bw,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
 	(cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,
@@ -14093,7 +13407,7 @@ prompt_exit(void)
 	}
 }
 
-static void
+void
 cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
 {
 	if (id == (portid_t)RTE_PORT_ALL) {
app/test-pmd/testpmd.h +1 -0
index 8252daef95..7eb147c611 100644
@@ -867,6 +867,7 @@ unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
+void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
 void cmdline_read_from_file(const char *filename);
 int init_cmdline(void);
 void prompt(void);
doc/guides/nics/ixgbe.rst +51 -0

57 lines not on this page · raw message

doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -46

68 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_testpmd.c new file +657 -0

657 lines not on this page · raw message

drivers/net/ixgbe/meson.build +2 -0
index 162f8d5f46..a18908ef7c 100644
@@ -20,6 +20,8 @@ sources = files(
         'rte_pmd_ixgbe.c',
 )
 
+testpmd_sources = files('ixgbe_testpmd.c')
+
 deps += ['hash', 'security']
 
 if arch_subdir == 'x86'
Signature · 1 line
2.36.1
#56 lore raw
In reply to David Marchand
Quoted 33 lines · David Marchand

Hello,

Following TB decision [1] and recent discussions on the driver specific commands in testpmd, here is a proposal on how the split could be done.

For now, this series simply moves the testpmd code in the driver directory. The driver specific testpmd code is still compiled as part of testpmd compilation via a global meson testpmd_driver_sources list.

Notes:
- ixgbe bypass commands in testpmd were "dead" code since switch to meson, as the RTE_LIBRTE_IXGBE_BYPASS define is not set while compiling testpmd. No one complained about issue for the last two years, so those commands are dropped.

1:https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmails.dpdk.org%2Farchives%2Fdev%2F2022-April%2F239191.html&amp;data=05%7C01%7Cferruh.yigit%40amd.com%7C14ffb5d174e04def3edd08da3c8b59be%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637888866467042882%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=XH8MQEiCmLkL%2FtX9BIaogwoaYLqy7ZrGAGQa7M7KM7A%3D&amp;reserved=0

--
David Marchand

Changes since RFC v2:
- extended cleanup patch 1,
- fixed command registration (again..),
- dropped ixgbe bypass commands,
- fixed some indent,
- updated documentation,

Changes since RFC v1:
- added a cleanup as patch 1, to make all parser symbols static,
- fixed registering issue in patch 1,
- moved more i40e specific commands, fixed checkpatch warnings,

Quoted 7 lines

David Marchand (6):
app/testpmd: mark most cmdline symbols as static app/testpmd: register driver specific commands net/bonding: move testpmd commands net/i40e: move testpmd commands app/testpmd: drop ixgbe bypass commands net/ixgbe: move testpmd commands

+1 to split the PMD specific commands, and set lgtm. Thanks for the work.

#57 lore raw

v2 cover Split driver specific commands out of testpmd

In reply to David Marchand

Hello,

Following TB decision [1] and recent discussions on the driver specific commands in testpmd, here is a proposal on how the split could be done.

For now, this series simply moves the testpmd code in the driver directory. The driver specific testpmd code is still compiled as part of testpmd compilation via a global meson testpmd_driver_sources list.

1: https://mails.dpdk.org/archives/dev/2022-April/239191.html

Signature · 38 lines
David Marchand

Changes since v1:
- dropped drivers updates,
- handled comments on testpmd API,

Changes since RFC v2:
- extended cleanup patch 1,
- fixed command registration (again..),
- dropped ixgbe bypass commands,
- fixed some indent,
- updated documentation,

Changes since RFC v1:
- added a cleanup as patch 1, to make all parser symbols static,
- fixed registering issue in patch 1,
- moved more i40e specific commands, fixed checkpatch warnings,


David Marchand (2):
  app/testpmd: mark most cmdline symbols as static
  app/testpmd: register driver specific commands

 app/test-pmd/bpf_cmd.c                      |   20 +-
 app/test-pmd/cmdline.c                      | 2847 ++++++++++---------
 app/test-pmd/cmdline_flow.c                 |    8 +-
 app/test-pmd/cmdline_mtr.c                  |  219 +-
 app/test-pmd/cmdline_tm.c                   |  442 +--
 app/test-pmd/meson.build                    |    5 +
 app/test-pmd/testpmd.c                      |    4 +
 app/test-pmd/testpmd.h                      |   23 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   27 +-
 drivers/meson.build                         |    5 +
 meson.build                                 |    2 +
 11 files changed, 1846 insertions(+), 1756 deletions(-)

-- 
2.36.1
#58 lore raw

PATCH v2 1/2 app/testpmd: mark most cmdline symbols as static

All those symbols don't need to be global, plus it was hiding unused code such as:
- cmd_set_conntrack_dir_set and cmd_set_conntrack_dir_conntrack in cmdline.c,
- cmd_create_port_meter_g_action, cmd_create_port_meter_r_action, cmd_create_port_meter_y_action in cmdline_mtr.c,

Mark those symbols as static.

---
Changes since RFC v2:
- extended to other code units in testpmd,

---
 app/test-pmd/bpf_cmd.c      |   20 +-
 app/test-pmd/cmdline.c      | 2776 +++++++++++++++++------------------
 app/test-pmd/cmdline_flow.c |    8 +-
 app/test-pmd/cmdline_mtr.c  |  219 ++-
 app/test-pmd/cmdline_tm.c   |  442 +++---
 5 files changed, 1725 insertions(+), 1740 deletions(-)
app/test-pmd/bpf_cmd.c +10 -10
index 09c8aec0c0..648e0e9294 100644
@@ -117,20 +117,20 @@ static void cmd_operate_bpf_ld_parsed(void *parsed_result,
 		fprintf(stderr, "invalid value: %s\n", res->dir);
 }
 
-cmdline_parse_token_string_t cmd_load_bpf_start =
+static cmdline_parse_token_string_t cmd_load_bpf_start =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
 			bpf, "bpf-load");
-cmdline_parse_token_string_t cmd_load_bpf_dir =
+static cmdline_parse_token_string_t cmd_load_bpf_dir =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
 			dir, "rx#tx");
-cmdline_parse_token_num_t cmd_load_bpf_port =
+static cmdline_parse_token_num_t cmd_load_bpf_port =
 	TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, port, RTE_UINT8);
-cmdline_parse_token_num_t cmd_load_bpf_queue =
+static cmdline_parse_token_num_t cmd_load_bpf_queue =
 	TOKEN_NUM_INITIALIZER(struct cmd_bpf_ld_result, queue, RTE_UINT16);
-cmdline_parse_token_string_t cmd_load_bpf_flags =
+static cmdline_parse_token_string_t cmd_load_bpf_flags =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
 			flags, NULL);
-cmdline_parse_token_string_t cmd_load_bpf_prm =
+static cmdline_parse_token_string_t cmd_load_bpf_prm =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_ld_result,
 			prm, NULL);
 
@@ -173,15 +173,15 @@ static void cmd_operate_bpf_unld_parsed(void *parsed_result,
 		fprintf(stderr, "invalid value: %s\n", res->dir);
 }
 
-cmdline_parse_token_string_t cmd_unload_bpf_start =
+static cmdline_parse_token_string_t cmd_unload_bpf_start =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_unld_result,
 			bpf, "bpf-unload");
-cmdline_parse_token_string_t cmd_unload_bpf_dir =
+static cmdline_parse_token_string_t cmd_unload_bpf_dir =
 	TOKEN_STRING_INITIALIZER(struct cmd_bpf_unld_result,
 			dir, "rx#tx");
-cmdline_parse_token_num_t cmd_unload_bpf_port =
+static cmdline_parse_token_num_t cmd_unload_bpf_port =
 	TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, port, RTE_UINT8);
-cmdline_parse_token_num_t cmd_unload_bpf_queue =
+static cmdline_parse_token_num_t cmd_unload_bpf_queue =
 	TOKEN_NUM_INITIALIZER(struct cmd_bpf_unld_result, queue, RTE_UINT16);
 
 cmdline_parse_inst_t cmd_operate_bpf_unld_parse = {
app/test-pmd/cmdline.c +1385 -1391

2,955 lines not on this page · raw message

app/test-pmd/cmdline_flow.c +4 -4
index fc4a6d9cca..eabe936bbd 100644

Lines of this file are not shown. View the raw message.

app/test-pmd/cmdline_mtr.c +105 -114

219 lines not on this page · raw message

app/test-pmd/cmdline_tm.c +221 -221

442 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.36.1

Part of the diff is not shown here. View the raw message.

Acked-by on v2 1/2
#59 lore raw

Re: [PATCH v2 1/2] app/testpmd: mark most cmdline symbols as static

Quoted 7 lines · David Marchand

All those symbols don't need to be global, plus it was hiding unused code such as:
- cmd_set_conntrack_dir_set and cmd_set_conntrack_dir_conntrack in cmdline.c,
- cmd_create_port_meter_g_action, cmd_create_port_meter_r_action, cmd_create_port_meter_y_action in cmdline_mtr.c,

Quoted 5 lines

Mark those symbols as static.

#60 lore raw

PATCH v2 2/2 app/testpmd: register driver specific commands

In reply to David Marchand

Introduce a testpmd API so that drivers can register specific commands.

A driver can list some files to compile with testpmd, by setting them in the testpmd_sources (driver local) meson variable. drivers/meson.build then takes care of appending this to a global meson variable, and adding the driver to testpmd dependency.

Note: testpmd.h is fixed to that it is self sufficient when being included.

---
Changes since v1:
- simplified main_ctx allocation code,
- aligned structure/register function name/macro,

Changes since RFC v2:
- fixed registering issue (again..),
- updated internals and names of structure so that a usage string is associated to each cmdline ctx,
- updated documentation,

Changes since RFC v1:
- fixed registering issue,

---
 app/test-pmd/cmdline.c                      | 73 ++++++++++++++++++---
 app/test-pmd/meson.build                    |  5 ++
 app/test-pmd/testpmd.c                      |  4 ++
 app/test-pmd/testpmd.h                      | 23 +++++++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 27 +++++---
 drivers/meson.build                         |  5 ++
 meson.build                                 |  2 +
 7 files changed, 122 insertions(+), 17 deletions(-)
app/test-pmd/cmdline.c +65 -8
index 498fe2c2b7..64830db699 100644
@@ -69,6 +69,9 @@
 #include "bpf_cmd.h"
 
 static struct cmdline *testpmd_cl;
+static cmdline_parse_ctx_t *main_ctx;
+static TAILQ_HEAD(, testpmd_driver_commands) driver_commands_head =
+	TAILQ_HEAD_INITIALIZER(driver_commands_head);
 
 static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
 
@@ -93,7 +96,8 @@ static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
 		"    help registers                  : Reading and setting port registers.\n"
 		"    help filters                    : Filters configuration help.\n"
 		"    help traffic_management         : Traffic Management commands.\n"
-		"    help devices                    : Device related cmds.\n"
+		"    help devices                    : Device related commands.\n"
+		"    help drivers                    : Driver specific commands.\n"
 		"    help all                        : All of the above sections.\n\n"
 	);
 
@@ -1177,6 +1181,21 @@ static void cmd_help_long_parsed(void *parsed_result,
 		);
 	}
 
+	if (show_all || !strcmp(res->section, "drivers")) {
+		struct testpmd_driver_commands *c;
+		unsigned int i;
+
+		cmdline_printf(
+			cl,
+			"\n"
+			"Driver specific:\n"
+			"----------------\n"
+		);
+		TAILQ_FOREACH(c, &driver_commands_head, next) {
+			for (i = 0; c->commands[i].ctx != NULL; i++)
+				cmdline_printf(cl, "%s\n", c->commands[i].help);
+		}
+	}
 }
 
 static cmdline_parse_token_string_t cmd_help_long_help =
@@ -1184,14 +1203,14 @@ static cmdline_parse_token_string_t cmd_help_long_help =
 
 static cmdline_parse_token_string_t cmd_help_long_section =
 	TOKEN_STRING_INITIALIZER(struct cmd_help_long_result, section,
-			"all#control#display#config#"
-			"ports#registers#filters#traffic_management#devices");
+		"all#control#display#config#ports#registers#"
+		"filters#traffic_management#devices#drivers");
 
 static cmdline_parse_inst_t cmd_help_long = {
 	.f = cmd_help_long_parsed,
 	.data = NULL,
 	.help_str = "help all|control|display|config|ports|register|"
-		"filters|traffic_management|devices: "
+		"filters|traffic_management|devices|drivers: "
 		"Show help",
 	.tokens = {
 		(void *)&cmd_help_long_help,
@@ -17800,7 +17819,7 @@ static cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
 /* ******************************************************************************** */
 
 /* list of instructions */
-static cmdline_parse_ctx_t main_ctx[] = {
+static cmdline_parse_ctx_t builtin_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_help_brief,
 	(cmdline_parse_inst_t *)&cmd_help_long,
 	(cmdline_parse_inst_t *)&cmd_quit,
@@ -18086,6 +18105,47 @@ static cmdline_parse_ctx_t main_ctx[] = {
 	NULL,
 };
 
+void
+testpmd_add_driver_commands(struct testpmd_driver_commands *c)
+{
+	TAILQ_INSERT_TAIL(&driver_commands_head, c, next);
+}
+
+int
+init_cmdline(void)
+{
+	struct testpmd_driver_commands *c;
+	unsigned int count;
+	unsigned int i;
+
+	/* initialize non-constant commands */
+	cmd_set_fwd_mode_init();
+	cmd_set_fwd_retry_mode_init();
+
+	count = 0;
+	for (i = 0; builtin_ctx[i] != NULL; i++, count++)
+		;
+	TAILQ_FOREACH(c, &driver_commands_head, next) {
+		for (i = 0; c->commands[i].ctx != NULL; i++, count++)
+			;
+	}
+
+	/* cmdline expects a NULL terminated array */
+	main_ctx = calloc(count + 1, sizeof(main_ctx[0]));
+	if (main_ctx == NULL)
+		return -1;
+
+	count = 0;
+	for (i = 0; builtin_ctx[i] != NULL; i++, count++)
+		main_ctx[count] = builtin_ctx[i];
+	TAILQ_FOREACH(c, &driver_commands_head, next) {
+		for (i = 0; c->commands[i].ctx != NULL; i++, count++)
+			main_ctx[count] = c->commands[i].ctx;
+	}
+
+	return 0;
+}
+
 /* read cmdline commands from file */
 void
 cmdline_read_from_file(const char *filename)
@@ -18113,9 +18173,6 @@ void
 prompt(void)
 {
 	int ret;
-	/* initialize non-constant commands */
-	cmd_set_fwd_mode_init();
-	cmd_set_fwd_retry_mode_init();
 
 	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
 	if (testpmd_cl == NULL)
app/test-pmd/meson.build +5 -0
index 43130c8856..d13e98125e 100644
@@ -73,3 +73,8 @@ endif
 if dpdk_conf.has('RTE_NET_DPAA')
     deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa']
 endif
+
+# Driver-specific commands are located in driver directories.
+includes = include_directories('.')
+sources += testpmd_drivers_sources
+deps += testpmd_drivers_deps
app/test-pmd/testpmd.c +4 -0
index 79bb23264b..93ec930b15 100644
@@ -4275,6 +4275,10 @@ main(int argc, char** argv)
 	}
 #endif
 #ifdef RTE_LIB_CMDLINE
+	if (init_cmdline() != 0)
+		rte_exit(EXIT_FAILURE,
+			"Could not initialise cmdline context.\n");
+
 	if (strlen(cmdline_filename) != 0)
 		cmdline_read_from_file(cmdline_filename);
 
app/test-pmd/testpmd.h +23 -0
index 31f766c965..125db77d67 100644
@@ -16,7 +16,13 @@
 #include <rte_gso.h>
 #endif
 #include <rte_os_shim.h>
+#include <rte_ethdev.h>
+#include <rte_flow.h>
+#include <rte_mbuf_dyn.h>
+
 #include <cmdline.h>
+#include <cmdline_parse.h>
+
 #include <sys/queue.h>
 #ifdef RTE_HAS_JANSSON
 #include <jansson.h>
@@ -866,6 +872,7 @@ unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
 void cmdline_read_from_file(const char *filename);
+int init_cmdline(void);
 void prompt(void);
 void prompt_exit(void);
 void nic_stats_display(portid_t port_id);
@@ -1169,6 +1176,22 @@ extern int flow_parse(const char *src, void *result, unsigned int size,
 		      struct rte_flow_item **pattern,
 		      struct rte_flow_action **actions);
 
+/* For registering driver specific testpmd commands. */
+struct testpmd_driver_commands {
+	TAILQ_ENTRY(testpmd_driver_commands) next;
+	struct {
+		cmdline_parse_inst_t *ctx;
+		const char *help;
+	} commands[];
+};
+
+void testpmd_add_driver_commands(struct testpmd_driver_commands *c);
+#define TESTPMD_ADD_DRIVER_COMMANDS(c) \
+RTE_INIT(__##c) \
+{ \
+	testpmd_add_driver_commands(&c); \
+}
+
 /*
  * Work-around of a compilation error with ICC on invocations of the
  * rte_be_to_cpu_16() function.
doc/guides/testpmd_app_ug/testpmd_funcs.rst +18 -9
index 1083c6d538..bbeba554eb 100644
@@ -49,15 +49,18 @@ These are divided into sections and can be accessed using help, help section or
 .. code-block:: console
 
    testpmd> help
-
-       help control    : Start and stop forwarding.
-       help display    : Displaying port, stats and config information.
-       help config     : Configuration information.
-       help ports      : Configuring ports.
-       help registers  : Reading and setting port registers.
-       help filters    : Filters configuration help.
-       help all        : All of the above sections.
-
+       Help is available for the following sections:
+
+           help control                    : Start and stop forwarding.
+           help display                    : Displaying port, stats and config information.
+           help config                     : Configuration information.
+           help ports                      : Configuring ports.
+           help registers                  : Reading and setting port registers.
+           help filters                    : Filters configuration help.
+           help traffic_management         : Traffic Management commands.
+           help devices                    : Device related commands.
+           help drivers                    : Driver specific commands.
+           help all                        : All of the above sections.
 
 Command File Functions
 ----------------------
@@ -5702,3 +5705,9 @@ Flex pattern can be shared between ports.
 
    testpmd> flow create 0 ingress pattern eth / ipv4 / udp / flex item is 3 pattern is 2 / end actions mark id 1 / queue index 0 / end
    Flow rule #0 created
+
+Driver specific commands
+------------------------
+
+Some drivers provide specific features.
+See:
drivers/meson.build +5 -0
index 1d8123b00c..4daa2658b7 100644
@@ -102,6 +102,7 @@ foreach subpath:subdirs
         # static builds.
         ext_deps = []
         pkgconfig_extra_libs = []
+        testpmd_sources = []
 
         if not enable_drivers.contains(drv_path)
             build = false
@@ -246,6 +247,10 @@ foreach subpath:subdirs
         set_variable('shared_@0@'.format(lib_name), shared_dep)
         set_variable('static_@0@'.format(lib_name), static_dep)
         dependency_name = ''.join(lib_name.split('rte_'))
+        if testpmd_sources.length() != 0
+            testpmd_drivers_sources += testpmd_sources
+            testpmd_drivers_deps += dependency_name
+        endif
         if developer_mode
             message('drivers/@0@: Defining dependency "@1@"'.format(
                     drv_path, dependency_name))
meson.build +2 -0
index 937f6110c0..5561171617 100644
@@ -42,6 +42,8 @@ dpdk_drivers = []
 dpdk_extra_ldflags = []
 dpdk_libs_disabled = []
 dpdk_drvs_disabled = []
+testpmd_drivers_sources = []
+testpmd_drivers_deps = []
 abi_version_file = files('ABI_VERSION')
 
 if host_machine.cpu_family().startswith('x86')
Signature · 1 line
2.36.1
Acked-by on v2 2/2
#61 lore raw

Re: [PATCH v2 2/2] app/testpmd: register driver specific commands

24/05/2022 22:06, David Marchand:

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

Quoted 7 lines
app/test-pmd/cmdline.c +7 -0
+	count = 0;
+	for (i = 0; builtin_ctx[i] != NULL; i++, count++)
+		;
+	TAILQ_FOREACH(c, &driver_commands_head, next) {
+		for (i = 0; c->commands[i].ctx != NULL; i++, count++)
+			;
+	}

Just a personal preference:
the iterator "i" is incremented inside the "for" instructions, but I would have incremented "count" as a statement of the loops.

Thanks

#62 lore raw

Re: [PATCH v2 2/2] app/testpmd: register driver specific commands

Quoted 12 lines · Thomas Monjalon

24/05/2022 22:06, David Marchand:

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

Quoted 7 lines
app/test-pmd/cmdline.c +7 -0
+	count = 0;
+	for (i = 0; builtin_ctx[i] != NULL; i++, count++)
+		;
+	TAILQ_FOREACH(c, &driver_commands_head, next) {
+		for (i = 0; c->commands[i].ctx != NULL; i++, count++)
+			;
+	}

Just a personal preference:
the iterator "i" is incremented inside the "for" instructions, but I would have incremented "count" as a statement of the loops.

Since I dislike loops with empty body as well, I'll change it on applying.

Quoted 6 lines

Thanks

#63 lore raw

Re: [PATCH v2 2/2] app/testpmd: register driver specific commands

Quoted 11 lines · Andrew Rybchenko
Quoted 9 lines · Thomas Monjalon

24/05/2022 22:06, David Marchand:

Quoted 7 lines
app/test-pmd/cmdline.c +7 -0
+    count = 0;
+    for (i = 0; builtin_ctx[i] != NULL; i++, count++)
+            ;
+    TAILQ_FOREACH(c, &driver_commands_head, next) {
+            for (i = 0; c->commands[i].ctx != NULL; i++, count++)
+                    ;
+    }
Quoted 6 lines
Quoted 3 lines

Just a personal preference:
the iterator "i" is incremented inside the "for" instructions, but I would have incremented "count" as a statement of the loops.

Since I dislike loops with empty body as well, I'll change it on applying.

I am fine with the proposed form.
Thanks Andrew.

Signature · 1 line
David Marchand
#64 lore raw
In reply to David Marchand
Quoted 11 lines · David Marchand

Hello,

Following TB decision [1] and recent discussions on the driver specific commands in testpmd, here is a proposal on how the split could be done.

For now, this series simply moves the testpmd code in the driver directory. The driver specific testpmd code is still compiled as part of testpmd compilation via a global meson testpmd_driver_sources list.

1: https://mails.dpdk.org/archives/dev/2022-April/239191.html

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