linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@mellanox.com>
To: Selvin Xavier <selvin.xavier@broadcom.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	Jason Gunthorpe <jgg@mellanox.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH for-next v3 1/2] RDMA/bnxt_re: Refactor device add/remove functionalities
Date: Wed, 26 Feb 2020 05:28:43 +0000	[thread overview]
Message-ID: <AM0PR05MB4866C0C2C9CB59C386C6FD17D1EA0@AM0PR05MB4866.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1582693794-23373-2-git-send-email-selvin.xavier@broadcom.com>

Hi Selvin,

> From: linux-rdma-owner@vger.kernel.org <linux-rdma-
> owner@vger.kernel.org> 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.

  reply	other threads:[~2020-02-26  5:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  5:09 [PATCH for-next v3 0/2] RDMA/bnxt_re driver update Selvin Xavier
2020-02-26  5:09 ` [PATCH for-next v3 1/2] RDMA/bnxt_re: Refactor device add/remove functionalities Selvin Xavier
2020-02-26  5:28   ` Parav Pandit [this message]
2020-02-26  7:52     ` Selvin Xavier
2020-02-26  5:09 ` [PATCH for-next v3 2/2] RDMA/bnxt_re: Use driver_unregister and unregistration API Selvin Xavier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR05MB4866C0C2C9CB59C386C6FD17D1EA0@AM0PR05MB4866.eurprd05.prod.outlook.com \
    --to=parav@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).