> +#define HN_VLAN_CFI_SHIFT 12 > +#define HN_VLAN_PRI_SHIFT 13 > +#define HN_VLAN_PRI_MASK 0xe000 /* Priority Code Point */ > +#define HN_VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator / Drop > Eligible Indicator */ > +#define HN_VLAN_VID_MASK 0x0fff /* VLAN Identifier */ > + > +#define HN_VLAN_TCI_ID(vlan_tci) ((vlan_tci) & HN_VLAN_VID_MASK) > +#define HN_VLAN_TCI_PRI(vlan_tci) (((vlan_tci) & HN_VLAN_PRI_MASK) >> > HN_VLAN_PRI_SHIFT) > +#define HN_VLAN_TCI_CFI(vlan_tci) (((vlan_tci) & HN_VLAN_CFI_MASK) >> > HN_VLAN_CFI_SHIFT) > +#define HN_VLAN_TCI_MAKE(id, pri, cfi) ((id) | > \ > + ((pri) << HN_VLAN_PRI_SHIFT) | \ > + ((cfi) << HN_VLAN_CFI_SHIFT)) > +
The patch looks good. It seems HN_VLAN_TCI_ID, HN_VLAN_TCI_PRI, HN_VLAN_TCI_CFI and HN_VLAN_TCI_MAKE could be useful to other drivers. (at least to MANA) Ferruh, do you think we should define those common functions in ./lib/net/rte_ether.h? Thanks Long