From: Leon Romanovsky <leon@kernel.org>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: jgg@ziepe.ca, selvin.xavier@broadcom.com,
chengyou@linux.alibaba.com, kaishen@linux.alibaba.com,
mustafa.ismail@intel.com, tatyana.e.nikolova@intel.com,
yishaih@nvidia.com, benve@cisco.com, neescoba@cisco.com,
bryan-bt.tan@broadcom.com, vishnu.dasa@broadcom.com,
zyjzyj2000@gmail.com, bmt@zurich.ibm.com,
linux-rdma@vger.kernel.org, linuxarm@huawei.com,
linux-kernel@vger.kernel.org, tangchengchang@huawei.com,
liyuyu6@huawei.com, linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH RFC 12/12] RDMA/hns: Support fast path for link-down events dispatching
Date: Tue, 24 Dec 2024 12:27:58 +0200 [thread overview]
Message-ID: <20241224102758.GE171473@unreal> (raw)
In-Reply-To: <20241122105308.2150505-13-huangjunxian6@hisilicon.com>
On Fri, Nov 22, 2024 at 06:53:08PM +0800, Junxian Huang wrote:
> From: Yuyu Li <liyuyu6@huawei.com>
>
> hns3 NIC driver can directly notify the RoCE driver about link status
> events bypassing the netdev notifier. This can provide more timely
> event dispatching for ULPs.
It is unlikely that it matters for ULPs and better would be if you don't
open-code existing netdev functionality (netdev notifiers).
Thanks
>
> Signed-off-by: Yuyu Li <liyuyu6@huawei.com>
> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> index 697b17cca02e..5c911d1def03 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> @@ -7178,9 +7178,22 @@ static int hns_roce_hw_v2_reset_notify(struct hnae3_handle *handle,
> return ret;
> }
>
> +static void hns_roce_hw_v2_link_status_change(struct hnae3_handle *handle,
> + bool linkup)
> +{
> + struct hns_roce_dev *hr_dev = (struct hns_roce_dev *)handle->priv;
> + struct net_device *netdev = handle->rinfo.netdev;
> +
> + if (linkup || !hr_dev)
> + return;
> +
> + ib_dispatch_port_state_event(&hr_dev->ib_dev, netdev);
> +}
> +
> static const struct hnae3_client_ops hns_roce_hw_v2_ops = {
> .init_instance = hns_roce_hw_v2_init_instance,
> .uninit_instance = hns_roce_hw_v2_uninit_instance,
> + .link_status_change = hns_roce_hw_v2_link_status_change,
> .reset_notify = hns_roce_hw_v2_reset_notify,
> };
>
> --
> 2.33.0
>
next parent reply other threads:[~2024-12-24 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241122105308.2150505-1-huangjunxian6@hisilicon.com>
[not found] ` <20241122105308.2150505-13-huangjunxian6@hisilicon.com>
2024-12-24 10:27 ` Leon Romanovsky [this message]
2024-12-24 10:32 ` [PATCH RFC 00/12] RDMA: Support link status events dispatching in ib_core Leon Romanovsky
2024-12-24 12:05 ` Junxian Huang
2024-12-24 13:38 ` Leon Romanovsky
2024-12-25 6:12 ` Junxian Huang
2024-12-25 8:30 ` Leon Romanovsky
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=20241224102758.GE171473@unreal \
--to=leon@kernel.org \
--cc=benve@cisco.com \
--cc=bmt@zurich.ibm.com \
--cc=bryan-bt.tan@broadcom.com \
--cc=chengyou@linux.alibaba.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@ziepe.ca \
--cc=kaishen@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liyuyu6@huawei.com \
--cc=mustafa.ismail@intel.com \
--cc=neescoba@cisco.com \
--cc=netdev@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=tangchengchang@huawei.com \
--cc=tatyana.e.nikolova@intel.com \
--cc=vishnu.dasa@broadcom.com \
--cc=yishaih@nvidia.com \
--cc=zyjzyj2000@gmail.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).