X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fl2%2Fl2_vtr.h;h=f6454bf1eac35c788b1baa133d44caa26d1bae95;hb=4d5b917;hp=893b2272b04b1b0a7d564320ab521f5c08106403;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/vnet/l2/l2_vtr.h b/src/vnet/l2/l2_vtr.h index 893b2272b04..f6454bf1eac 100644 --- a/src/vnet/l2/l2_vtr.h +++ b/src/vnet/l2/l2_vtr.h @@ -105,9 +105,11 @@ l2_vtr_process (vlib_buffer_t * b0, vtr_config_t * config) *((u64 *) eth) = temp_8; *((u32 *) (eth + 8)) = temp_4; - /* Update l2_len */ + /* Update l2 parameters */ vnet_buffer (b0)->l2.l2_len += (word) config->push_bytes - (word) config->pop_bytes; + vnet_buffer (b0)->l2_hdr_offset -= + (word) config->push_bytes - (word) config->pop_bytes; /* Update vlan tag count */ ethernet_buffer_adjust_vlan_count_by_bytes (b0, @@ -258,6 +260,17 @@ u32 l2vtr_get (vlib_main_t * vlib_main, u32 * vtr_op, u32 * push_dot1q, u32 * vtr_tag1, u32 * vtr_tag2); +/** + * Get pbb tag rewrite on the given interface. + * Return 1 if there is an error, 0 if ok + */ +u32 l2pbb_get (vlib_main_t * vlib_main, + vnet_main_t * vnet_main, + u32 sw_if_index, + u32 * vtr_op, + u16 * outer_tag, + ethernet_header_t * eth_hdr, u16 * b_vlanid, u32 * i_sid); + #endif /* included_vnet_l2_vtr_h */