DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 13/14] app/testpmd: remove command to set FDIR flexible filter mask
Date: Thu, 22 Oct 2020 10:42:36 +0100
Message-ID: <1603359758-13297-14-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1603359758-13297-1-git-send-email-arybchenko@solarflare.com>

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                      | 162 --------------------
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  16 --
 2 files changed, 178 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 719797b48d..2a363be41f 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"
@@ -10100,44 +10094,6 @@ cmdline_parse_inst_t cmd_show_queue_region_info_all = {
 
 /* *** Filters Control *** */
 
-static inline int
-parse_flexbytes(const char *q_arg, uint8_t *flexbytes, uint16_t max_num)
-{
-	char s[256];
-	const char *p, *p0 = q_arg;
-	char *end;
-	unsigned long int_fld;
-	char *str_fld[max_num];
-	int i;
-	unsigned size;
-	int ret = -1;
-
-	p = strchr(p0, '(');
-	if (p == NULL)
-		return -1;
-	++p;
-	p0 = strchr(p, ')');
-	if (p0 == NULL)
-		return -1;
-
-	size = p0 - p;
-	if (size >= sizeof(s))
-		return -1;
-
-	snprintf(s, sizeof(s), "%.*s", size, p);
-	ret = rte_strsplit(s, sizeof(s), str_fld, max_num, ',');
-	if (ret < 0 || ret > max_num)
-		return -1;
-	for (i = 0; i < ret; i++) {
-		errno = 0;
-		int_fld = strtoul(str_fld[i], &end, 0);
-		if (errno != 0 || *end != '\0' || int_fld > UINT8_MAX)
-			return -1;
-		flexbytes[i] = (uint8_t)int_fld;
-	}
-	return ret;
-}
-
 static uint16_t
 str2flowtype(char *string)
 {
@@ -10551,123 +10507,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 +17498,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,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 7f01864779..1564c25f5e 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3245,22 +3245,6 @@ Example, to set flow director mask on port 0::
             dst_mask 255.255.255.255 \
                 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF
 
-flow_director_flex_mask
-~~~~~~~~~~~~~~~~~~~~~~~
-
-set masks of flow director's flexible payload based on certain flow type::
-
-   testpmd> 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)
-
-Example, to set flow director's flex mask for all flow type on port 0::
-
-   testpmd> flow_director_flex_mask 0 flow all \
-            (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
-
-
 flow_director_flex_payload
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
2.17.1


  parent reply	other threads:[~2020-10-22  9:47 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18 14:08 [dpdk-dev] [PATCH 00/14] ethdev: remove legacy filter API Andrew Rybchenko
2020-10-18 14:08 ` [dpdk-dev] [PATCH 01/14] ethdev: remove legacy MACVLAN filter type support Andrew Rybchenko
2020-10-20 11:07   ` David Marchand
2020-10-21 16:34     ` Andrew Rybchenko
2020-10-21  3:31   ` Guo, Jia
2020-10-21 16:05     ` Andrew Rybchenko
2020-10-22  1:59       ` Guo, Jia
2020-10-18 14:08 ` [dpdk-dev] [PATCH 02/14] ethdev: move MAC filter type to i40e driver Andrew Rybchenko
2020-10-21  4:01   ` Guo, Jia
2020-10-21 16:09     ` Andrew Rybchenko
2020-10-22  2:58       ` Guo, Jia
2020-10-22  7:19         ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 03/14] ethdev: remove legacy EtherType filter type support Andrew Rybchenko
2020-10-18 22:13   ` Ajit Khaparde
2020-10-19  6:40   ` Wang, Haiyue
     [not found]   ` <BYAPR11MB3493BE2EB0D5B91DDDCD99758C1C0@BYAPR11MB3493.namprd11.prod.outlook.com>
2020-10-21  5:38     ` Guo, Jia
2020-10-21 16:12       ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 04/14] ethdev: remove legacy flexible " Andrew Rybchenko
2020-10-19  6:29   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 05/14] ethdev: move flexible filter type to e1000 driver Andrew Rybchenko
2020-10-19  6:20   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 06/14] ethdev: remove legacy SYN filter type support Andrew Rybchenko
2020-10-19  6:45   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 07/14] ethdev: remove legacy N-tuple " Andrew Rybchenko
2020-10-18 22:13   ` Ajit Khaparde
2020-10-19  6:47   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 08/14] ethdev: remove legacy TUNNEL " Andrew Rybchenko
2020-10-18 22:14   ` Ajit Khaparde
2020-10-19  8:01   ` Li, Xiaoyun
2020-10-18 14:09 ` [dpdk-dev] [PATCH 09/14] ethdev: remove legacy HASH " Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 10/14] ethdev: remove legacy L2_TUNNEL " Andrew Rybchenko
2020-10-19  6:42   ` Wang, Haiyue
2020-10-18 14:09 ` [dpdk-dev] [PATCH 11/14] ethdev: remove legacy global filter configuration support Andrew Rybchenko
2020-10-21  5:42   ` Guo, Jia
2020-10-18 14:09 ` [dpdk-dev] [PATCH 12/14] ethdev: remove legacy FDIR filter type support Andrew Rybchenko
2020-10-18 22:15   ` Ajit Khaparde
2020-10-19  6:53   ` Wang, Haiyue
2020-10-21  5:45   ` Guo, Jia
2020-10-21 16:17     ` Andrew Rybchenko
2020-10-22  2:45       ` Guo, Jia
2020-10-18 14:09 ` [dpdk-dev] [PATCH 13/14] app/testpmd: remove flow_director_flex_mask command Andrew Rybchenko
2020-10-20 10:53   ` David Marchand
2020-10-22  9:01     ` Andrew Rybchenko
2020-10-18 14:09 ` [dpdk-dev] [PATCH 14/14] ethdev: remove legacy filter API functions Andrew Rybchenko
2020-10-20 10:47   ` David Marchand
2020-10-20 14:52   ` Ferruh Yigit
2020-10-22  9:12     ` Andrew Rybchenko
2020-10-22  9:33       ` Ferruh Yigit
2020-10-22  9:42 ` [dpdk-dev] [PATCH v2 00/14] ethdev: remove legacy filter API Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 01/14] ethdev: remove legacy MACVLAN filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 02/14] ethdev: move MAC filter type to i40e driver Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 03/14] ethdev: remove legacy EtherType filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 04/14] ethdev: remove legacy flexible " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 05/14] ethdev: move flexible filter type to e1000 driver Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 06/14] ethdev: remove legacy SYN filter type support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 07/14] ethdev: remove legacy N-tuple " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 08/14] ethdev: remove legacy TUNNEL " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 09/14] ethdev: remove legacy HASH " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 10/14] ethdev: remove legacy L2_TUNNEL " Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 11/14] ethdev: remove legacy global filter configuration support Andrew Rybchenko
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 12/14] ethdev: remove legacy FDIR filter type support Andrew Rybchenko
2020-10-23  3:32     ` Hyong Youb Kim (hyonkim)
2020-10-23  6:41       ` Andrew Rybchenko
2020-10-22  9:42   ` Andrew Rybchenko [this message]
2020-10-22  9:42   ` [dpdk-dev] [PATCH v2 14/14] ethdev: remove legacy filter API functions Andrew Rybchenko
2020-10-23 16:03   ` [dpdk-dev] [PATCH v2 00/14] ethdev: remove legacy filter API Ferruh Yigit
2020-10-29 21:36     ` Ferruh Yigit

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=1603359758-13297-14-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

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

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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

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

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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