From patchwork Thu Oct 22 09:42:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 81768 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41C8DA04DD; Thu, 22 Oct 2020 11:46:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DCBEEA9B2; Thu, 22 Oct 2020 11:43:31 +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 7BBB3A96C for ; Thu, 22 Oct 2020 11:43:10 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.150]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 2679F20054; Thu, 22 Oct 2020 09:43:09 +0000 (UTC) Received: from us4-mdac16-20.at1.mdlocal (unknown [10.110.49.202]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 251E0800A3; Thu, 22 Oct 2020 09:43:09 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.48.59]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id B203C100052; Thu, 22 Oct 2020 09:43:08 +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 76E58380055; Thu, 22 Oct 2020 09:43:08 +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; Thu, 22 Oct 2020 10:43:04 +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; Thu, 22 Oct 2020 10:43:04 +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 09M9h4iA023412; Thu, 22 Oct 2020 10:43:04 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 540901613A9; Thu, 22 Oct 2020 10:43:04 +0100 (BST) From: Andrew Rybchenko To: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Jeff Guo , Andrew Rybchenko , Thomas Monjalon , Ferruh Yigit CC: Date: Thu, 22 Oct 2020 10:42:34 +0100 Message-ID: <1603359758-13297-12-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1603359758-13297-1-git-send-email-arybchenko@solarflare.com> References: <1603030152-13451-1-git-send-email-arybchenko@solarflare.com> <1603359758-13297-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25740.003 X-TM-AS-Result: No-6.795900-8.000000-10 X-TMASE-MatchedRID: QXFou7UF+HMkinkyECdW86oNIG7S1SGv6VTG9cZxEjIda1Vk3RqxOGwV Fq9KyZGWoN0RQvVLvuDYLqzgafDsrfSCkSozt+9hnFVnNmvv47tLXPA26IG0hN9RlPzeVuQQqF6 H/LiZxjq4zCS2SBNlABK/h+VrAVy3Z/mERv8EXlXobINHZkH5xqLwP+jjbL9KTmCoNkYjqsClzb GAkBjour+Kb2rLzLoAue9MZmiwiqR+wAuSUWlj5NWxbZgaqhS0NV9S7O+u3KZPIi6bm6Wq5i4W6 yQyD9zpSLZYGytM40BUgpn09r97Xt6mdwOBRvHd+CjwEqX1p7l+jSWdx0YUU4oij12xHbPuQtye OQyPf+8qjMtOLQ71e+iPbXM20YKuvi/XXOZZp4rHmyDJSEsI248ZcR5uOw86IIvbIEPeuIFWU26 DMexmY4n8/Wye4zBsxr+SGuNJcjsM8jMXjBF+sBRFJJyf5BJe3QfwsVk0UbtuRXh7bFKB7hFHyv Fr/DtrbGtHSlUwgldgvxYZFcPVLr4+ajlXTPCCNkUSDDq742k= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.795900-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25740.003 X-MDID: 1603359789-dKtP6aS10hXu X-PPE-DISP: 1603359789;dKtP6aS10hXu Subject: [dpdk-dev] [PATCH v2 11/14] ethdev: remove legacy global filter configuration 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" Global filter configuration request was supported by net/i40e driver only to configure GRE key length. Signed-off-by: Andrew Rybchenko --- app/test-pmd/cmdline.c | 57 --------------------- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 ---- drivers/net/i40e/i40e_ethdev.c | 45 ---------------- drivers/net/sfc/sfc_ethdev.c | 3 -- lib/librte_ethdev/rte_eth_ctrl.h | 20 -------- 5 files changed, 136 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 27b7086da8..f246c8929f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -9295,62 +9295,6 @@ cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = { }, }; -/* *** GLOBAL CONFIG *** */ -struct cmd_global_config_result { - cmdline_fixed_string_t cmd; - portid_t port_id; - cmdline_fixed_string_t cfg_type; - uint8_t len; -}; - -static void -cmd_global_config_parsed(void *parsed_result, - __rte_unused struct cmdline *cl, - __rte_unused void *data) -{ - struct cmd_global_config_result *res = parsed_result; - struct rte_eth_global_cfg conf; - int ret; - - memset(&conf, 0, sizeof(conf)); - conf.cfg_type = RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN; - conf.cfg.gre_key_len = res->len; - ret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_NONE, - RTE_ETH_FILTER_SET, &conf); -#ifdef RTE_NET_I40E - if (ret == -ENOTSUP) - ret = rte_pmd_i40e_set_gre_key_len(res->port_id, res->len); -#endif - if (ret != 0) - printf("Global config error\n"); -} - -cmdline_parse_token_string_t cmd_global_config_cmd = - TOKEN_STRING_INITIALIZER(struct cmd_global_config_result, cmd, - "global_config"); -cmdline_parse_token_num_t cmd_global_config_port_id = - TOKEN_NUM_INITIALIZER(struct cmd_global_config_result, port_id, - UINT16); -cmdline_parse_token_string_t cmd_global_config_type = - TOKEN_STRING_INITIALIZER(struct cmd_global_config_result, - cfg_type, "gre-key-len"); -cmdline_parse_token_num_t cmd_global_config_gre_key_len = - TOKEN_NUM_INITIALIZER(struct cmd_global_config_result, - len, UINT8); - -cmdline_parse_inst_t cmd_global_config = { - .f = cmd_global_config_parsed, - .data = (void *)NULL, - .help_str = "global_config gre-key-len ", - .tokens = { - (void *)&cmd_global_config_cmd, - (void *)&cmd_global_config_port_id, - (void *)&cmd_global_config_type, - (void *)&cmd_global_config_gre_key_len, - NULL, - }, -}; - /* *** CONFIGURE VM MIRROR VLAN/POOL RULE *** */ struct cmd_set_mirror_mask_result { cmdline_fixed_string_t set; @@ -18454,7 +18398,6 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_vf_mac_addr_filter, (cmdline_parse_inst_t *)&cmd_queue_rate_limit, (cmdline_parse_inst_t *)&cmd_tunnel_udp_config, - (cmdline_parse_inst_t *)&cmd_global_config, (cmdline_parse_inst_t *)&cmd_set_mirror_mask, (cmdline_parse_inst_t *)&cmd_set_mirror_link, (cmdline_parse_inst_t *)&cmd_reset_mirror_rule, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 1440b0f692..aaba855bfa 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3404,17 +3404,6 @@ For example to add source IP to FD input set for flow type of ipv4-udp on port 0 testpmd> set_fdir_input_set 0 ipv4-udp src-ipv4 add -global_config -~~~~~~~~~~~~~ - -Set different GRE key length for input set:: - - global_config (port_id) gre-key-len (number in bytes) - -For example to set GRE key length for input set to 4 bytes on port 0:: - - testpmd> global_config 0 gre-key-len 4 - .. _testpmd_rte_flow: diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index cd57126aa5..9d6d482aba 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -8909,47 +8909,6 @@ i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len) return ret; } -static int -i40e_dev_global_config_set(struct i40e_hw *hw, struct rte_eth_global_cfg *cfg) -{ - int ret = -EINVAL; - - if (!hw || !cfg) - return -EINVAL; - - switch (cfg->cfg_type) { - case RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN: - ret = i40e_dev_set_gre_key_len(hw, cfg->cfg.gre_key_len); - break; - default: - PMD_DRV_LOG(ERR, "Unknown config type %u", cfg->cfg_type); - break; - } - - return ret; -} - -static int -i40e_filter_ctrl_global_config(struct rte_eth_dev *dev, - enum rte_filter_op filter_op, - void *arg) -{ - struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); - int ret = I40E_ERR_PARAM; - - switch (filter_op) { - case RTE_ETH_FILTER_SET: - ret = i40e_dev_global_config_set(hw, - (struct rte_eth_global_cfg *)arg); - break; - default: - PMD_DRV_LOG(ERR, "unknown operation %u", filter_op); - break; - } - - return ret; -} - /* Set the symmetric hash enable configurations per port */ static void i40e_set_symmetric_hash_enable_per_port(struct i40e_hw *hw, uint8_t enable) @@ -9986,10 +9945,6 @@ i40e_dev_filter_ctrl(struct rte_eth_dev *dev, return -EINVAL; switch (filter_type) { - case RTE_ETH_FILTER_NONE: - /* For global configuration */ - ret = i40e_filter_ctrl_global_config(dev, filter_op, arg); - break; case RTE_ETH_FILTER_FDIR: ret = i40e_fdir_ctrl_func(dev, filter_op, arg); break; diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 9846925557..a47d8124e1 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -1752,9 +1752,6 @@ sfc_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type, sfc_log_init(sa, "entry"); switch (filter_type) { - case RTE_ETH_FILTER_NONE: - sfc_err(sa, "Global filters configuration not supported"); - break; case RTE_ETH_FILTER_FDIR: sfc_err(sa, "Flow Director filters not supported"); break; diff --git a/lib/librte_ethdev/rte_eth_ctrl.h b/lib/librte_ethdev/rte_eth_ctrl.h index 1b8bfb1771..9d573f337e 100644 --- a/lib/librte_ethdev/rte_eth_ctrl.h +++ b/lib/librte_ethdev/rte_eth_ctrl.h @@ -105,26 +105,6 @@ struct rte_eth_ntuple_filter { uint16_t queue; /**< Queue assigned to when match*/ }; -/** - * Global eth device configuration type. - */ -enum rte_eth_global_cfg_type { - RTE_ETH_GLOBAL_CFG_TYPE_UNKNOWN = 0, - RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN, - RTE_ETH_GLOBAL_CFG_TYPE_MAX, -}; - -/** - * Global eth device configuration. - */ -struct rte_eth_global_cfg { - enum rte_eth_global_cfg_type cfg_type; /**< Global config type. */ - union { - uint8_t gre_key_len; /**< Valid GRE key length in byte. */ - uint64_t reserved; /**< Reserve space for future use. */ - } cfg; -}; - #define RTE_ETH_FDIR_MAX_FLEXLEN 16 /**< Max length of flexbytes. */ #define RTE_ETH_INSET_SIZE_MAX 128 /**< Max length of input set. */