From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D136923B for ; Tue, 27 Feb 2018 15:18:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 06:18:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,401,1515484800"; d="scan'208";a="34503837" Received: from silpixa00389036.ir.intel.com (HELO silpixa00389036.ger.corp.intel.com) ([10.237.223.231]) by orsmga001.jf.intel.com with ESMTP; 27 Feb 2018 06:18:30 -0800 From: Kirill Rybalchenko To: dev@dpdk.org Cc: kirill.rybalchenko@intel.com, andrey.chilikin@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 27 Feb 2018 14:18:27 +0000 Message-Id: <1519741107-84500-1-git-send-email-kirill.rybalchenko@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1519727393-138815-1-git-send-email-kirill.rybalchenko@intel.com> References: <1519727393-138815-1-git-send-email-kirill.rybalchenko@intel.com> Subject: [dpdk-dev] [PATCH v2] ethdev: remove versioning of ethdev filter control function 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: , X-List-Received-Date: Tue, 27 Feb 2018 14:18:35 -0000 In 18.02 release the ABI of ethdev component was changed. To keep compatibility with previous versions of the library the versioning of rte_eth_dev_filter_ctrl function was implemented. As soon as deprecation note was issued in 18.02 release, there is no need to keep compatibility with previous versions. Remove the versioning of rte_eth_dev_filter_ctrl function. v2: Modify map file, increment library version, remove deprecation notice Signed-off-by: Kirill Rybalchenko --- doc/guides/rel_notes/deprecation.rst | 6 -- doc/guides/rel_notes/release_18_05.rst | 2 +- lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_ethdev.c | 155 +------------------------------- lib/librte_ether/rte_ethdev_version.map | 1 - 5 files changed, 4 insertions(+), 162 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 74c18ed..6594585 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -149,12 +149,6 @@ Deprecation Notices as parameter. For consistency functions adding callback will return ``struct rte_eth_rxtx_callback \*`` instead of ``void \*``. -* ethdev: The size of variables ``flow_types_mask`` in - ``rte_eth_fdir_info structure``, ``sym_hash_enable_mask`` and - ``valid_bit_mask`` in ``rte_eth_hash_global_conf`` structure - will be increased from 32 to 64 bits to fulfill hardware requirements. - This change will break existing ABI as size of the structures will increase. - * ethdev: ``rte_eth_dev_get_sec_ctx()`` fix port id storage ``rte_eth_dev_get_sec_ctx()`` is using ``uint8_t`` for ``port_id``, which should be ``uint16_t``. diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst index 3923dc2..22da411 100644 --- a/doc/guides/rel_notes/release_18_05.rst +++ b/doc/guides/rel_notes/release_18_05.rst @@ -128,7 +128,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_cryptodev.so.4 librte_distributor.so.1 librte_eal.so.6 - librte_ethdev.so.8 + + librte_ethdev.so.9 librte_eventdev.so.3 librte_flow_classify.so.1 librte_gro.so.1 diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index 3ca5782..c2f2f7d 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -16,7 +16,7 @@ LDLIBS += -lrte_mbuf EXPORT_MAP := rte_ethdev_version.map -LIBABIVER := 8 +LIBABIVER := 9 SRCS-y += rte_ethdev.c SRCS-y += rte_flow.c diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 0590f0c..78b8376 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "rte_ether.h" #include "rte_ethdev.h" @@ -3490,153 +3489,8 @@ rte_eth_dev_filter_supported(uint16_t port_id, } int -rte_eth_dev_filter_ctrl_v22(uint16_t port_id, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, void *arg); - -int -rte_eth_dev_filter_ctrl_v22(uint16_t port_id, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, void *arg) -{ - struct rte_eth_fdir_info_v22 { - enum rte_fdir_mode mode; - struct rte_eth_fdir_masks mask; - struct rte_eth_fdir_flex_conf flex_conf; - uint32_t guarant_spc; - uint32_t best_spc; - uint32_t flow_types_mask[1]; - uint32_t max_flexpayload; - uint32_t flex_payload_unit; - uint32_t max_flex_payload_segment_num; - uint16_t flex_payload_limit; - uint32_t flex_bitmask_unit; - uint32_t max_flex_bitmask_num; - }; - - struct rte_eth_hash_global_conf_v22 { - enum rte_eth_hash_function hash_func; - uint32_t sym_hash_enable_mask[1]; - uint32_t valid_bit_mask[1]; - }; - - struct rte_eth_hash_filter_info_v22 { - enum rte_eth_hash_filter_info_type info_type; - union { - uint8_t enable; - struct rte_eth_hash_global_conf_v22 global_conf; - struct rte_eth_input_set_conf input_set_conf; - } info; - }; - - struct rte_eth_dev *dev; - - RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); - - dev = &rte_eth_devices[port_id]; - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->filter_ctrl, -ENOTSUP); - if (filter_op == RTE_ETH_FILTER_INFO) { - int retval; - struct rte_eth_fdir_info_v22 *fdir_info_v22; - struct rte_eth_fdir_info fdir_info; - - fdir_info_v22 = (struct rte_eth_fdir_info_v22 *)arg; - - retval = (*dev->dev_ops->filter_ctrl)(dev, filter_type, - filter_op, (void *)&fdir_info); - fdir_info_v22->mode = fdir_info.mode; - fdir_info_v22->mask = fdir_info.mask; - fdir_info_v22->flex_conf = fdir_info.flex_conf; - fdir_info_v22->guarant_spc = fdir_info.guarant_spc; - fdir_info_v22->best_spc = fdir_info.best_spc; - fdir_info_v22->flow_types_mask[0] = - (uint32_t)fdir_info.flow_types_mask[0]; - fdir_info_v22->max_flexpayload = fdir_info.max_flexpayload; - fdir_info_v22->flex_payload_unit = fdir_info.flex_payload_unit; - fdir_info_v22->max_flex_payload_segment_num = - fdir_info.max_flex_payload_segment_num; - fdir_info_v22->flex_payload_limit = - fdir_info.flex_payload_limit; - fdir_info_v22->flex_bitmask_unit = fdir_info.flex_bitmask_unit; - fdir_info_v22->max_flex_bitmask_num = - fdir_info.max_flex_bitmask_num; - return retval; - } else if (filter_op == RTE_ETH_FILTER_GET) { - int retval; - struct rte_eth_hash_filter_info f_info; - struct rte_eth_hash_filter_info_v22 *f_info_v22 = - (struct rte_eth_hash_filter_info_v22 *)arg; - - f_info.info_type = f_info_v22->info_type; - retval = (*dev->dev_ops->filter_ctrl)(dev, filter_type, - filter_op, (void *)&f_info); - - switch (f_info_v22->info_type) { - case RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT: - f_info_v22->info.enable = f_info.info.enable; - break; - case RTE_ETH_HASH_FILTER_GLOBAL_CONFIG: - f_info_v22->info.global_conf.hash_func = - f_info.info.global_conf.hash_func; - f_info_v22->info.global_conf.sym_hash_enable_mask[0] = - (uint32_t) - f_info.info.global_conf.sym_hash_enable_mask[0]; - f_info_v22->info.global_conf.valid_bit_mask[0] = - (uint32_t) - f_info.info.global_conf.valid_bit_mask[0]; - break; - case RTE_ETH_HASH_FILTER_INPUT_SET_SELECT: - f_info_v22->info.input_set_conf = - f_info.info.input_set_conf; - break; - default: - break; - } - return retval; - } else if (filter_op == RTE_ETH_FILTER_SET) { - struct rte_eth_hash_filter_info f_info; - struct rte_eth_hash_filter_info_v22 *f_v22 = - (struct rte_eth_hash_filter_info_v22 *)arg; - - f_info.info_type = f_v22->info_type; - switch (f_v22->info_type) { - case RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT: - f_info.info.enable = f_v22->info.enable; - break; - case RTE_ETH_HASH_FILTER_GLOBAL_CONFIG: - f_info.info.global_conf.hash_func = - f_v22->info.global_conf.hash_func; - f_info.info.global_conf.sym_hash_enable_mask[0] = - (uint32_t) - f_v22->info.global_conf.sym_hash_enable_mask[0]; - f_info.info.global_conf.valid_bit_mask[0] = - (uint32_t) - f_v22->info.global_conf.valid_bit_mask[0]; - break; - case RTE_ETH_HASH_FILTER_INPUT_SET_SELECT: - f_info.info.input_set_conf = - f_v22->info.input_set_conf; - break; - default: - break; - } - return (*dev->dev_ops->filter_ctrl)(dev, filter_type, filter_op, - (void *)&f_info); - } else - return (*dev->dev_ops->filter_ctrl)(dev, filter_type, filter_op, - arg); -} -VERSION_SYMBOL(rte_eth_dev_filter_ctrl, _v22, 2.2); - -int -rte_eth_dev_filter_ctrl_v1802(uint16_t port_id, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, void *arg); - -int -rte_eth_dev_filter_ctrl_v1802(uint16_t port_id, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, void *arg) +rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type, + enum rte_filter_op filter_op, void *arg) { struct rte_eth_dev *dev; @@ -3647,11 +3501,6 @@ rte_eth_dev_filter_ctrl_v1802(uint16_t port_id, return eth_err(port_id, (*dev->dev_ops->filter_ctrl)(dev, filter_type, filter_op, arg)); } -BIND_DEFAULT_SYMBOL(rte_eth_dev_filter_ctrl, _v1802, 18.02); -MAP_STATIC_SYMBOL(int rte_eth_dev_filter_ctrl(uint16_t port_id, - enum rte_filter_type filter_type, - enum rte_filter_op filter_op, void *arg), - rte_eth_dev_filter_ctrl_v1802); void * rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map index 87f02fb..34df6c8 100644 --- a/lib/librte_ether/rte_ethdev_version.map +++ b/lib/librte_ether/rte_ethdev_version.map @@ -16,7 +16,6 @@ DPDK_2.2 { rte_eth_dev_count; rte_eth_dev_default_mac_addr_set; rte_eth_dev_detach; - rte_eth_dev_filter_ctrl; rte_eth_dev_filter_supported; rte_eth_dev_flow_ctrl_get; rte_eth_dev_flow_ctrl_set; -- 2.5.5