• Eli Cohen's avatar
    vdpa/mlx5: Add RX MAC VLAN filter support · baf2ad3f
    Eli Cohen authored
    Support HW offloaded filtering of MAC/VLAN packets.
    To allow that, we add a handler to handle VLAN configurations coming
    through the control VQ. Two operations are supported.
    
    1. Adding VLAN - in this case, an entry will be added to the RX flow
       table that will allow the combination of the MAC/VLAN to be
       forwarded to the TIR.
    2. Removing VLAN - will remove the entry from the flow table,
       effectively blocking such packets from going through.
    
    Currently the control VQ does not propagate changes to the MAC of the
    VLAN device so we always use the MAC of the parent device.
    
    Examples:
    1. Create vlan device:
    $ ip link add link ens1 name ens1.8 type vlan id 8
    Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
    Message-Id: <20220411122942.225717-4-elic@nvidia.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Acked-by: default avatarJason Wang <jasowang@redhat.com>
    baf2ad3f
mlx5_vnet.c 83 KB