net/mlx4_en: Implement mcast loopback prevention for ETH qps
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 15 Oct 2015 11:44:39 +0000 (14:44 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 22 Oct 2015 03:16:47 +0000 (23:16 -0400)
commit74194fb9c80cedb3130d26802c52deec3caebc75
treee29c44c7b9904914bcde2a773e046d68e50a598a
parent9a8928359736ab170303ee8a2cc15db54e3a4a8f
net/mlx4_en: Implement mcast loopback prevention for ETH qps

Set the mcast loopback prevention bit in the QPC for ETH MLX QPs (not
RSS QPs), when the firmware supports this feature. In addition, all rx
ring QPs need to be updated in order not to enforce loopback checks.
This prevents getting packets we sent both from the network stack and
the HCA. Loopback prevention is done by comparing the counter indices of
the sent and receiving QPs. If they're equal, packets aren't
loopback-ed.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/net/ethernet/mellanox/mlx4/en_main.c
drivers/net/ethernet/mellanox/mlx4/en_resources.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h