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>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,
	Jeff Guo <jia.guo@intel.com>, Haiyue Wang <haiyue.wang@intel.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 10/14] ethdev: remove legacy L2_TUNNEL filter type support
Date: Thu, 22 Oct 2020 10:42:33 +0100
Message-ID: <1603359758-13297-11-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1603359758-13297-1-git-send-email-arybchenko@solarflare.com>

Instead of L2 tunnel filter RTE flow API should be used.

Preserve RTE_ETH_FILTER_L2_TUNNEL since it is used in drivers
internally in RTE flow API support.

rte_eth_l2_tunnel_conf structure is used in other ethdev API
functions.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 app/test-pmd/cmdline.c                      | 123 --------------------
 doc/guides/rel_notes/deprecation.rst        |   3 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   7 --
 drivers/net/ixgbe/ixgbe_ethdev.c            |  48 --------
 drivers/net/qede/qede_filter.c              |   1 -
 5 files changed, 1 insertion(+), 181 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 61bc840f71..27b7086da8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -664,13 +664,6 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Enable/disable E-tag based forwarding"
 			" on a port\n\n"
 
-			"E-tag set filter add e-tag-id (value) dst-pool"
-			" (pool_id) port (port_id)\n"
-			"    Add an E-tag forwarding filter on a port\n\n"
-
-			"E-tag set filter del e-tag-id (value) port (port_id)\n"
-			"    Delete an E-tag forwarding filter on a port\n\n"
-
 			"ddp add (port_id) (profile_path[,backup_profile_path])\n"
 			"    Load a profile package on a port\n\n"
 
@@ -12199,120 +12192,6 @@ cmdline_parse_inst_t cmd_config_e_tag_forwarding_en_dis = {
 	},
 };
 
-/* E-tag filter configuration */
-static void
-cmd_config_e_tag_filter_add_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_config_e_tag_result *res = parsed_result;
-	struct rte_eth_l2_tunnel_conf entry;
-	int ret = 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	if (res->e_tag_id_val > 0x3fff) {
-		printf("e-tag-id must be equal or less than 0x3fff.\n");
-		return;
-	}
-
-	ret = rte_eth_dev_filter_supported(res->port_id,
-					   RTE_ETH_FILTER_L2_TUNNEL);
-	if (ret < 0) {
-		printf("E-tag filter is not supported on port %u.\n",
-		       res->port_id);
-		return;
-	}
-
-	entry.l2_tunnel_type = RTE_L2_TUNNEL_TYPE_E_TAG;
-	entry.tunnel_id = res->e_tag_id_val;
-	entry.pool = res->dst_pool_val;
-
-	ret = rte_eth_dev_filter_ctrl(res->port_id,
-				      RTE_ETH_FILTER_L2_TUNNEL,
-				      RTE_ETH_FILTER_ADD,
-				      &entry);
-	if (ret < 0)
-		printf("E-tag filter programming error: (%s)\n",
-		       strerror(-ret));
-}
-
-cmdline_parse_inst_t cmd_config_e_tag_filter_add = {
-	.f = cmd_config_e_tag_filter_add_parsed,
-	.data = NULL,
-	.help_str = "E-tag ... : E-tag filter add",
-	.tokens = {
-		(void *)&cmd_config_e_tag_e_tag,
-		(void *)&cmd_config_e_tag_set,
-		(void *)&cmd_config_e_tag_filter,
-		(void *)&cmd_config_e_tag_add,
-		(void *)&cmd_config_e_tag_e_tag_id,
-		(void *)&cmd_config_e_tag_e_tag_id_val,
-		(void *)&cmd_config_e_tag_dst_pool,
-		(void *)&cmd_config_e_tag_dst_pool_val,
-		(void *)&cmd_config_e_tag_port,
-		(void *)&cmd_config_e_tag_port_id,
-		NULL,
-	},
-};
-
-static void
-cmd_config_e_tag_filter_del_parsed(
-	void *parsed_result,
-	__rte_unused struct cmdline *cl,
-	__rte_unused void *data)
-{
-	struct cmd_config_e_tag_result *res = parsed_result;
-	struct rte_eth_l2_tunnel_conf entry;
-	int ret = 0;
-
-	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
-		return;
-
-	if (res->e_tag_id_val > 0x3fff) {
-		printf("e-tag-id must be less than 0x3fff.\n");
-		return;
-	}
-
-	ret = rte_eth_dev_filter_supported(res->port_id,
-					   RTE_ETH_FILTER_L2_TUNNEL);
-	if (ret < 0) {
-		printf("E-tag filter is not supported on port %u.\n",
-		       res->port_id);
-		return;
-	}
-
-	entry.l2_tunnel_type = RTE_L2_TUNNEL_TYPE_E_TAG;
-	entry.tunnel_id = res->e_tag_id_val;
-
-	ret = rte_eth_dev_filter_ctrl(res->port_id,
-				      RTE_ETH_FILTER_L2_TUNNEL,
-				      RTE_ETH_FILTER_DELETE,
-				      &entry);
-	if (ret < 0)
-		printf("E-tag filter programming error: (%s)\n",
-		       strerror(-ret));
-}
-
-cmdline_parse_inst_t cmd_config_e_tag_filter_del = {
-	.f = cmd_config_e_tag_filter_del_parsed,
-	.data = NULL,
-	.help_str = "E-tag ... : E-tag filter delete",
-	.tokens = {
-		(void *)&cmd_config_e_tag_e_tag,
-		(void *)&cmd_config_e_tag_set,
-		(void *)&cmd_config_e_tag_filter,
-		(void *)&cmd_config_e_tag_del,
-		(void *)&cmd_config_e_tag_e_tag_id,
-		(void *)&cmd_config_e_tag_e_tag_id_val,
-		(void *)&cmd_config_e_tag_port,
-		(void *)&cmd_config_e_tag_port_id,
-		NULL,
-	},
-};
-
 /* vf vlan anti spoof configuration */
 
 /* Common result structure for vf vlan anti spoof */
@@ -18621,8 +18500,6 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_config_e_tag_insertion_dis,
 	(cmdline_parse_inst_t *)&cmd_config_e_tag_stripping_en_dis,
 	(cmdline_parse_inst_t *)&cmd_config_e_tag_forwarding_en_dis,
-	(cmdline_parse_inst_t *)&cmd_config_e_tag_filter_add,
-	(cmdline_parse_inst_t *)&cmd_config_e_tag_filter_del,
 	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,
 	(cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,
 	(cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 48b5bfd3cb..af46728da1 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,8 +97,7 @@ Deprecation Notices
 
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
-  as filter types FDIR
-  and L2_TUNNEL, is superseded by the generic flow API (rte_flow) in
+  as filter types FDIR, is superseded by the generic flow API (rte_flow) in
   PMDs that implement the latter.
   The legacy API will be removed in DPDK 20.11.
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 25d048a011..1440b0f692 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1714,13 +1714,6 @@ Enable/disable E-tag based forwarding on a port::
 
    testpmd> E-tag set forwarding (on|off) port (port_id)
 
-Add an E-tag forwarding filter on a port::
-
-   testpmd> E-tag set filter add e-tag-id (value) dst-pool (pool_id) port (port_id)
-
-Delete an E-tag forwarding filter on a port::
-   testpmd> E-tag set filter del e-tag-id (value) port (port_id)
-
 ddp add
 ~~~~~~~
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 922d415000..255d2bf078 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -355,9 +355,6 @@ static int ixgbe_dev_l2_tunnel_offload_set
 	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
 	 uint32_t mask,
 	 uint8_t en);
-static int ixgbe_dev_l2_tunnel_filter_handle(struct rte_eth_dev *dev,
-					     enum rte_filter_op filter_op,
-					     void *arg);
 
 static int ixgbe_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
 					 struct rte_eth_udp_tunnel *udp_tunnel);
@@ -6813,9 +6810,6 @@ ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev,
 	case RTE_ETH_FILTER_FDIR:
 		ret = ixgbe_fdir_ctrl_func(dev, filter_op, arg);
 		break;
-	case RTE_ETH_FILTER_L2_TUNNEL:
-		ret = ixgbe_dev_l2_tunnel_filter_handle(dev, filter_op, arg);
-		break;
 	case RTE_ETH_FILTER_GENERIC:
 		if (filter_op != RTE_ETH_FILTER_GET)
 			return -EINVAL;
@@ -7887,48 +7881,6 @@ ixgbe_dev_l2_tunnel_filter_del(struct rte_eth_dev *dev,
 	return ret;
 }
 
-/**
- * ixgbe_dev_l2_tunnel_filter_handle - Handle operations for l2 tunnel filter.
- * @dev: pointer to rte_eth_dev structure
- * @filter_op:operation will be taken.
- * @arg: a pointer to specific structure corresponding to the filter_op
- */
-static int
-ixgbe_dev_l2_tunnel_filter_handle(struct rte_eth_dev *dev,
-				  enum rte_filter_op filter_op,
-				  void *arg)
-{
-	int ret;
-
-	if (filter_op == RTE_ETH_FILTER_NOP)
-		return 0;
-
-	if (arg == NULL) {
-		PMD_DRV_LOG(ERR, "arg shouldn't be NULL for operation %u.",
-			    filter_op);
-		return -EINVAL;
-	}
-
-	switch (filter_op) {
-	case RTE_ETH_FILTER_ADD:
-		ret = ixgbe_dev_l2_tunnel_filter_add
-			(dev,
-			 (struct rte_eth_l2_tunnel_conf *)arg,
-			 FALSE);
-		break;
-	case RTE_ETH_FILTER_DELETE:
-		ret = ixgbe_dev_l2_tunnel_filter_del
-			(dev,
-			 (struct rte_eth_l2_tunnel_conf *)arg);
-		break;
-	default:
-		PMD_DRV_LOG(ERR, "unsupported operation %u.", filter_op);
-		ret = -EINVAL;
-		break;
-	}
-	return ret;
-}
-
 static int
 ixgbe_e_tag_forwarding_en_dis(struct rte_eth_dev *dev, bool en)
 {
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index 283e7322cb..a9870338aa 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -1241,7 +1241,6 @@ int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
 
 		*(const void **)arg = &qede_flow_ops;
 		return 0;
-	case RTE_ETH_FILTER_L2_TUNNEL:
 	case RTE_ETH_FILTER_MAX:
 	default:
 		DP_ERR(edev, "Unsupported filter type %d\n",
-- 
2.17.1


  parent reply	other threads:[~2020-10-22  9:46 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   ` Andrew Rybchenko [this message]
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   ` [dpdk-dev] [PATCH v2 13/14] app/testpmd: remove command to set FDIR flexible filter mask Andrew Rybchenko
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-11-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=haiyue.wang@intel.com \
    --cc=jia.guo@intel.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=rmody@marvell.com \
    --cc=shshaikh@marvell.com \
    --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