RDMA/bnxt_re: Honor vlan_id in GID entry comparison
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 15 Jul 2019 09:19:13 +0000 (05:19 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Jul 2019 18:04:04 +0000 (15:04 -0300)
commitc56b593d2af4cbd189c6af5fd6790728fade80cc
tree7387d26a061e0b432dfc456a068fe84525bf7dff
parentf4d46119f214f9a7620b0d18b153d7e0e8c90b4f
RDMA/bnxt_re: Honor vlan_id in GID entry comparison

A GID entry consists of GID, vlan, netdev and smac.  Extend GID duplicate
check comparisons to consider vlan_id as well to support IPv6 VLAN based
link local addresses. Introduce a new structure (bnxt_qplib_gid_info) to
hold gid and vlan_id information.

The issue is discussed in the following thread
https://lore.kernel.org/r/AM0PR05MB4866CFEDCDF3CDA1D7D18AA5D1F20@AM0PR05MB4866.eurprd05.prod.outlook.com

Fixes: 823b23da7113 ("IB/core: Allow vlan link local address based RoCE GIDs")
Cc: <stable@vger.kernel.org> # v5.2+
Link: https://lore.kernel.org/r/20190715091913.15726-1-selvin.xavier@broadcom.com
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Co-developed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/bnxt_re/qplib_res.h
drivers/infiniband/hw/bnxt_re/qplib_sp.c
drivers/infiniband/hw/bnxt_re/qplib_sp.h