• John Hurley's avatar
    nfp: flower: encode mac indexes with pre-tunnel rule check · 2e0bc7f3
    John Hurley authored
    When a tunnel packet arrives on the NFP card, its destination MAC is
    looked up and MAC index returned for it. This index can help verify the
    tunnel by, for example, ensuring that the packet arrived on the expected
    port. If the packet is destined for a known MAC that is not connected to a
    given physical port then the mac index can have a global value (e.g. when
    a series of bonded ports shared the same MAC).
    
    If the packet is to be detunneled at a bridge device or internal port like
    an Open vSwitch VLAN port, then it should first match a 'pre-tunnel' rule
    to direct it to that internal port.
    
    Use the MAC index to indicate if a packet should match a pre-tunnel rule
    before decap is allowed. Do this by tracking the number of internal ports
    associated with a MAC address and, if the number if >0, set a bit in the
    mac_index to forward the packet to the pre-tunnel table before continuing
    with decap.
    Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
    Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
    Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2e0bc7f3
tunnel_conf.c 27.7 KB