bnxt_re: changing the ip address shouldn't affect new connections
authorSriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Thu, 2 Nov 2017 21:09:04 +0000 (02:39 +0530)
committerDoug Ledford <dledford@redhat.com>
Mon, 13 Nov 2017 20:01:25 +0000 (15:01 -0500)
While adding a new gid, the driver currently does not return the context
back to the stack. A subsequent del_gid() (e.g, when ip address is changed)
doesn't find the right context in the driver and it ends up dropping that
request. This results in the HW caching a stale gid entry and traffic fails
because of that. Fix by returning the proper context in bnxt_re_add_gid().

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c

index 39e49d0e846780c9ac34ef5127d16efe52f32b35..adc42d7ff4f89c0b84a3dacae80a33dc90897b61 100644 (file)
@@ -394,6 +394,7 @@ int bnxt_re_add_gid(struct ib_device *ibdev, u8 port_num,
        ctx->idx = tbl_idx;
        ctx->refcnt = 1;
        ctx_tbl[tbl_idx] = ctx;
+       *context = ctx;
 
        return rc;
 }