• Shiraz Saleem's avatar
    i40iw: Extend port reuse support for listeners · f43c00c0
    Shiraz Saleem authored
    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 f16dc0aa ("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: f16dc0aa ("i40iw: Add support for port reuse on active side connections")
    Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    f43c00c0
i40iw_hw.c 24.5 KB