summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ethernet/packet.h
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-08-26 16:11:36 +0200
committerJohn Lo <loj@cisco.com>2016-10-04 17:15:16 +0000
commit95300d19152877dca8dfbd574dc6da50620125e8 (patch)
treee645d4dd4a83c37f7b407042132ebf4fbaf0582c /vnet/vnet/ethernet/packet.h
parentac09280947dcf035f51cb394b88de3c7b66a6320 (diff)
VPP-355: add PBB (802.1ah) tag rewrite
- new API/CLI to define pbb tag rewrite on interface - encapsulation/decapsulation of PBB tags - tracing of PBB header - PBB tag rewrite operations Change-Id: I538b3025a8b2e41cdeed9f10fea94bbcd28b5f5f Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'vnet/vnet/ethernet/packet.h')
-rw-r--r--vnet/vnet/ethernet/packet.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/vnet/vnet/ethernet/packet.h b/vnet/vnet/ethernet/packet.h
index b50f9303f23..964cf638101 100644
--- a/vnet/vnet/ethernet/packet.h
+++ b/vnet/vnet/ethernet/packet.h
@@ -102,6 +102,45 @@ typedef struct
u16 priority_cfi_and_id;
} ethernet_vlan_header_tv_t;
+/* PBB header with B-TAG - backbone VLAN indicator and I-TAG - service encapsulation */
+typedef struct
+{
+ /* Backbone source/destination address. */
+ u8 b_dst_address[6];
+ u8 b_src_address[6];
+
+ /* B-tag */
+ u16 b_type;
+ /* 3 bit priority, 1 bit DEI and 12 bit vlan id */
+ u16 priority_dei_id;
+
+ /* I-tag */
+ u16 i_type;
+ /* 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;
+
+#define ETHERNET_N_PBB (1 << 24)
+} ethernet_pbb_header_t;
+
+/* *INDENT-OFF* */
+typedef CLIB_PACKED (struct
+{
+ /* Backbone source/destination address. */
+ u8 b_dst_address[6];
+ u8 b_src_address[6];
+
+ /* B-tag */
+ u16 b_type;
+ /* 3 bit priority, 1 bit DEI and 12 bit vlan id */
+ u16 priority_dei_id;
+
+ /* I-tag */
+ u16 i_type;
+ /* 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 */
/*