]> git.baikalelectronics.ru Git - kernel.git/commit
{net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table
authorEli Cohen <elic@nvidia.com>
Thu, 22 Apr 2021 12:48:10 +0000 (15:48 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 19 May 2021 06:01:48 +0000 (23:01 -0700)
commitfb573a2adb44d48503725472f7df60f9c8168ed8
treef4ba5c64d03cd957f1267c4f55afae2b99dded21
parente24c1d43b4669ac5a67df1e046845e42849451cf
{net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table

net/mlx5: Expose MPFS configuration API

MPFS is the multi physical function switch that bridges traffic between
the physical port and any physical functions associated with it. The
driver is required to add or remove MAC entries to properly forward
incoming traffic to the correct physical function.

We export the API to control MPFS so that other drivers, such as
mlx5_vdpa are able to add MAC addresses of their network interfaces.

The MAC address of the vdpa interface must be configured into the MPFS L2
address. Failing to do so could cause, in some NIC configurations, failure
to forward packets to the vdpa network device instance.

Fix this by adding calls to update the MPFS table.

CC: <mst@redhat.com>
CC: <jasowang@redhat.com>
CC: <virtualization@lists.linux-foundation.org>
Fixes: 89495935b0eb ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h
drivers/vdpa/mlx5/net/mlx5_vnet.c
include/linux/mlx5/mpfs.h [new file with mode: 0644]