From: Leon Romanovsky <leon@kernel.org>
To: Boshi Yu <boshiyu@linux.alibaba.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org,
kaishen@linux.alibaba.com, chengyou@linux.alibaba.com
Subject: Re: [PATCH for-next 1/8] RDMA/erdma: Probe the erdma RoCEv2 device
Date: Wed, 4 Dec 2024 16:03:07 +0200 [thread overview]
Message-ID: <20241204140307.GO1245331@unreal> (raw)
In-Reply-To: <20241126070351.92787-2-boshiyu@linux.alibaba.com>
On Tue, Nov 26, 2024 at 02:59:07PM +0800, Boshi Yu wrote:
> Currently, the erdma driver supports both the iWARP and RoCEv2 protocols.
> The erdma driver reads the ERDMA_REGS_DEV_PROTO_REG register to identify
> the protocol used by the erdma device. Since each protocol requires
> different ib_device_ops, we introduce the erdma_device_ops_iwarp and
> erdma_device_ops_rocev2 for iWARP and RoCEv2 protocols, respectively.
>
> Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com>
> Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com>
> ---
> drivers/infiniband/hw/erdma/Kconfig | 2 +-
> drivers/infiniband/hw/erdma/erdma.h | 3 +-
> drivers/infiniband/hw/erdma/erdma_hw.h | 7 ++++
> drivers/infiniband/hw/erdma/erdma_main.c | 47 ++++++++++++++++++-----
> drivers/infiniband/hw/erdma/erdma_verbs.c | 16 +++++++-
> drivers/infiniband/hw/erdma/erdma_verbs.h | 12 ++++++
> 6 files changed, 75 insertions(+), 12 deletions(-)
<...>
> +++ b/drivers/infiniband/hw/erdma/erdma_main.c
> @@ -172,6 +172,12 @@ static int erdma_device_init(struct erdma_dev *dev, struct pci_dev *pdev)
> {
> int ret;
>
> + dev->proto = erdma_reg_read32(dev, ERDMA_REGS_DEV_PROTO_REG);
> + if (!erdma_device_iwarp(dev) && !erdma_device_rocev2(dev)) {
Why do you need this check? Your old driver which supports only iwarp
doesn't have this check, so why did you suddenly need it for roce?
> + dev_err(&pdev->dev, "Unsupported protocol: %d\n", dev->proto);
> + return -ENODEV;
> + }
> +
Thanks
next prev parent reply other threads:[~2024-12-04 14:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 6:59 [PATCH for-next 0/8] RDMA/erdma: Support the RoCEv2 protocol Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 1/8] RDMA/erdma: Probe the erdma RoCEv2 device Boshi Yu
2024-11-26 15:36 ` Zhu Yanjun
2024-11-28 2:07 ` Cheng Xu
2024-11-28 13:07 ` Zhu Yanjun
2024-12-04 14:03 ` Leon Romanovsky [this message]
2024-12-05 2:46 ` Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 2/8] RDMA/erdma: Add GID table management interfaces Boshi Yu
2024-11-26 15:51 ` Zhu Yanjun
2024-11-28 2:35 ` Boshi Yu
2024-11-29 8:54 ` Zhu Yanjun
2024-11-29 11:18 ` Boshi Yu
2024-11-29 18:40 ` Zhu Yanjun
2024-11-26 6:59 ` [PATCH for-next 3/8] RDMA/erdma: Add the erdma_query_pkey() interface Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 4/8] RDMA/erdma: Add address handle implementation Boshi Yu
2024-12-04 14:11 ` Leon Romanovsky
2024-12-05 2:54 ` Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 5/8] RDMA/erdma: Add erdma_modify_qp_rocev2() interface Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 6/8] RDMA/erdma: Reformat the code of the modify_qp interface Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 7/8] RDMA/erdma: Add the query_qp command to the cmdq Boshi Yu
2024-11-26 6:59 ` [PATCH for-next 8/8] RDMA/erdma: Support UD QPs and UD WRs Boshi Yu
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=20241204140307.GO1245331@unreal \
--to=leon@kernel.org \
--cc=boshiyu@linux.alibaba.com \
--cc=chengyou@linux.alibaba.com \
--cc=jgg@ziepe.ca \
--cc=kaishen@linux.alibaba.com \
--cc=linux-rdma@vger.kernel.org \
/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.