diff options
author | John Lo <loj@cisco.com> | 2016-09-22 18:24:13 -0400 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-09-23 07:52:44 +0000 |
commit | 20e555155d9a707be05f7b4e3ee78f3f14820fc8 (patch) | |
tree | c4db1e6b4eebdab0fa97499281590be0cee8b908 /vnet/vnet/ethernet/interface.c | |
parent | 36d25063828f65a6e864bc56b488bef3c4abcaa4 (diff) |
Fix detection of packet output via BVI into a BD and SHG adjustment
In BVI output node, set a signature value in packet buffer field
sw_if_index[VLIB_TX] so l2-input node can reliably check that
packet came into a BD through BVI so it can set the SHG of the
packet to 0 for a unicast packet.
Change-Id: I301aa2896677e11d0c964ca476dddcb5a8804fc2
Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'vnet/vnet/ethernet/interface.c')
-rw-r--r-- | vnet/vnet/ethernet/interface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vnet/vnet/ethernet/interface.c b/vnet/vnet/ethernet/interface.c index f2e2ca0d7d8..78d89f7e259 100644 --- a/vnet/vnet/ethernet/interface.c +++ b/vnet/vnet/ethernet/interface.c @@ -347,7 +347,10 @@ simulated_ethernet_interface_tx (vlib_main_t * vm, // and update l2_len in packet as required for l2 forwarding path vnet_buffer (b)->sw_if_index[VLIB_RX] = sw_if_index; if (bvi_flag) - vnet_update_l2_len (b); + { + vnet_update_l2_len (b); + vnet_buffer (b)->sw_if_index[VLIB_TX] = L2INPUT_BVI; + } else vnet_buffer (b)->sw_if_index[VLIB_TX] = (u32) ~ 0; |