net/mlx5: E-Switch, Add support for the sriov offloads mode
authorOr Gerlitz <ogerlitz@mellanox.com>
Fri, 1 Jul 2016 11:50:55 +0000 (14:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Jul 2016 18:40:39 +0000 (14:40 -0400)
commit69697b6e2086b5860bd2d216bc4c6c49d84d73ff
treef9538d0978d30a98886a0112cd60e8b36ec9c887
parent6ab36e35f11244b469cdf3c976c185363f1ce61c
net/mlx5: E-Switch, Add support for the sriov offloads mode

Unlike the legacy mode, here, forwarding rules are not learned by the
driver per events on macs set by VFs/VMs into their vports, but rather
should be programmed by higher-level SW entities.

Saying that, still, in the offloads mode (SRIOV_OFFLOADS), two flow
groups are created by the driver for management (slow path) purposes:

The first group will be used for sending packets over e-switch vports
from the host OS where the e-switch management code runs, to be
received by VFs.

The second group will be used by a miss rule which forwards packets toward
the e-switch manager. Further logic will trap these packets such that
the receiving net-device as seen by the networking stack is the representor
of the vport that sent the packet over the e-switch data-path.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c [new file with mode: 0644]