aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/packet.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-07-16 04:14:21 -0700
committerNeale Ranns <nranns@cisco.com>2018-07-23 08:34:24 +0000
commit9df8ffa0dcacc5705e6f3fbcd8b7e1d713a77f23 (patch)
tree8b8236b5df5802d2f9a47b05f10bfe1ccab71ece /src/vnet/ethernet/packet.h
parentca23c3ea16f133968d9a6c48089656a963af5590 (diff)
QoS: marking and recording for MPLS and VLAN
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 0809f6c0300f85cf5cf5d49df1aa8f1e2d080f6c)
Diffstat (limited to 'src/vnet/ethernet/packet.h')
-rw-r--r--src/vnet/ethernet/packet.h8
1 files changed, 8 insertions, 0 deletions
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
{