All of lore.kernel.org
 help / color / mirror / Atom feed
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
> 

  reply	other threads:[~2024-12-24 10:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 10:52 [PATCH RFC 00/12] RDMA: Support link status events dispatching in ib_core Junxian Huang
2024-11-22 10:52 ` [PATCH RFC 01/12] RDMA/core: Add ib_query_netdev_port() to query netdev port by IB device Junxian Huang
2024-11-22 10:52 ` [PATCH RFC 02/12] RDMA/core: Support link status events dispatching Junxian Huang
2024-11-22 10:52 ` [PATCH RFC 03/12] RDMA/bnxt_re: Remove deliver net device event Junxian Huang
2024-11-25  9:12   ` kernel test robot
2024-11-22 10:53 ` [PATCH RFC 04/12] RDMA/erdma: " Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 05/12] RDMA/irdma: " Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 06/12] RDMA/rxe: " Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 07/12] RDMA/siw: " Junxian Huang
2024-11-25 10:14   ` kernel test robot
2024-11-25 10:14   ` kernel test robot
2024-11-22 10:53 ` [PATCH RFC 08/12] RDMA/usnic: Support report_port_event() ops Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 09/12] RDMA/mlx4: " Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 10/12] RDMA/pvrdma: " Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 11/12] RDMA/mlx5: Handle link status event only for LAG device Junxian Huang
2024-11-22 10:53 ` [PATCH RFC 12/12] RDMA/hns: Support fast path for link-down events dispatching Junxian Huang
2024-12-24 10:27   ` Leon Romanovsky [this message]
2024-12-24 10:26 ` [PATCH RFC 00/12] RDMA: Support link status events dispatching in ib_core Leon Romanovsky
2024-12-24 10:32 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.