From: Bob Pearson <rpearsonhpe@gmail.com>
To: Zhu Yanjun <yanjun.zhu@intel.com>,
zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org,
linux-rdma@vger.kernel.org, parav@nvidia.com, lehrer@gmail.com
Cc: Zhu Yanjun <yanjun.zhu@linux.dev>,
Rain River <rain.1986.08.12@gmail.com>
Subject: Re: [PATCH v6.4-rc1 v5 1/8] RDMA/rxe: Creating listening sock in newlink function
Date: Tue, 20 Jun 2023 12:16:21 -0500 [thread overview]
Message-ID: <677fb641-4b48-48d0-f4de-e42707e7eae3@gmail.com> (raw)
In-Reply-To: <20230508075636.352138-2-yanjun.zhu@intel.com>
On 5/8/23 02:56, Zhu Yanjun wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> Originally when the module rdma_rxe is loaded, the sock listening on udp
> port 4791 is created. Currently moving the creating listening port to
> newlink function.
>
> So when running "rdma link add" command, the sock listening on udp port
> 4791 is created.
>
> Tested-by: Rain River <rain.1986.08.12@gmail.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/sw/rxe/rxe.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
> index 7a7e713de52d..89b24bc34299 100644
> --- a/drivers/infiniband/sw/rxe/rxe.c
> +++ b/drivers/infiniband/sw/rxe/rxe.c
> @@ -194,6 +194,10 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev)
> goto err;
> }
>
> + err = rxe_net_init();
> + if (err)
> + return err;
> +
If you put this here you cannot create more than one rxe device.
E.g. if you type
sudo rdma link add rxe0 type rxe netdev enp6s0
sudo rdma link add rxe1 type rxe netdev lo
the second call will fail. This worked before this patch. Maybe you will fix later but
by itself this patch breaks the driver.
Bob
> err = rxe_net_add(ibdev_name, ndev);
> if (err) {
> rxe_err("failed to add %s\n", ndev->name);
> @@ -210,12 +214,6 @@ static struct rdma_link_ops rxe_link_ops = {
>
> static int __init rxe_module_init(void)
> {
> - int err;
> -
> - err = rxe_net_init();
> - if (err)
> - return err;
> -
> rdma_link_register(&rxe_link_ops);
> pr_info("loaded\n");
> return 0;
next prev parent reply other threads:[~2023-06-20 17:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 7:56 [PATCH v6.4-rc1 v5 0/8] Fix the problem that rxe can not work in net namespace Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 1/8] RDMA/rxe: Creating listening sock in newlink function Zhu Yanjun
2023-06-20 17:16 ` Bob Pearson [this message]
2023-06-20 23:40 ` Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 2/8] RDMA/rxe: Support more rdma links in init_net Zhu Yanjun
2023-06-20 17:54 ` Bob Pearson
2023-06-20 23:51 ` Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 3/8] RDMA/nldev: Add dellink function pointer Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 4/8] RDMA/rxe: Implement dellink in rxe Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 5/8] RDMA/rxe: Replace global variable with sock lookup functions Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 6/8] RDMA/rxe: add the support of net namespace Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 7/8] RDMA/rxe: Add the support of net namespace notifier Zhu Yanjun
2023-05-08 7:56 ` [PATCH v6.4-rc1 v5 8/8] RDMA/rxe: Replace l_sk6 with sk6 in net namespace Zhu Yanjun
2023-06-21 21:09 ` [PATCH v6.4-rc1 v5 0/8] Fix the problem that rxe can not work " Bob Pearson
2023-06-21 21:27 ` Bob Pearson
2023-06-23 7:15 ` Zhu Yanjun
2023-06-23 12:59 ` Bob Pearson
2023-06-23 23:50 ` Zhu Yanjun
2023-06-24 17:03 ` Pearson, Robert B
2023-06-24 17:32 ` Chuck Lever III
2023-06-25 0:54 ` Zhu Yanjun
2023-06-25 0:53 ` Zhu Yanjun
2023-06-22 3:46 ` Zhu Yanjun
2023-06-23 7:09 ` Zhu Yanjun
2024-11-12 9:33 ` Cyclinder Kuo
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=677fb641-4b48-48d0-f4de-e42707e7eae3@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@ziepe.ca \
--cc=lehrer@gmail.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=rain.1986.08.12@gmail.com \
--cc=yanjun.zhu@intel.com \
--cc=yanjun.zhu@linux.dev \
--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.