> -----Original Message-----
> From: Andrew Rybchenko <[email protected]>
> Sent: Sunday, October 18, 2020 10:09 PM
> To: Lu, Wenzhuo <[email protected]>; Xing, Beilei
> <[email protected]>; Iremonger, Bernard
> <[email protected]>; Ray Kinsella <[email protected]>; Neil
> Horman <[email protected]>; Ajit Khaparde
> <[email protected]>; Somnath Kotur
> <[email protected]>; Guo, Jia <[email protected]>; Wang,
> Haiyue <[email protected]>; Ziyang Xuan
> <[email protected]>; Xiaoyun Wang
> <[email protected]>; Guoyang Zhou
> <[email protected]>; Rasesh Mody <[email protected]>;
> Shahed Shaikh <[email protected]>; Andrew Rybchenko
> <[email protected]>; Thomas Monjalon
> <[email protected]>; Yigit, Ferruh <[email protected]>
> Cc: [email protected]
> Subject: [PATCH 03/14] ethdev: remove legacy EtherType filter type support
>
> RTE flow API should be used for filtering.
>
> Move corresponding definitions to ethdev internal driver API since it is used
> by drivers internally.
> Preserve RTE_ETH_FILTER_ETHERTYPE because of it as well.
>
> Signed-off-by: Andrew Rybchenko <[email protected]>
> ---
> app/test-pmd/cmdline.c | 115 -------------------
> doc/guides/rel_notes/deprecation.rst | 2 +-
> drivers/net/bnxt/bnxt_ethdev.c | 157 --------------------------
> drivers/net/e1000/igb_ethdev.c | 85 --------------
> drivers/net/hinic/hinic_pmd_ethdev.h | 1 +
> drivers/net/i40e/i40e_ethdev.c | 45 --------
> drivers/net/ixgbe/ixgbe_ethdev.c | 85 --------------
> drivers/net/qede/qede_filter.c | 1 -
> drivers/net/sfc/sfc_ethdev.c | 3 -
> lib/librte_ethdev/rte_eth_ctrl.h | 19 ----
> lib/librte_ethdev/rte_ethdev_driver.h | 23 ++++
> 11 files changed, 25 insertions(+), 511 deletions(-)
>
<...>
> #define RTE_FLEX_FILTER_MAXLEN128/**< bytes to use in flex filter. */
> #define RTE_FLEX_FILTER_MASK_SIZE\
> (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT) diff --git
> a/lib/librte_ethdev/rte_ethdev_driver.h
> b/lib/librte_ethdev/rte_ethdev_driver.h
> index c63b9f7eb7..67a83dacc7 100644
> --- a/lib/librte_ethdev/rte_ethdev_driver.h
> +++ b/lib/librte_ethdev/rte_ethdev_driver.h
> @@ -1342,6 +1342,29 @@ int
> rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t
> cur_queue,
> uint32_t direction);
>
> +
> +/*
s/*/**
> + * Legacy ethdev API used internally by drivers.
> + */
> +
I am not sure if this doc is need?
> +/**
> + * Define all structures for Ethertype Filter type.
> + */
> +
> +#define RTE_ETHTYPE_FLAGS_MAC 0x0001 /**< If set, compare mac */
> +#define RTE_ETHTYPE_FLAGS_DROP 0x0002 /**< If set, drop packet when
> match */
> +
> +/**
> + * A structure used to define the ethertype filter entry
> + * to support RTE_ETH_FILTER_ETHERTYPE data representation.
> + */
> +struct rte_eth_ethertype_filter {
> +struct rte_ether_addr mac_addr; /**< Mac address to match. */
> +uint16_t ether_type; /**< Ether type to match */
> +uint16_t flags; /**< Flags from RTE_ETHTYPE_FLAGS_* */
> +uint16_t queue; /**< Queue assigned to when match*/
> +};
> +
> #ifdef __cplusplus
> }
> #endif
> --
> 2.17.1
>