summaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-07-16 04:14:21 -0700
committerDamjan Marion <dmarion@me.com>2018-07-20 09:32:52 +0000
commit0809f6c0300f85cf5cf5d49df1aa8f1e2d080f6c (patch)
treeb86838680e4ed002f41df5831b7313efc831193e /src/vnet/ethernet
parentc34b2e0f7cf891d8a5ecb91a6a2fb067cf33b3af (diff)
QoS: marking and recording for MPLS and VLAN
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-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
{