aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrashant Maheshwari <pmahesh2@cisco.com>2019-07-31 21:37:33 +0530
committerNeale Ranns <nranns@cisco.com>2019-08-06 08:13:33 +0000
commit3bcf1a940a3699ba3cda6aaecd21b14573709adc (patch)
tree1a3f11ffa5690c987b3503c57068d0519f5f70bb /src
parentec757593859bd8c16839ea8a81a2ef4eb8b29539 (diff)
ethernet: change to mark the CFI bit in the L2 header.
Type: fix Fixes: 039cbfe2 Signed-off-by: Prashant Maheshwari <pmahesh2@cisco.com> Change-Id: Idca91c73758824688dd6ce61df994be66753d838
Diffstat (limited to 'src')
-rw-r--r--src/vnet/ethernet/packet.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/ethernet/packet.h b/src/vnet/ethernet/packet.h
index d70960b0f7b..13d7dafabfc 100644
--- a/src/vnet/ethernet/packet.h
+++ b/src/vnet/ethernet/packet.h
@@ -142,8 +142,8 @@ ethernet_vlan_header_set_priority_net_order (ethernet_vlan_header_t * h,
{
u8 *bytes = (u8 *) (&h->priority_cfi_and_id);
- bytes[0] &= 0x1f;
- bytes[0] |= (prio & 0x7) << 5;
+ bytes[0] &= 0x0f;
+ bytes[0] |= (prio & 0xf) << 4;
}
always_inline u8
@@ -151,7 +151,7 @@ ethernet_vlan_header_get_priority_net_order (ethernet_vlan_header_t * h)
{
u8 *bytes = (u8 *) (&h->priority_cfi_and_id);
- return (bytes[0] >> 5);
+ return (bytes[0] >> 4);
}
/* VLAN with ethertype first and vlan id second */