[14/14] ethdev: remove legacy filter API functions
Checks
Commit Message
The legacy filter API, including rte_eth_dev_filter_supported() and
rte_eth_dev_filter_ctrl() is removed. Flow API should be used.
examples/tep_termination build is broken.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ----
doc/guides/rel_notes/release_20_11.rst | 3 ++
drivers/net/dpaa2/dpaa2_ethdev.c | 4 ---
lib/librte_ethdev/rte_eth_ctrl.h | 12 +------
lib/librte_ethdev/rte_ethdev.c | 28 ----------------
lib/librte_ethdev/rte_ethdev.h | 41 ------------------------
lib/librte_ethdev/rte_ethdev_version.map | 2 --
7 files changed, 4 insertions(+), 92 deletions(-)
Comments
On Sun, Oct 18, 2020 at 4:14 PM Andrew Rybchenko
<arybchenko@solarflare.com> wrote:
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 18a748bc88..42eafb97af 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -106,12 +106,6 @@ Deprecation Notices
> while evaluating performance gains of a better use of the first cache line.
>
>
> -* ethdev: the legacy filter API, including
> - ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()``
> - 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.
> -
Nit: we have a double empty line before this block, that was forgotten
in a previous cleanup.
It could be dropped as part of this change.
> * ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
> and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
> will be removed in DPDK 20.11.
On 10/18/2020 3:09 PM, Andrew Rybchenko wrote:
> The legacy filter API, including rte_eth_dev_filter_supported() and
> rte_eth_dev_filter_ctrl() is removed. Flow API should be used.
>
> examples/tep_termination build is broken.
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
<...>
> --- a/lib/librte_ethdev/rte_eth_ctrl.h
> +++ b/lib/librte_ethdev/rte_eth_ctrl.h
> @@ -43,17 +43,7 @@ enum rte_filter_type {
> * Generic operations on filters
> */
> enum rte_filter_op {
> - /** used to check whether the type filter is supported */
> - RTE_ETH_FILTER_NOP = 0,
> - RTE_ETH_FILTER_ADD, /**< add filter entry */
> - RTE_ETH_FILTER_UPDATE, /**< update filter entry */
> - RTE_ETH_FILTER_DELETE, /**< delete filter entry */
> - RTE_ETH_FILTER_FLUSH, /**< flush all entries */
> - RTE_ETH_FILTER_GET, /**< get filter entry */
> - RTE_ETH_FILTER_SET, /**< configurations */
> - RTE_ETH_FILTER_INFO, /**< retrieve information */
> - RTE_ETH_FILTER_STATS, /**< retrieve statistics */
> - RTE_ETH_FILTER_OP_MAX
> + RTE_ETH_FILTER_GET, /**< get flow API ops */
> };
Thanks Andrew working on this,
It would be nice to have it in -rc1 to be tested better but it was received late
for it.
I suspect there will be more cleanup here or there by time.
Since there will be a new version,
What do you thinks creating a new dev_ops, like '.flow_ops_get' and replace
'.filter_ctrl' in this patchset?
This makes the naming/logic more clear, also allows removing a above
'RTE_ETH_FILTER_GET'.
On 10/20/20 5:52 PM, Ferruh Yigit wrote:
> On 10/18/2020 3:09 PM, Andrew Rybchenko wrote:
>> The legacy filter API, including rte_eth_dev_filter_supported() and
>> rte_eth_dev_filter_ctrl() is removed. Flow API should be used.
>>
>> examples/tep_termination build is broken.
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>
> <...>
>
>> --- a/lib/librte_ethdev/rte_eth_ctrl.h
>> +++ b/lib/librte_ethdev/rte_eth_ctrl.h
>> @@ -43,17 +43,7 @@ enum rte_filter_type {
>> * Generic operations on filters
>> */
>> enum rte_filter_op {
>> - /** used to check whether the type filter is supported */
>> - RTE_ETH_FILTER_NOP = 0,
>> - RTE_ETH_FILTER_ADD, /**< add filter entry */
>> - RTE_ETH_FILTER_UPDATE, /**< update filter entry */
>> - RTE_ETH_FILTER_DELETE, /**< delete filter entry */
>> - RTE_ETH_FILTER_FLUSH, /**< flush all entries */
>> - RTE_ETH_FILTER_GET, /**< get filter entry */
>> - RTE_ETH_FILTER_SET, /**< configurations */
>> - RTE_ETH_FILTER_INFO, /**< retrieve information */
>> - RTE_ETH_FILTER_STATS, /**< retrieve statistics */
>> - RTE_ETH_FILTER_OP_MAX
>> + RTE_ETH_FILTER_GET, /**< get flow API ops */
>> };
>
> Thanks Andrew working on this,
>
> It would be nice to have it in -rc1 to be tested better but it was
> received late for it.
> I suspect there will be more cleanup here or there by time.
>
> Since there will be a new version,
> What do you thinks creating a new dev_ops, like '.flow_ops_get' and
> replace '.filter_ctrl' in this patchset?
>
> This makes the naming/logic more clear, also allows removing a above
> 'RTE_ETH_FILTER_GET'.
I fully agree, but I'm not sure that I can find time to do it
right now. I will move rte_filter_{type,op} enums to ethdev
internal interface in v2 and the cleanup could be done any
time later.
On 10/22/2020 10:12 AM, Andrew Rybchenko wrote:
> On 10/20/20 5:52 PM, Ferruh Yigit wrote:
>> On 10/18/2020 3:09 PM, Andrew Rybchenko wrote:
>>> The legacy filter API, including rte_eth_dev_filter_supported() and
>>> rte_eth_dev_filter_ctrl() is removed. Flow API should be used.
>>>
>>> examples/tep_termination build is broken.
>>>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>
>> <...>
>>
>>> --- a/lib/librte_ethdev/rte_eth_ctrl.h
>>> +++ b/lib/librte_ethdev/rte_eth_ctrl.h
>>> @@ -43,17 +43,7 @@ enum rte_filter_type {
>>> * Generic operations on filters
>>> */
>>> enum rte_filter_op {
>>> - /** used to check whether the type filter is supported */
>>> - RTE_ETH_FILTER_NOP = 0,
>>> - RTE_ETH_FILTER_ADD, /**< add filter entry */
>>> - RTE_ETH_FILTER_UPDATE, /**< update filter entry */
>>> - RTE_ETH_FILTER_DELETE, /**< delete filter entry */
>>> - RTE_ETH_FILTER_FLUSH, /**< flush all entries */
>>> - RTE_ETH_FILTER_GET, /**< get filter entry */
>>> - RTE_ETH_FILTER_SET, /**< configurations */
>>> - RTE_ETH_FILTER_INFO, /**< retrieve information */
>>> - RTE_ETH_FILTER_STATS, /**< retrieve statistics */
>>> - RTE_ETH_FILTER_OP_MAX
>>> + RTE_ETH_FILTER_GET, /**< get flow API ops */
>>> };
>>
>> Thanks Andrew working on this,
>>
>> It would be nice to have it in -rc1 to be tested better but it was
>> received late for it.
>> I suspect there will be more cleanup here or there by time.
>>
>> Since there will be a new version,
>> What do you thinks creating a new dev_ops, like '.flow_ops_get' and
>> replace '.filter_ctrl' in this patchset?
>>
>> This makes the naming/logic more clear, also allows removing a above
>> 'RTE_ETH_FILTER_GET'.
>
> I fully agree, but I'm not sure that I can find time to do it
> right now.
Got it, it is nice to have if you have time, OK to postpone.
> I will move rte_filter_{type,op} enums to ethdev
> internal interface in v2
+1
> and the cleanup could be done any time later.
>
Yes it can be done later, thanks.
@@ -106,12 +106,6 @@ Deprecation Notices
while evaluating performance gains of a better use of the first cache line.
-* ethdev: the legacy filter API, including
- ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()``
- 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.
-
* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
will be removed in DPDK 20.11.
@@ -452,6 +452,9 @@ API Changes
* ethdev: Added fields rx_seg and rx_nseg to rte_eth_rxconf structure
to provide extended description of the receiving buffer.
+* ethdev: Removed the legacy filter API, including
+ ``rte_eth_dev_filter_supported()`` and ``rte_eth_dev_filter_ctrl()``.
+
* vhost: Moved vDPA APIs from experimental to stable.
* vhost: Add a new function ``rte_vhost_crypto_driver_start`` to be called
@@ -91,10 +91,6 @@ static const struct rte_dpaa2_xstats_name_off dpaa2_xstats_strings[] = {
};
static const enum rte_filter_op dpaa2_supported_filter_ops[] = {
- RTE_ETH_FILTER_ADD,
- RTE_ETH_FILTER_DELETE,
- RTE_ETH_FILTER_UPDATE,
- RTE_ETH_FILTER_FLUSH,
RTE_ETH_FILTER_GET
};
@@ -43,17 +43,7 @@ enum rte_filter_type {
* Generic operations on filters
*/
enum rte_filter_op {
- /** used to check whether the type filter is supported */
- RTE_ETH_FILTER_NOP = 0,
- RTE_ETH_FILTER_ADD, /**< add filter entry */
- RTE_ETH_FILTER_UPDATE, /**< update filter entry */
- RTE_ETH_FILTER_DELETE, /**< delete filter entry */
- RTE_ETH_FILTER_FLUSH, /**< flush all entries */
- RTE_ETH_FILTER_GET, /**< get filter entry */
- RTE_ETH_FILTER_SET, /**< configurations */
- RTE_ETH_FILTER_INFO, /**< retrieve information */
- RTE_ETH_FILTER_STATS, /**< retrieve statistics */
- RTE_ETH_FILTER_OP_MAX
+ RTE_ETH_FILTER_GET, /**< get flow API ops */
};
/**
@@ -4758,34 +4758,6 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id,
}
-int
-rte_eth_dev_filter_supported(uint16_t port_id,
- enum rte_filter_type filter_type)
-{
- 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);
- return (*dev->dev_ops->filter_ctrl)(dev, filter_type,
- RTE_ETH_FILTER_NOP, NULL);
-}
-
-int
-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;
-
- 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);
- return eth_err(port_id, (*dev->dev_ops->filter_ctrl)(dev, filter_type,
- filter_op, arg));
-}
-
const struct rte_eth_rxtx_callback *
rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
rte_rx_callback_fn fn, void *user_param)
@@ -4057,47 +4057,6 @@ int
rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
struct rte_eth_udp_tunnel *tunnel_udp);
-/**
- * Check whether the filter type is supported on an Ethernet device.
- * All the supported filter types are defined in 'rte_eth_ctrl.h'.
- *
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param filter_type
- * Filter type.
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support this filter type.
- * - (-ENODEV) if *port_id* invalid.
- * - (-EIO) if device is removed.
- */
-__rte_deprecated
-int rte_eth_dev_filter_supported(uint16_t port_id,
- enum rte_filter_type filter_type);
-
-/**
- * Take operations to assigned filter type on an Ethernet device.
- * All the supported operations and filter types are defined in 'rte_eth_ctrl.h'.
- *
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param filter_type
- * Filter type.
- * @param filter_op
- * Type of operation.
- * @param arg
- * A pointer to arguments defined specifically for the operation.
- * @return
- * - (0) if successful.
- * - (-ENOTSUP) if hardware doesn't support.
- * - (-ENODEV) if *port_id* invalid.
- * - (-EIO) if device is removed.
- * - others depends on the specific operations implementation.
- */
-__rte_deprecated
-int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
- enum rte_filter_op filter_op, void *arg);
-
/**
* Get DCB information on an Ethernet device.
*
@@ -15,8 +15,6 @@ DPDK_21 {
rte_eth_dev_count_avail;
rte_eth_dev_count_total;
rte_eth_dev_default_mac_addr_set;
- rte_eth_dev_filter_ctrl;
- rte_eth_dev_filter_supported;
rte_eth_dev_flow_ctrl_get;
rte_eth_dev_flow_ctrl_set;
rte_eth_dev_fw_version_get;