ethdev: remove legacy filter API functions
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 22 Oct 2020 09:42:37 +0000 (10:42 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:05 +0000 (23:35 +0100)
The legacy filter API, including rte_eth_dev_filter_supported() and
rte_eth_dev_filter_ctrl() is removed. Flow API should be used.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_11.rst
drivers/net/dpaa2/dpaa2_ethdev.c
drivers/net/hns3/hns3_ethdev.h
drivers/net/igc/igc_filter.h
drivers/net/qede/qede_filter.c
lib/librte_ethdev/rte_eth_ctrl.h
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h
lib/librte_ethdev/rte_ethdev_driver.h
lib/librte_ethdev/version.map

index 813e8fb..c405335 100644 (file)
@@ -88,13 +88,6 @@ Deprecation Notices
   avoiding impact on vectorized implementation of the driver datapaths,
   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.
index fb241af..36a63f5 100644 (file)
@@ -538,6 +538,9 @@ API Changes
   As the data of ``uint8_t`` will be truncated when queue number under
   a TC is greater than 256.
 
+* 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
index 3b0c771..ab68633 100644 (file)
@@ -93,10 +93,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
 };
 
index da8aead..31f49ba 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <sys/time.h>
 #include <rte_alarm.h>
+#include <rte_ethdev_driver.h>
 
 #include "hns3_cmd.h"
 #include "hns3_mbx.h"
index 7995150..877f51c 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <rte_ethdev.h>
 #include <rte_ethdev_core.h>
+#include <rte_ethdev_driver.h>
 #include <rte_eth_ctrl.h>
 
 #include "igc_ethdev.h"
index 71c1f68..df5c07d 100644 (file)
@@ -1070,7 +1070,6 @@ int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
 
                *(const void **)arg = &qede_flow_ops;
                return 0;
-       case RTE_ETH_FILTER_MAX:
        default:
                DP_ERR(edev, "Unsupported filter type %d\n",
                        filter_type);
index 0ed2dad..012e805 100644 (file)
 extern "C" {
 #endif
 
-/**
- * Feature filter types
- */
-enum rte_filter_type {
-       RTE_ETH_FILTER_NONE = 0,
-       RTE_ETH_FILTER_ETHERTYPE,
-       RTE_ETH_FILTER_FLEXIBLE,
-       RTE_ETH_FILTER_SYN,
-       RTE_ETH_FILTER_NTUPLE,
-       RTE_ETH_FILTER_TUNNEL,
-       RTE_ETH_FILTER_FDIR,
-       RTE_ETH_FILTER_HASH,
-       RTE_ETH_FILTER_L2_TUNNEL,
-       RTE_ETH_FILTER_GENERIC,
-       RTE_ETH_FILTER_MAX
-};
-
-/**
- * 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
-};
-
 /**
  * Define all structures for ntuple Filter type.
  */
index b12bb38..aa030fd 100644 (file)
@@ -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)
index 619cbe5..5926ec0 100644 (file)
@@ -4067,47 +4067,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.
  *
index 7a54f0c..d830789 100644 (file)
@@ -476,6 +476,28 @@ typedef int (*eth_l2_tunnel_offload_set_t)
         uint8_t en);
 /**< @internal enable/disable the l2 tunnel offload functions */
 
+/**
+ * Feature filter types
+ */
+enum rte_filter_type {
+       RTE_ETH_FILTER_NONE = 0,
+       RTE_ETH_FILTER_ETHERTYPE,
+       RTE_ETH_FILTER_FLEXIBLE,
+       RTE_ETH_FILTER_SYN,
+       RTE_ETH_FILTER_NTUPLE,
+       RTE_ETH_FILTER_TUNNEL,
+       RTE_ETH_FILTER_FDIR,
+       RTE_ETH_FILTER_HASH,
+       RTE_ETH_FILTER_L2_TUNNEL,
+       RTE_ETH_FILTER_GENERIC,
+};
+
+/**
+ * Generic operations on filters
+ */
+enum rte_filter_op {
+       RTE_ETH_FILTER_GET,      /**< get flow API ops */
+};
 
 typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
                                 enum rte_filter_type filter_type,
index 8ddda25..fe62873 100644 (file)
@@ -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;