]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Add RX MAC VLAN filter support
authorEli Cohen <elic@nvidia.com>
Mon, 11 Apr 2022 12:29:42 +0000 (15:29 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Jun 2022 06:16:38 +0000 (02:16 -0400)
commit8834f2c9af66d60f63a1b86dba44685a69bb479f
tree3121f923174ffa484ad341fd50b4248e8bdf0ce0
parentdab4e1d376a06285328b6390ac1e4037bb25a820
vdpa/mlx5: Add RX MAC VLAN filter support

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: Eli Cohen <elic@nvidia.com>
Message-Id: <20220411122942.225717-4-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c