linux/drivers/infiniband/hw/mlx4
Talat Batheesh a748d60df3 IB/mlx4: Take source GID by index from HW GID table
Previously, we used the HW GID index in order to search the source GID
in the software GID cached table. In some cases, for example when
the MAC Address of the network interface is changed, the GID cached table
saves the old-IPv6-link-local GID at the end of the table.

When returning the old MAC address, the software GID cached table tries
to add the new IPv6-link-local GID, and when it identifies that the GID
already exists, the software GID cached does not add it. Thus a mismatch
occurs between the HW and the SW GID tables.

It resulted with sending traffic with the wrong source GID.

This commit fixes the issue by taking both from the HW table.

The problem can be reproduced with the following scenario:
Client:
    # ifconfig ens6 2.2.2.5
    # ifconfig ens6 inet6 add 2001:0db8:0:f101::5/64
    # ifconfig ens6 hw ether f4:52:14:61:a0:71
    # ifconfig ens6 inet6 del 2001:0db8:0:f101::5/64
    # ifconfig ens6 inet6 add 2001:0db8:0:f101::5/64
    # ucmatose -f ipv6 -b 2001:0db8:0:f101::5 -s 2001:0db8:0:f101::6 -p 20156
Server:
    # ucmatose -f ipv6 -b 2001:0db8:0:f101::6 -p 20156

Fixes: 4c3eb3ca13 ('IB/mlx4: Add VLAN support for IBoE')
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-02-14 11:44:42 -05:00
..
ah.c Updates for 4.10 kernel merge window 2016-12-15 12:03:32 -08:00
alias_GUID.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00
cm.c IB/mlx4: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
cq.c IB/mlx4: Fix create CQ error flow 2016-11-16 20:03:44 -05:00
doorbell.c
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
mad.c Merge branch 'mlx' into merge-test 2016-12-14 14:44:25 -05:00
main.c IB/mlx4: Remove unused variable from function declaration 2017-02-14 11:44:42 -05:00
Makefile
mcg.c IB/mlx4: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
mlx4_ib.h IB/core: Let create_ah return extended response to user 2016-12-13 13:38:27 -05:00
mr.c IB/mlx4: Prevent cross page boundary allocation 2016-06-23 10:08:25 -04:00
qp.c IB/mlx4: Take source GID by index from HW GID table 2017-02-14 11:44:42 -05:00
srq.c IB/mlx4: Move user vendor structures 2016-10-07 16:54:36 -04:00
sysfs.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00