[13/14] app/testpmd: remove flow_director_flex_mask command
diff mbox series

Message ID 1603030152-13451-14-git-send-email-arybchenko@solarflare.com
State Superseded
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: remove legacy filter API
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 18, 2020, 2:09 p.m. UTC
The command uses FDIR filter information get API which
is not supported any more.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/test-pmd/cmdline.c | 124 -----------------------------------------
 1 file changed, 124 deletions(-)

Comments

David Marchand Oct. 20, 2020, 10:53 a.m. UTC | #1
On Sun, Oct 18, 2020 at 4:14 PM Andrew Rybchenko
<arybchenko@solarflare.com> wrote:
>
> The command uses FDIR filter information get API which
> is not supported any more.
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Build error on parse_flexbytes():

FAILED: app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o
ccache clang -Iapp/a172ced@@dpdk-testpmd@exe -Iapp -I../../dpdk/app
-Ilib/librte_ethdev -I../../dpdk/lib/librte_ethdev -I. -I../../dpdk/
-Iconfig -I../../dpdk/config -Ilib/librte_eal/include
-I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include
-I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include
-I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_eal/common
-I../../dpdk/lib/librte_eal/common -Ilib/librte_eal
-I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
-I../../dpdk/lib/librte_kvargs
-Ilib/librte_telemetry/../librte_metrics
-I../../dpdk/lib/librte_telemetry/../librte_metrics
-Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry
-Ilib/librte_net -I../../dpdk/lib/librte_net -Ilib/librte_mbuf
-I../../dpdk/lib/librte_mbuf -Ilib/librte_mempool
-I../../dpdk/lib/librte_mempool -Ilib/librte_ring
-I../../dpdk/lib/librte_ring -Ilib/librte_meter
-I../../dpdk/lib/librte_meter -Ilib/librte_gro
-I../../dpdk/lib/librte_gro -Ilib/librte_gso
-I../../dpdk/lib/librte_gso -Ilib/librte_cmdline
-I../../dpdk/lib/librte_cmdline
-Ilib/librte_metrics/../librte_telemetry
-I../../dpdk/lib/librte_metrics/../librte_telemetry
-Ilib/librte_metrics -I../../dpdk/lib/librte_metrics -Idrivers/bus/pci
-I../../dpdk/drivers/bus/pci -I../../dpdk/drivers/bus/pci/linux
-Ilib/librte_pci -I../../dpdk/lib/librte_pci -Ilib/librte_bitratestats
-I../../dpdk/lib/librte_bitratestats -Ilib/librte_pdump
-I../../dpdk/lib/librte_pdump -Ilib/librte_latencystats
-I../../dpdk/lib/librte_latencystats -Idrivers/crypto/scheduler
-I../../dpdk/drivers/crypto/scheduler -Ilib/librte_cryptodev
-I../../dpdk/lib/librte_cryptodev -Idrivers/bus/vdev
-I../../dpdk/drivers/bus/vdev -Ilib/librte_reorder
-I../../dpdk/lib/librte_reorder -Idrivers/net/bonding
-I../../dpdk/drivers/net/bonding -Ilib/librte_sched
-I../../dpdk/lib/librte_sched -Ilib/librte_ip_frag
-I../../dpdk/lib/librte_ip_frag -Ilib/librte_hash
-I../../dpdk/lib/librte_hash -Idrivers/net/bnxt
-I../../dpdk/drivers/net/bnxt -I../../dpdk/drivers/net/bnxt/tf_ulp
-I../../dpdk/drivers/net/bnxt/tf_core -Idrivers/net/i40e
-I../../dpdk/drivers/net/i40e -Idrivers/net/i40e/base
-I../../dpdk/drivers/net/i40e/base -Idrivers/net/ixgbe
-I../../dpdk/drivers/net/ixgbe -Idrivers/net/ixgbe/base
-I../../dpdk/drivers/net/ixgbe/base -Ilib/librte_security
-I../../dpdk/lib/librte_security -Idrivers/bus/dpaa
-I../../dpdk/drivers/bus/dpaa -I../../dpdk/drivers/bus/dpaa/include
-I../../dpdk/drivers/bus/dpaa/base/qbman -Idrivers/common/dpaax
-I../../dpdk/drivers/common/dpaax
-I../../dpdk/drivers/common/dpaax/caamflib -Ilib/librte_eventdev
-I../../dpdk/lib/librte_eventdev -Ilib/librte_timer
-I../../dpdk/lib/librte_timer -Idrivers/mempool/dpaa
-I../../dpdk/drivers/mempool/dpaa -Idrivers/net/dpaa
-I../../dpdk/drivers/net/dpaa -Ilib/librte_bpf
-I../../dpdk/lib/librte_bpf
-I/home/dmarchan/intel-ipsec-mb/install/include -Xclang
-fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated
-Wformat-nonliteral -Wformat-security -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition
-Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings -Wno-address-of-packed-member
-Wno-missing-field-initializers -D_GNU_SOURCE -march=native
-DALLOW_EXPERIMENTAL_API -Wno-deprecated-declarations -MD -MQ
'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o' -MF
'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o.d' -o
'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o' -c
../../dpdk/app/test-pmd/cmdline.c
../../dpdk/app/test-pmd/cmdline.c:10098:1: error: unused function
'parse_flexbytes' [-Werror,-Wunused-function]
parse_flexbytes(const char *q_arg, uint8_t *flexbytes, uint16_t max_num)
^
1 error generated.
Andrew Rybchenko Oct. 22, 2020, 9:01 a.m. UTC | #2
On 10/20/20 1:53 PM, David Marchand wrote:
> On Sun, Oct 18, 2020 at 4:14 PM Andrew Rybchenko
> <arybchenko@solarflare.com> wrote:
>>
>> The command uses FDIR filter information get API which
>> is not supported any more.
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> Build error on parse_flexbytes():
> 
> FAILED: app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o
> ccache clang -Iapp/a172ced@@dpdk-testpmd@exe -Iapp -I../../dpdk/app
> -Ilib/librte_ethdev -I../../dpdk/lib/librte_ethdev -I. -I../../dpdk/
> -Iconfig -I../../dpdk/config -Ilib/librte_eal/include
> -I../../dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include
> -I../../dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include
> -I../../dpdk/lib/librte_eal/x86/include -Ilib/librte_eal/common
> -I../../dpdk/lib/librte_eal/common -Ilib/librte_eal
> -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
> -I../../dpdk/lib/librte_kvargs
> -Ilib/librte_telemetry/../librte_metrics
> -I../../dpdk/lib/librte_telemetry/../librte_metrics
> -Ilib/librte_telemetry -I../../dpdk/lib/librte_telemetry
> -Ilib/librte_net -I../../dpdk/lib/librte_net -Ilib/librte_mbuf
> -I../../dpdk/lib/librte_mbuf -Ilib/librte_mempool
> -I../../dpdk/lib/librte_mempool -Ilib/librte_ring
> -I../../dpdk/lib/librte_ring -Ilib/librte_meter
> -I../../dpdk/lib/librte_meter -Ilib/librte_gro
> -I../../dpdk/lib/librte_gro -Ilib/librte_gso
> -I../../dpdk/lib/librte_gso -Ilib/librte_cmdline
> -I../../dpdk/lib/librte_cmdline
> -Ilib/librte_metrics/../librte_telemetry
> -I../../dpdk/lib/librte_metrics/../librte_telemetry
> -Ilib/librte_metrics -I../../dpdk/lib/librte_metrics -Idrivers/bus/pci
> -I../../dpdk/drivers/bus/pci -I../../dpdk/drivers/bus/pci/linux
> -Ilib/librte_pci -I../../dpdk/lib/librte_pci -Ilib/librte_bitratestats
> -I../../dpdk/lib/librte_bitratestats -Ilib/librte_pdump
> -I../../dpdk/lib/librte_pdump -Ilib/librte_latencystats
> -I../../dpdk/lib/librte_latencystats -Idrivers/crypto/scheduler
> -I../../dpdk/drivers/crypto/scheduler -Ilib/librte_cryptodev
> -I../../dpdk/lib/librte_cryptodev -Idrivers/bus/vdev
> -I../../dpdk/drivers/bus/vdev -Ilib/librte_reorder
> -I../../dpdk/lib/librte_reorder -Idrivers/net/bonding
> -I../../dpdk/drivers/net/bonding -Ilib/librte_sched
> -I../../dpdk/lib/librte_sched -Ilib/librte_ip_frag
> -I../../dpdk/lib/librte_ip_frag -Ilib/librte_hash
> -I../../dpdk/lib/librte_hash -Idrivers/net/bnxt
> -I../../dpdk/drivers/net/bnxt -I../../dpdk/drivers/net/bnxt/tf_ulp
> -I../../dpdk/drivers/net/bnxt/tf_core -Idrivers/net/i40e
> -I../../dpdk/drivers/net/i40e -Idrivers/net/i40e/base
> -I../../dpdk/drivers/net/i40e/base -Idrivers/net/ixgbe
> -I../../dpdk/drivers/net/ixgbe -Idrivers/net/ixgbe/base
> -I../../dpdk/drivers/net/ixgbe/base -Ilib/librte_security
> -I../../dpdk/lib/librte_security -Idrivers/bus/dpaa
> -I../../dpdk/drivers/bus/dpaa -I../../dpdk/drivers/bus/dpaa/include
> -I../../dpdk/drivers/bus/dpaa/base/qbman -Idrivers/common/dpaax
> -I../../dpdk/drivers/common/dpaax
> -I../../dpdk/drivers/common/dpaax/caamflib -Ilib/librte_eventdev
> -I../../dpdk/lib/librte_eventdev -Ilib/librte_timer
> -I../../dpdk/lib/librte_timer -Idrivers/mempool/dpaa
> -I../../dpdk/drivers/mempool/dpaa -Idrivers/net/dpaa
> -I../../dpdk/drivers/net/dpaa -Ilib/librte_bpf
> -I../../dpdk/lib/librte_bpf
> -I/home/dmarchan/intel-ipsec-mb/install/include -Xclang
> -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Werror -O2 -g -include rte_config.h -Wextra -Wcast-qual -Wdeprecated
> -Wformat-nonliteral -Wformat-security -Wmissing-declarations
> -Wmissing-prototypes -Wnested-externs -Wold-style-definition
> -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
> -Wwrite-strings -Wno-address-of-packed-member
> -Wno-missing-field-initializers -D_GNU_SOURCE -march=native
> -DALLOW_EXPERIMENTAL_API -Wno-deprecated-declarations -MD -MQ
> 'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o' -MF
> 'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o.d' -o
> 'app/a172ced@@dpdk-testpmd@exe/test-pmd_cmdline.c.o' -c
> ../../dpdk/app/test-pmd/cmdline.c
> ../../dpdk/app/test-pmd/cmdline.c:10098:1: error: unused function
> 'parse_flexbytes' [-Werror,-Wunused-function]
> parse_flexbytes(const char *q_arg, uint8_t *flexbytes, uint16_t max_num)
> ^
> 1 error generated.

Thanks, will be fixed in v2.

Patch
diff mbox series

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9ce6c09567..d52db2f4b2 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -981,12 +981,6 @@  static void cmd_help_long_parsed(void *parsed_result,
 			" tunnel-id (tunnel_id_value)\n"
 			"    Set flow director Tunnel mask.\n\n"
 
-			"flow_director_flex_mask (port_id)"
-			" flow (none|ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|"
-			"ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|l2_payload|all)"
-			" (mask)\n"
-			"    Configure mask of flex payload.\n\n"
-
 			"flow_director_flex_payload (port_id)"
 			" (raw|l2|l3|l4) (config)\n"
 			"    Configure flex payload selection.\n\n"
@@ -10551,123 +10545,6 @@  cmdline_parse_inst_t cmd_set_flow_director_tunnel_mask = {
 	},
 };
 
-/* *** deal with flow director mask on flexible payload *** */
-struct cmd_flow_director_flex_mask_result {
-	cmdline_fixed_string_t flow_director_flexmask;
-	portid_t port_id;
-	cmdline_fixed_string_t flow;
-	cmdline_fixed_string_t flow_type;
-	cmdline_fixed_string_t mask;
-};
-
-static void
-cmd_flow_director_flex_mask_parsed(void *parsed_result,
-			  __rte_unused struct cmdline *cl,
-			  __rte_unused void *data)
-{
-	struct cmd_flow_director_flex_mask_result *res = parsed_result;
-	struct rte_eth_fdir_info fdir_info;
-	struct rte_eth_fdir_flex_mask flex_mask;
-	struct rte_port *port;
-	uint64_t flow_type_mask;
-	uint16_t i;
-	int ret;
-
-	port = &ports[res->port_id];
-	/** Check if the port is not started **/
-	if (port->port_status != RTE_PORT_STOPPED) {
-		printf("Please stop port %d first\n", res->port_id);
-		return;
-	}
-
-	memset(&flex_mask, 0, sizeof(struct rte_eth_fdir_flex_mask));
-	ret = parse_flexbytes(res->mask,
-			flex_mask.mask,
-			RTE_ETH_FDIR_MAX_FLEXLEN);
-	if (ret < 0) {
-		printf("error: Cannot parse mask input.\n");
-		return;
-	}
-
-	memset(&fdir_info, 0, sizeof(fdir_info));
-	ret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,
-				RTE_ETH_FILTER_INFO, &fdir_info);
-	if (ret < 0) {
-		printf("Cannot get FDir filter info\n");
-		return;
-	}
-
-	if (!strcmp(res->flow_type, "none")) {
-		/* means don't specify the flow type */
-		flex_mask.flow_type = RTE_ETH_FLOW_UNKNOWN;
-		for (i = 0; i < RTE_ETH_FLOW_MAX; i++)
-			memset(&port->dev_conf.fdir_conf.flex_conf.flex_mask[i],
-			       0, sizeof(struct rte_eth_fdir_flex_mask));
-		port->dev_conf.fdir_conf.flex_conf.nb_flexmasks = 1;
-		rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0],
-				 &flex_mask,
-				 sizeof(struct rte_eth_fdir_flex_mask));
-		cmd_reconfig_device_queue(res->port_id, 1, 1);
-		return;
-	}
-	flow_type_mask = fdir_info.flow_types_mask[0];
-	if (!strcmp(res->flow_type, "all")) {
-		if (!flow_type_mask) {
-			printf("No flow type supported\n");
-			return;
-		}
-		for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) {
-			if (flow_type_mask & (1ULL << i)) {
-				flex_mask.flow_type = i;
-				fdir_set_flex_mask(res->port_id, &flex_mask);
-			}
-		}
-		cmd_reconfig_device_queue(res->port_id, 1, 1);
-		return;
-	}
-	flex_mask.flow_type = str2flowtype(res->flow_type);
-	if (!(flow_type_mask & (1ULL << flex_mask.flow_type))) {
-		printf("Flow type %s not supported on port %d\n",
-				res->flow_type, res->port_id);
-		return;
-	}
-	fdir_set_flex_mask(res->port_id, &flex_mask);
-	cmd_reconfig_device_queue(res->port_id, 1, 1);
-}
-
-cmdline_parse_token_string_t cmd_flow_director_flexmask =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-				 flow_director_flexmask,
-				 "flow_director_flex_mask");
-cmdline_parse_token_num_t cmd_flow_director_flexmask_port_id =
-	TOKEN_NUM_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-			      port_id, UINT16);
-cmdline_parse_token_string_t cmd_flow_director_flexmask_flow =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-				 flow, "flow");
-cmdline_parse_token_string_t cmd_flow_director_flexmask_flow_type =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-		flow_type, "none#ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
-		"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#l2_payload#all");
-cmdline_parse_token_string_t cmd_flow_director_flexmask_mask =
-	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-				 mask, NULL);
-
-cmdline_parse_inst_t cmd_set_flow_director_flex_mask = {
-	.f = cmd_flow_director_flex_mask_parsed,
-	.data = NULL,
-	.help_str = "flow_director_flex_mask ... : "
-		"Set flow director's flex mask on NIC",
-	.tokens = {
-		(void *)&cmd_flow_director_flexmask,
-		(void *)&cmd_flow_director_flexmask_port_id,
-		(void *)&cmd_flow_director_flexmask_flow,
-		(void *)&cmd_flow_director_flexmask_flow_type,
-		(void *)&cmd_flow_director_flexmask_mask,
-		NULL,
-	},
-};
-
 /* *** deal with flow director flexible payload configuration *** */
 struct cmd_flow_director_flexpayload_result {
 	cmdline_fixed_string_t flow_director_flexpayload;
@@ -17659,7 +17536,6 @@  cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_ip_mask,
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_mac_vlan_mask,
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_tunnel_mask,
-	(cmdline_parse_inst_t *)&cmd_set_flow_director_flex_mask,
 	(cmdline_parse_inst_t *)&cmd_set_flow_director_flex_payload,
 	(cmdline_parse_inst_t *)&cmd_flow,
 	(cmdline_parse_inst_t *)&cmd_show_port_meter_cap,