]> git.baikalelectronics.ru Git - kernel.git/commit
i40iw: Extend port reuse support for listeners
authorShiraz Saleem <shiraz.saleem@intel.com>
Sat, 12 May 2018 12:50:30 +0000 (07:50 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 16 May 2018 19:13:20 +0000 (13:13 -0600)
commit1e082b9c00777f000e2232293d32fc016f27cd1f
tree046415c5d14e9de9c0a6ead41e6203325f8bfae6
parent9694bd9d1ccb07d3429b4b0802b12f3e83279789
i40iw: Extend port reuse support for listeners

If two listeners are created with different IP's but
same port, the second rdma_listen fails due to a
duplicate port entry being added from the CQP add
APBVT OP. commit 184eb268db06 ("i40iw: Add support
for port reuse on active side connections") does not
account for listener side port reuse.

Check for duplicate port before invoking the CQP command
to add APBVT entry and delete the entry only if the port
is not in use. Additionally, consolidate all port-reuse
logic into i40iw_manage_apbvt.

Fixes: 184eb268db06 ("i40iw: Add support for port reuse on active side connections")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/i40iw/i40iw_cm.c
drivers/infiniband/hw/i40iw/i40iw_cm.h
drivers/infiniband/hw/i40iw/i40iw_hw.c