[PATCH] net: improve vlan header type alignment

Thomas Monjalon thomas at monjalon.net
Thu Oct 17 22:44:23 CEST 2024


13/10/2024 10:35, Morten Brørup:
> +static_assert(sizeof(struct rte_ether_addr) == 6,
> +		"sizeof(struct rte_ether_addr) == 6");
> +static_assert(alignof(struct rte_ether_addr) == 2,
> +		"alignof(struct rte_ether_addr) == 2");

Instead of repeating the condition twice,
it would be simpler to use RTE_BUILD_BUG_ON




More information about the dev mailing list