[dpdk-dev] [PATCH v4 1/2] ethdev: add vlan type for setting ether type

Panu Matilainen pmatilai at redhat.com
Fri Mar 11 12:19:17 CET 2016


On 03/11/2016 10:49 AM, Helin Zhang wrote:
> In order to set ether type of VLAN for single VLAN, inner
> and outer VLAN, the VLAN type as an input parameter is added
> to 'rte_eth_dev_set_vlan_ether_type()'.
> In addition, corresponding changes in e1000, ixgbe and i40e
> are also added.
>
> Signed-off-by: Helin Zhang <helin.zhang at intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> ---
>   app/test-pmd/cmdline.c                      | 30 +++++++++-----
>   app/test-pmd/config.c                       |  9 +++--
>   app/test-pmd/testpmd.h                      |  3 +-
>   doc/guides/rel_notes/release_16_04.rst      |  4 ++
>   doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +----
>   drivers/net/e1000/igb_ethdev.c              | 21 +++++++---
>   drivers/net/i40e/i40e_ethdev.c              | 63 +++++++++++++++++++++++++++--
>   drivers/net/ixgbe/ixgbe_ethdev.c            | 19 +++++++--
>   lib/librte_ether/rte_ethdev.c               | 25 +++++++++++-
>   lib/librte_ether/rte_ethdev.h               | 23 ++++++++++-
>   lib/librte_ether/rte_ether_version.map      |  7 ++++
>   11 files changed, 175 insertions(+), 40 deletions(-)
>
> v4:
>   - Updated the doc of testpmd guide.
>
> v3:
>   - Used versioning mechanism to avoid ABI issue.
>   - Re-organized the patch set.
>
> v2:
>   - Used RTE_NEXT_ABI to avoid ABI change issue.
>   - Reworked the announcement of ABI change for release 16.07.
>
[...]
> @@ -1077,7 +1088,7 @@ typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
>   /**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
>
>   typedef void (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
> -				  uint16_t tpid);
> +				enum rte_vlan_type type, uint16_t tpid);
>   /**< @internal set the outer VLAN-TPID by an Ethernet device. */
>
>   typedef void (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
> @@ -2346,6 +2357,8 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
>    *
>    * @param port_id
>    *   The port identifier of the Ethernet device.
> + * @vlan_type
> + *   The vlan type.
>    * @param tag_type
>    *   The Tag Protocol ID
>    * @return
> @@ -2353,7 +2366,13 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
>    *   - (-ENOSUP) if hardware-assisted VLAN TPID setup is not supported.
>    *   - (-ENODEV) if *port_id* invalid.
>    */
> -int rte_eth_dev_set_vlan_ether_type(uint8_t port_id, uint16_t tag_type);
> +int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
> +				    enum rte_vlan_type vlan_type,
> +				    uint16_t tag_type);
> +int rte_eth_dev_set_vlan_ether_type_v22(uint8_t port_id, uint16_t tag_type);
> +int rte_eth_dev_set_vlan_ether_type_v1604(uint8_t port_id,
> +					  enum rte_vlan_type vlan_type,
> +					  uint16_t tag_type);
>
>   /**
>    * Set VLAN offload configuration on an Ethernet device

Its nice to see people actually trying to be compatible on occasion :)

However in this case there's not much point in doing so, because 
libethdev ABI has already been broken in this cycle:
http://dpdk.org/browse/dpdk/commit/?id=cfd2279ea6299826fe992028f1dffaf9fa7e7d0a

In other words, the compatibility versions can never get invoked because 
all software built against libethdev needs to be rebuilt anyway because 
of the soname bump. Just drop the compat versions, no point carrying 
around something that cannot possibly get used.

	- Panu -


More information about the dev mailing list