From 0809f6c0300f85cf5cf5d49df1aa8f1e2d080f6c Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 16 Jul 2018 04:14:21 -0700 Subject: QoS: marking and recording for MPLS and VLAN Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1 Signed-off-by: Neale Ranns --- src/vnet/ethernet/packet.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/vnet/ethernet') diff --git a/src/vnet/ethernet/packet.h b/src/vnet/ethernet/packet.h index 1a0506dc4d6..d70960b0f7b 100644 --- a/src/vnet/ethernet/packet.h +++ b/src/vnet/ethernet/packet.h @@ -146,6 +146,14 @@ ethernet_vlan_header_set_priority_net_order (ethernet_vlan_header_t * h, bytes[0] |= (prio & 0x7) << 5; } +always_inline u8 +ethernet_vlan_header_get_priority_net_order (ethernet_vlan_header_t * h) +{ + u8 *bytes = (u8 *) (&h->priority_cfi_and_id); + + return (bytes[0] >> 5); +} + /* VLAN with ethertype first and vlan id second */ typedef struct { -- cgit 1.2.3-korg