On Wed, Feb 26, 2020 at 10:58 AM Parav Pandit <parav@xxxxxxxxxxxx> wrote: > > Hi Selvin, > > > From: linux-rdma-owner@xxxxxxxxxxxxxxx <linux-rdma- > > owner@xxxxxxxxxxxxxxx> On Behalf Of Selvin Xavier > > > [..] > > +int bnxt_re_ib_init(struct bnxt_re_dev *rdev) { > > + int rc = 0; > > + > > + /* Register ib dev */ > > + rc = bnxt_re_register_ib(rdev); > > + if (rc) { > > + pr_err("Failed to register with IB: %#x\n", rc); > > + return rc; > > + } > > + set_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags); > > + dev_info(rdev_to_dev(rdev), "Device registered successfully"); > > + ib_get_eth_speed(&rdev->ibdev, 1, &rdev->active_speed, > > + &rdev->active_width); > > + set_bit(BNXT_RE_FLAG_ISSUE_ROCE_STATS, &rdev->flags); > > + bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1, > > IB_EVENT_PORT_ACTIVE); > What if the link is down at this point? > I see that it was done this way before, but since you are refactoring, may be you want to relook? > Do you still want to report it as active? No.. Will change it based on the link status. thanks > > > + bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1, > > IB_EVENT_GID_CHANGE); > > + > GID addition, deletion decisions for RoCE ports are taken care by the IB core. > So hw driver shouldn't report this event. Please remove this call. Will do.