[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241224102758.GE171473@unreal>
Date: Tue, 24 Dec 2024 12:27:58 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Junxian Huang <huangjunxian6@...ilicon.com>
Cc: jgg@...pe.ca, selvin.xavier@...adcom.com, chengyou@...ux.alibaba.com,
kaishen@...ux.alibaba.com, mustafa.ismail@...el.com,
tatyana.e.nikolova@...el.com, yishaih@...dia.com, benve@...co.com,
neescoba@...co.com, bryan-bt.tan@...adcom.com,
vishnu.dasa@...adcom.com, zyjzyj2000@...il.com, bmt@...ich.ibm.com,
linux-rdma@...r.kernel.org, linuxarm@...wei.com,
linux-kernel@...r.kernel.org, tangchengchang@...wei.com,
liyuyu6@...wei.com, linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 12/12] RDMA/hns: Support fast path for link-down
events dispatching
On Fri, Nov 22, 2024 at 06:53:08PM +0800, Junxian Huang wrote:
> From: Yuyu Li <liyuyu6@...wei.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@...wei.com>
> Signed-off-by: Junxian Huang <huangjunxian6@...ilicon.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
>
Powered by blists - more mailing lists