[PATCH v5] net/netvsc: fix parsing of VLAN metadata
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 15 19:25:26 CET 2024
On Thu, 15 Feb 2024 18:12:35 +0000
Alan Elder <alan.elder at microsoft.com> wrote:
> +/* VLAN header fields */
> +#define RTE_VLAN_DEI_SHIFT 12
> +#define RTE_VLAN_PRI_SHIFT 13
> +#define RTE_VLAN_PRI_MASK 0xe000 /* Priority Code Point */
> +#define RTE_VLAN_DEI_MASK 0x1000 /* Drop Eligible Indicator */
> +#define RTE_VLAN_ID_MASK 0x0fff /* VLAN Identifier */
> +
> +#define RTE_VLAN_TCI_ID(vlan_tci) ((vlan_tci) & RTE_VLAN_ID_MASK)
> +#define RTE_VLAN_TCI_PRI(vlan_tci) (((vlan_tci) & RTE_VLAN_PRI_MASK) >> \
> + RTE_VLAN_PRI_SHIFT)
> +#define RTE_VLAN_TCI_DEI(vlan_tci) (((vlan_tci) & RTE_VLAN_DEI_MASK) >> \
> + RTE_VLAN_DEI_SHIFT)
> +#define RTE_VLAN_TCI_MAKE(id, pri, dei) ((id) | \
> + ((pri) << RTE_VLAN_PRI_SHIFT) | \
> + ((dei) << RTE_VLAN_DEI_SHIFT))
> +
With current DPDK standard max line length 100, the lines may not need to be broken any more.
More information about the dev
mailing list