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 7A2A8A04DD; Wed, 21 Oct 2020 07:42:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 254A3AC61; Wed, 21 Oct 2020 07:42:55 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 8513DAC60 for ; Wed, 21 Oct 2020 07:42:52 +0200 (CEST) IronPort-SDR: vV2C3P9KRAhwhUiVBrvRLCMZP0fP0DgBS4LBa0tT0Q7vkPBRSkWLQwy9BM9OhDnwKhNgGWDd35 2ROsYAbNkB6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="147175355" X-IronPort-AV: E=Sophos;i="5.77,400,1596524400"; d="scan'208";a="147175355" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 22:42:50 -0700 IronPort-SDR: 8hd3zySDKsu46rZhQu+r7DLdaEcK15KHLWiWfNVlFXn4sXVmALiVzIf2G4BHgmuK4As3UVlPgs UMcTSmv+XhNA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,400,1596524400"; d="scan'208";a="522632074" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga006.fm.intel.com with ESMTP; 20 Oct 2020 22:42:50 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 20 Oct 2020 22:42:49 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 21 Oct 2020 13:42:48 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Wed, 21 Oct 2020 13:42:48 +0800 From: "Guo, Jia" To: Andrew Rybchenko , "Lu, Wenzhuo" , "Xing, Beilei" , "Iremonger, Bernard" , Andrew Rybchenko CC: "dev@dpdk.org" Thread-Topic: [PATCH 11/14] ethdev: remove legacy global filter configuration support Thread-Index: AQHWpVhQpi6h4duHW0SWGxRdKbKdvqmhju2w Date: Wed, 21 Oct 2020 05:42:48 +0000 Message-ID: <9f05741a0d5542e1b9cdbd924fcbc3da@intel.com> References: <1603030152-13451-1-git-send-email-arybchenko@solarflare.com> <1603030152-13451-12-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1603030152-13451-12-git-send-email-arybchenko@solarflare.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 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" > -----Original Message----- > From: Andrew Rybchenko > Sent: Sunday, October 18, 2020 10:09 PM > To: Lu, Wenzhuo ; Xing, Beilei > ; Iremonger, Bernard > ; Guo, Jia ; Andrew > Rybchenko > Cc: dev@dpdk.org > Subject: [PATCH 11/14] ethdev: remove legacy global filter configuration > support >=20 Please add the description of the patch. > Signed-off-by: Andrew Rybchenko > --- > app/test-pmd/cmdline.c | 57 ---------------------------------- > drivers/net/i40e/i40e_ethdev.c | 45 --------------------------- > drivers/net/sfc/sfc_ethdev.c | 3 -- > 3 files changed, 105 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > b031fb94b2..9abe8659f5 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 > =3D { > }, > }; >=20 > -/* *** 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 =3D parsed_result; > - struct rte_eth_global_cfg conf; > - int ret; > - > - memset(&conf, 0, sizeof(conf)); > - conf.cfg_type =3D RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN; > - conf.cfg.gre_key_len =3D res->len; > - ret =3D rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_NONE, > - RTE_ETH_FILTER_SET, &conf); > -#ifdef RTE_LIBRTE_I40E_PMD > - if (ret =3D=3D -ENOTSUP) > - ret =3D rte_pmd_i40e_set_gre_key_len(res->port_id, res- > >len); > -#endif > - if (ret !=3D 0) > - printf("Global config error\n"); > -} > - > -cmdline_parse_token_string_t cmd_global_config_cmd =3D > - TOKEN_STRING_INITIALIZER(struct cmd_global_config_result, cmd, > - "global_config"); > -cmdline_parse_token_num_t cmd_global_config_port_id =3D > - TOKEN_NUM_INITIALIZER(struct cmd_global_config_result, port_id, > - UINT16); > -cmdline_parse_token_string_t cmd_global_config_type =3D > - TOKEN_STRING_INITIALIZER(struct cmd_global_config_result, > - cfg_type, "gre-key-len"); > -cmdline_parse_token_num_t cmd_global_config_gre_key_len =3D > - TOKEN_NUM_INITIALIZER(struct cmd_global_config_result, > - len, UINT8); > - > -cmdline_parse_inst_t cmd_global_config =3D { > - .f =3D cmd_global_config_parsed, > - .data =3D (void *)NULL, > - .help_str =3D "global_config gre-key-len ", > - .tokens =3D { > - (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[] =3D { > (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/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; > } >=20 > -static int > -i40e_dev_global_config_set(struct i40e_hw *hw, struct rte_eth_global_cfg > *cfg) -{ > - int ret =3D -EINVAL; > - > - if (!hw || !cfg) > - return -EINVAL; > - > - switch (cfg->cfg_type) { > - case RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN: > - ret =3D 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 =3D I40E_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > - int ret =3D I40E_ERR_PARAM; > - > - switch (filter_op) { > - case RTE_ETH_FILTER_SET: > - ret =3D 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; >=20 > switch (filter_type) { > - case RTE_ETH_FILTER_NONE: > - /* For global configuration */ > - ret =3D i40e_filter_ctrl_global_config(dev, filter_op, arg); > - break; > case RTE_ETH_FILTER_FDIR: > ret =3D 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 c47f282450..1437af15e0 100644 > --- a/drivers/net/sfc/sfc_ethdev.c > +++ b/drivers/net/sfc/sfc_ethdev.c > @@ -1745,9 +1745,6 @@ sfc_dev_filter_ctrl(struct rte_eth_dev *dev, enum > rte_filter_type filter_type, > sfc_log_init(sa, "entry"); >=20 > 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; > -- > 2.17.1