From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C93EA04B0; Sun, 18 Oct 2020 16:13:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DB59E261; Sun, 18 Oct 2020 16:09:44 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 64E33C9BE for ; Sun, 18 Oct 2020 16:09:29 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.143]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0BE4920059; Sun, 18 Oct 2020 14:09:28 +0000 (UTC) Received: from us4-mdac16-58.at1.mdlocal (unknown [10.110.50.151]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0A06B8009B; Sun, 18 Oct 2020 14:09:28 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.12]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 8E6E04006E; Sun, 18 Oct 2020 14:09:27 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 559004005B; Sun, 18 Oct 2020 14:09:27 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 18 Oct 2020 15:09:22 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 18 Oct 2020 15:09:22 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09IE9MaH002058; Sun, 18 Oct 2020 15:09:22 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 237961613A9; Sun, 18 Oct 2020 15:09:22 +0100 (BST) From: Andrew Rybchenko To: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Ray Kinsella , Neil Horman , Jeff Guo , Haiyue Wang , Rasesh Mody , Shahed Shaikh CC: Date: Sun, 18 Oct 2020 15:09:07 +0100 Message-ID: <1603030152-13451-11-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1603030152-13451-1-git-send-email-arybchenko@solarflare.com> References: <1603030152-13451-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25732.003 X-TM-AS-Result: No-12.546300-8.000000-10 X-TMASE-MatchedRID: JXE/D59dZJ8eLqe5xuVHPqiUivh0j2PvY/L2/AZJAWSYkF7ZtFfCU4wW IRmLVWq5NNN0dk/lb45w5T4Iaj538mJZXQNDzktSGjzBgnFZvQ4P6OWzRxLAk0jINjnv2/BMH0G q6gh+ZlCbr1TE2UQIcdwzSNMHSlxQSkJz50w3SpFXq5HtSh5C5DsgUw68UQrYm5BJdUjD+FXp4z 9wZIUHUl+aQGZyt3ZNCAH9se4egZPoYlaEA2MZkQe06kQGFaIWL8Ia5qicU7sm3tlnC/E6VFJIz DmnG+R7zg2NZRYtOavQmVhqZyUK/N3ayerUAluezNIobH2DzGETTY+vgKQ1I9qUml4VvcDYBOp/ 8ODZzPwBEo6q9vmy/7Jz/M7YZ1g8Vdgv/fqHkl7HmyDJSEsI230tCKdnhB589yM15V5aWpj6C0e Ps7A07cNbTFVOzjU8BpV5LAw5Qw96QzO4HoVQBUXYzcsJWdzliExnoWnopHY= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--12.546300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25732.003 X-MDID: 1603030168-A4Ha3F3S17RY X-PPE-DISP: 1603030168;A4Ha3F3S17RY Subject: [dpdk-dev] [PATCH 10/14] ethdev: remove legacy L2_TUNNEL filter type support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" RTE flow API should be used for filtering. 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 --- app/test-pmd/cmdline.c | 123 --------------------------- doc/guides/rel_notes/deprecation.rst | 3 +- drivers/net/ixgbe/ixgbe_ethdev.c | 48 ----------- drivers/net/qede/qede_filter.c | 1 - 4 files changed, 1 insertion(+), 174 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 713e1cad83..b031fb94b2 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 e245d04bf4..3d241c08e8 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -108,8 +108,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/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 8c02c0c859..2a0f1761ba 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