ethdev: remove API to config L2 tunnel EtherType
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 22 Oct 2020 10:06:18 +0000 (11:06 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:06 +0000 (23:35 +0100)
Remove rte_eth_dev_l2_tunnel_eth_type_conf() and corresponding
ethdev driver operation.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/cmdline.c
doc/guides/nics/features.rst
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_11.rst
doc/guides/testpmd_app_ug/testpmd_funcs.rst
drivers/net/ixgbe/ixgbe_ethdev.c
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 2a363be..8e76ec6 100644 (file)
@@ -843,10 +843,6 @@ static void cmd_help_long_parsed(void *parsed_result,
                        "port (port_id) (rxq|txq) (queue_id) setup\n"
                        "    Setup a rx/tx queue of port X.\n\n"
 
-                       "port config (port_id|all) l2-tunnel E-tag ether-type"
-                       " (value)\n"
-                       "    Set the value of E-tag ether-type.\n\n"
-
                        "port config (port_id|all) l2-tunnel E-tag"
                        " (enable|disable)\n"
                        "    Enable/disable the E-tag support.\n\n"
@@ -10679,51 +10675,6 @@ cmdline_parse_inst_t cmd_mcast_addr = {
  * only support E-tag now.
  */
 
-/* Ether type config */
-struct cmd_config_l2_tunnel_eth_type_result {
-       cmdline_fixed_string_t port;
-       cmdline_fixed_string_t config;
-       cmdline_fixed_string_t all;
-       portid_t id;
-       cmdline_fixed_string_t l2_tunnel;
-       cmdline_fixed_string_t l2_tunnel_type;
-       cmdline_fixed_string_t eth_type;
-       uint16_t eth_type_val;
-};
-
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_port =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                port, "port");
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_config =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                config, "config");
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_all_str =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                all, "all");
-cmdline_parse_token_num_t cmd_config_l2_tunnel_eth_type_id =
-       TOKEN_NUM_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                id, UINT16);
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_l2_tunnel =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                l2_tunnel, "l2-tunnel");
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_l2_tunnel_type =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                l2_tunnel_type, "E-tag");
-cmdline_parse_token_string_t cmd_config_l2_tunnel_eth_type_eth_type =
-       TOKEN_STRING_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                eth_type, "ether-type");
-cmdline_parse_token_num_t cmd_config_l2_tunnel_eth_type_eth_type_val =
-       TOKEN_NUM_INITIALIZER
-               (struct cmd_config_l2_tunnel_eth_type_result,
-                eth_type_val, UINT16);
-
 static enum rte_eth_tunnel_type
 str2fdir_l2_tunnel_type(char *string)
 {
@@ -10743,77 +10694,6 @@ str2fdir_l2_tunnel_type(char *string)
        return RTE_TUNNEL_TYPE_NONE;
 }
 
-/* ether type config for all ports */
-static void
-cmd_config_l2_tunnel_eth_type_all_parsed
-       (void *parsed_result,
-        __rte_unused struct cmdline *cl,
-        __rte_unused void *data)
-{
-       struct cmd_config_l2_tunnel_eth_type_result *res = parsed_result;
-       struct rte_eth_l2_tunnel_conf entry;
-       portid_t pid;
-
-       entry.l2_tunnel_type = str2fdir_l2_tunnel_type(res->l2_tunnel_type);
-       entry.ether_type = res->eth_type_val;
-
-       RTE_ETH_FOREACH_DEV(pid) {
-               rte_eth_dev_l2_tunnel_eth_type_conf(pid, &entry);
-       }
-}
-
-cmdline_parse_inst_t cmd_config_l2_tunnel_eth_type_all = {
-       .f = cmd_config_l2_tunnel_eth_type_all_parsed,
-       .data = NULL,
-       .help_str = "port config all l2-tunnel E-tag ether-type <value>",
-       .tokens = {
-               (void *)&cmd_config_l2_tunnel_eth_type_port,
-               (void *)&cmd_config_l2_tunnel_eth_type_config,
-               (void *)&cmd_config_l2_tunnel_eth_type_all_str,
-               (void *)&cmd_config_l2_tunnel_eth_type_l2_tunnel,
-               (void *)&cmd_config_l2_tunnel_eth_type_l2_tunnel_type,
-               (void *)&cmd_config_l2_tunnel_eth_type_eth_type,
-               (void *)&cmd_config_l2_tunnel_eth_type_eth_type_val,
-               NULL,
-       },
-};
-
-/* ether type config for a specific port */
-static void
-cmd_config_l2_tunnel_eth_type_specific_parsed(
-       void *parsed_result,
-       __rte_unused struct cmdline *cl,
-       __rte_unused void *data)
-{
-       struct cmd_config_l2_tunnel_eth_type_result *res =
-                parsed_result;
-       struct rte_eth_l2_tunnel_conf entry;
-
-       if (port_id_is_invalid(res->id, ENABLED_WARN))
-               return;
-
-       entry.l2_tunnel_type = str2fdir_l2_tunnel_type(res->l2_tunnel_type);
-       entry.ether_type = res->eth_type_val;
-
-       rte_eth_dev_l2_tunnel_eth_type_conf(res->id, &entry);
-}
-
-cmdline_parse_inst_t cmd_config_l2_tunnel_eth_type_specific = {
-       .f = cmd_config_l2_tunnel_eth_type_specific_parsed,
-       .data = NULL,
-       .help_str = "port config <port_id> l2-tunnel E-tag ether-type <value>",
-       .tokens = {
-               (void *)&cmd_config_l2_tunnel_eth_type_port,
-               (void *)&cmd_config_l2_tunnel_eth_type_config,
-               (void *)&cmd_config_l2_tunnel_eth_type_id,
-               (void *)&cmd_config_l2_tunnel_eth_type_l2_tunnel,
-               (void *)&cmd_config_l2_tunnel_eth_type_l2_tunnel_type,
-               (void *)&cmd_config_l2_tunnel_eth_type_eth_type,
-               (void *)&cmd_config_l2_tunnel_eth_type_eth_type_val,
-               NULL,
-       },
-};
-
 /* Enable/disable l2 tunnel */
 struct cmd_config_l2_tunnel_en_dis_result {
        cmdline_fixed_string_t port;
@@ -17514,8 +17394,6 @@ cmdline_parse_ctx_t main_ctx[] = {
        (cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,
        (cmdline_parse_inst_t *)&cmd_show_port_meter_stats,
        (cmdline_parse_inst_t *)&cmd_mcast_addr,
-       (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_eth_type_all,
-       (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_eth_type_specific,
        (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_en_dis_all,
        (cmdline_parse_inst_t *)&cmd_config_l2_tunnel_en_dis_specific,
        (cmdline_parse_inst_t *)&cmd_config_e_tag_insertion_en,
index 234bf06..e063f0c 100644 (file)
@@ -934,6 +934,5 @@ Other dev ops not represented by a Feature
 * ``uc_all_hash_table_set``
 * ``udp_tunnel_port_add``
 * ``udp_tunnel_port_del``
-* ``l2_tunnel_eth_type_conf``
 * ``l2_tunnel_offload_set``
 * ``tx_pkt_prepare``
index c405335..dc2b3f9 100644 (file)
@@ -94,7 +94,7 @@ Deprecation Notices
 
 * ethdev: The legacy L2 tunnel filtering API is deprecated as the rest of
   the legacy filtering API.
-  The functions ``rte_eth_dev_l2_tunnel_eth_type_conf`` and
+  The function
   ``rte_eth_dev_l2_tunnel_offload_set`` which were not marked as deprecated,
   will be removed in DPDK 20.11.
 
index 36a63f5..2cfe08d 100644 (file)
@@ -541,6 +541,9 @@ API Changes
 * ethdev: Removed the legacy filter API, including
   ``rte_eth_dev_filter_supported()`` and ``rte_eth_dev_filter_ctrl()``.
 
+* ethdev: Removed the legacy L2 tunnel configuration API, including
+  ``rte_eth_dev_l2_tunnel_eth_type_conf()``.
+
 * vhost: Moved vDPA APIs from experimental to stable.
 
 * vhost: Add a new function ``rte_vhost_crypto_driver_start`` to be called
index 32c1a7a..cc31937 100644 (file)
@@ -2337,10 +2337,6 @@ These threshold options are also available from the command-line.
 port config - E-tag
 ~~~~~~~~~~~~~~~~~~~
 
-Set the value of ether-type for E-tag::
-
-   testpmd> port config (port_id|all) l2-tunnel E-tag ether-type (value)
-
 Enable/disable the E-tag support::
 
    testpmd> port config (port_id|all) l2-tunnel E-tag (enable|disable)
index 4ec5c4b..d37b14c 100644 (file)
@@ -348,8 +348,6 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev,
                                   const struct timespec *timestamp);
 static void ixgbevf_dev_interrupt_handler(void *param);
 
-static int ixgbe_dev_l2_tunnel_eth_type_conf
-       (struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
 static int ixgbe_dev_l2_tunnel_offload_set
        (struct rte_eth_dev *dev,
         struct rte_eth_l2_tunnel_conf *l2_tunnel,
@@ -564,7 +562,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
        .timesync_adjust_time = ixgbe_timesync_adjust_time,
        .timesync_read_time   = ixgbe_timesync_read_time,
        .timesync_write_time  = ixgbe_timesync_write_time,
-       .l2_tunnel_eth_type_conf = ixgbe_dev_l2_tunnel_eth_type_conf,
        .l2_tunnel_offload_set   = ixgbe_dev_l2_tunnel_offload_set,
        .udp_tunnel_port_add  = ixgbe_dev_udp_tunnel_port_add,
        .udp_tunnel_port_del  = ixgbe_dev_udp_tunnel_port_del,
@@ -7545,33 +7542,6 @@ ixgbe_update_e_tag_eth_type(struct ixgbe_hw *hw,
        return 0;
 }
 
-/* Config l2 tunnel ether type */
-static int
-ixgbe_dev_l2_tunnel_eth_type_conf(struct rte_eth_dev *dev,
-                                 struct rte_eth_l2_tunnel_conf *l2_tunnel)
-{
-       int ret = 0;
-       struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-       struct ixgbe_l2_tn_info *l2_tn_info =
-               IXGBE_DEV_PRIVATE_TO_L2_TN_INFO(dev->data->dev_private);
-
-       if (l2_tunnel == NULL)
-               return -EINVAL;
-
-       switch (l2_tunnel->l2_tunnel_type) {
-       case RTE_L2_TUNNEL_TYPE_E_TAG:
-               l2_tn_info->e_tag_ether_type = l2_tunnel->ether_type;
-               ret = ixgbe_update_e_tag_eth_type(hw, l2_tunnel->ether_type);
-               break;
-       default:
-               PMD_DRV_LOG(ERR, "Invalid tunnel type");
-               ret = -EINVAL;
-               break;
-       }
-
-       return ret;
-}
-
 /* Enable e-tag tunnel */
 static int
 ixgbe_e_tag_enable(struct ixgbe_hw *hw)
index aa030fd..e5d0a18 100644 (file)
@@ -5317,30 +5317,6 @@ rte_eth_dev_get_dcb_info(uint16_t port_id,
        return eth_err(port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info));
 }
 
-int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
-                                   struct rte_eth_l2_tunnel_conf *l2_tunnel)
-{
-       struct rte_eth_dev *dev;
-
-       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-       if (l2_tunnel == NULL) {
-               RTE_ETHDEV_LOG(ERR, "Invalid l2_tunnel parameter\n");
-               return -EINVAL;
-       }
-
-       if (l2_tunnel->l2_tunnel_type >= RTE_TUNNEL_TYPE_MAX) {
-               RTE_ETHDEV_LOG(ERR, "Invalid tunnel type\n");
-               return -EINVAL;
-       }
-
-       dev = &rte_eth_devices[port_id];
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->l2_tunnel_eth_type_conf,
-                               -ENOTSUP);
-       return eth_err(port_id, (*dev->dev_ops->l2_tunnel_eth_type_conf)(dev,
-                                                               l2_tunnel));
-}
-
 int
 rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
                                  struct rte_eth_l2_tunnel_conf *l2_tunnel,
index 5926ec0..67b7017 100644 (file)
@@ -4637,25 +4637,6 @@ __rte_experimental
 int
 rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
 
-/**
- * Config l2 tunnel ether type of an Ethernet device for filtering specific
- * tunnel packets by ether type.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param l2_tunnel
- *   l2 tunnel configuration.
- *
- * @return
- *   - (0) if successful.
- *   - (-ENODEV) if port identifier is invalid.
- *   - (-EIO) if device is removed.
- *   - (-ENOTSUP) if hardware doesn't support tunnel type.
- */
-int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
-                                   struct rte_eth_l2_tunnel_conf *l2_tunnel);
-
 /**
  * Enable/disable l2 tunnel offload functions. Include,
  * 1, The ability of parsing a type of l2 tunnel of an Ethernet device.
index d830789..a69793d 100644 (file)
@@ -465,10 +465,6 @@ typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
                                       struct rte_dev_eeprom_info *info);
 /**< @internal Retrieve plugin module eeprom data */
 
-typedef int (*eth_l2_tunnel_eth_type_conf_t)
-       (struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
-/**< @internal config l2 tunnel ether type */
-
 typedef int (*eth_l2_tunnel_offload_set_t)
        (struct rte_eth_dev *dev,
         struct rte_eth_l2_tunnel_conf *l2_tunnel,
@@ -853,8 +849,6 @@ struct eth_dev_ops {
 
        eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
        eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
-       eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-       /** Config ether type of l2 tunnel. */
        eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
        /** Enable/disable l2 tunnel offload functions. */
 
index fe62873..63f077a 100644 (file)
@@ -30,7 +30,6 @@ DPDK_21 {
        rte_eth_dev_get_vlan_offload;
        rte_eth_dev_info_get;
        rte_eth_dev_is_valid_port;
-       rte_eth_dev_l2_tunnel_eth_type_conf;
        rte_eth_dev_l2_tunnel_offload_set;
        rte_eth_dev_logtype;
        rte_eth_dev_mac_addr_add;