X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fethernet%2Fpacket.h;h=007f93596f35fcbf90e646d8f8960180f0e8000e;hb=b10561bbecb2870360a731b4696bff920150720d;hp=04ce420c07e799174b0e8799498fec4f691a744e;hpb=b1232555e91b286feab5667b5a22f29aa8e96626;p=vpp.git diff --git a/src/vnet/ethernet/packet.h b/src/vnet/ethernet/packet.h index 04ce420c07e..007f93596f3 100644 --- a/src/vnet/ethernet/packet.h +++ b/src/vnet/ethernet/packet.h @@ -89,7 +89,7 @@ ethernet_address_set_locally_administered (u8 * a) } always_inline int -eh_dst_addr_to_rx_ctype (ethernet_header_t * eh) +eh_dst_addr_to_rx_ctype (const ethernet_header_t * eh) { if (PREDICT_TRUE (ethernet_address_cast (eh->dst_address) == ETHERNET_ADDRESS_UNICAST)) @@ -107,7 +107,7 @@ eh_dst_addr_to_rx_ctype (ethernet_header_t * eh) } always_inline int -eh_dst_addr_to_tx_ctype (ethernet_header_t * eh) +eh_dst_addr_to_tx_ctype (const ethernet_header_t * eh) { if (PREDICT_TRUE (ethernet_address_cast (eh->dst_address) == ETHERNET_ADDRESS_UNICAST)) @@ -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 */ @@ -184,7 +184,6 @@ typedef struct #define ETHERNET_N_PBB (1 << 24) } ethernet_pbb_header_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* Backbone source/destination address. */ @@ -201,7 +200,6 @@ typedef CLIB_PACKED (struct /* 3 bit priority, 1 bit DEI, 1 bit UCA, 3 bit RES and 24 bit I_SID (service identifier) */ u32 priority_dei_uca_res_sid; }) ethernet_pbb_header_packed_t; -/* *INDENT-ON* */ #endif /* included_ethernet_packet_h */