ethernet: fix DMAC check and skip unnecessary ones (VPP-1868) 11/27311/2
authorJohn Lo <loj@cisco.com>
Wed, 13 May 2020 02:34:39 +0000 (22:34 -0400)
committerJohn Lo <loj@cisco.com>
Mon, 1 Jun 2020 21:16:37 +0000 (21:16 +0000)
commit5e69119cdda353988cbd138665193231daf271c9
tree6294d75c2380fd09cd849502c85285dc09a3d6ec
parentab572152d9cbed7944442d07a6bd21c43ad1c83d
ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)

Fix and optimize DMAC check in ethernet-input node to utilize NIC or
driver which support L3 DMAC-filtering mode so that DMAC check can be
bypassed safely for interfaces/sub-interfaces in L3 mode.
Checking of interface in L3-DMAC-filtering state to avoid DMAC check
require the following:
a) Fix interface driver init sequence for devices which supports L3
   DMAC-filtering to indicate its capability and initialize interface
   to L3 DMAC-filtering state.
b) Fix ethernet_set_flags() function and its associated callback
   flags_change() functions registered by various drivers in interface
   infra to provide proper L3 DMAC filtering status.
Maintain interface/sub-interface L3 config count so DMAC checks can be
bypassed if L3 forwarding is not setup on any main/sub-interfaces.

Type: fix
Ticket: VPP-1868

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
(cherry picked from commit 4a302ee7c75f3d4fd1a73a9d1f6c34b3bde8d620)
12 files changed:
extras/deprecated/ixge/ixge.c
src/plugins/avf/device.c
src/plugins/dpdk/device/init.c
src/plugins/rdma/device.c
src/vnet/devices/af_packet/af_packet.c
src/vnet/ethernet/ethernet.h
src/vnet/ethernet/interface.c
src/vnet/ethernet/node.c
src/vnet/interface.h
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c
src/vnet/mpls/interface.c