[PATCH v4 01/27] net/ixgbe: remove MAC type check macros
Bruce Richardson
bruce.richardson at intel.com
Mon Feb 16 17:58:51 CET 2026
On Fri, Feb 13, 2026 at 10:26:12AM +0000, Anatoly Burakov wrote:
> The macros used were not informative and did not add any value beyond code
> golf, so remove them and make MAC type checks explicit.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
> drivers/net/intel/ixgbe/ixgbe_ethdev.h | 12 ------------
> drivers/net/intel/ixgbe/ixgbe_flow.c | 20 +++++++++++++++++---
> 2 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> index 5dbd659941..7dc02a472b 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
> @@ -137,18 +137,6 @@
> #define IXGBE_MAX_FDIR_FILTER_NUM (1024 * 32)
> #define IXGBE_MAX_L2_TN_FILTER_NUM 128
>
> -#define MAC_TYPE_FILTER_SUP_EXT(type) do {\
> - if ((type) != ixgbe_mac_82599EB && (type) != ixgbe_mac_X540)\
> - return -ENOTSUP;\
> -} while (0)
> -
> -#define MAC_TYPE_FILTER_SUP(type) do {\
> - if ((type) != ixgbe_mac_82599EB && (type) != ixgbe_mac_X540 &&\
> - (type) != ixgbe_mac_X550 && (type) != ixgbe_mac_X550EM_x &&\
> - (type) != ixgbe_mac_X550EM_a && (type) != ixgbe_mac_E610)\
> - return -ENOTSUP;\
> -} while (0)
> -
Ack for removing the former. For the latter, since the list is longer and
the code is used twice, I'd be tempted to convert to an inline function
taking in struct hw and returning type bool. WDYT?
More information about the dev
mailing list