RE: [PATCH for-next v3 1/2] RDMA/bnxt_re: Refactor device add/remove functionalities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

> +	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.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux