{net,ib}/mlx5: Don't disable local loopback multicast traffic when needed
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 9 Jan 2018 09:41:10 +0000 (11:41 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 11 Jan 2018 22:52:42 +0000 (00:52 +0200)
commit8978cc921fc7fad3f4d6f91f1da01352aeeeff25
tree2249e2b60eba4775d1443d9dfdcab6ffd4b7db34
parentccc12b11c5332c84442ef120dcd631523be75089
{net,ib}/mlx5: Don't disable local loopback multicast traffic when needed

There are systems platform information management interfaces (such as
HOST2BMC) for which we cannot disable local loopback multicast traffic.

Separate disable_local_lb_mc and disable_local_lb_uc capability bits so
driver will not disable multicast loopback traffic if not supported.
(It is expected that Firmware will not set disable_local_lb_mc if
HOST2BMC is running for example.)

Function mlx5_nic_vport_update_local_lb will do best effort to
disable/enable UC/MC loopback traffic and return success only in case it
succeeded to changed all allowed by Firmware.

Adapt mlx5_ib and mlx5e to support the new cap bits.

Fixes: 2c43c5a036be ("net/mlx5e: Enable local loopback in loopback selftest")
Fixes: c85023e153e3 ("IB/mlx5: Add raw ethernet local loopback support")
Fixes: bded747bb432 ("net/mlx5: Add raw ethernet local loopback firmware command")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/mlx5_ifc.h