From: David Ahern <dsahern@kernel.org>
To: Zhu Yanjun <yanjun.zhu@linux.dev>,
jgg@ziepe.ca, leon@kernel.org, zyjzyj2000@gmail.com,
linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v4 3/4] RDMA/rxe: Support RDMA link creation and destruction per net namespace
Date: Mon, 9 Mar 2026 12:54:18 -0600 [thread overview]
Message-ID: <a91c6ed2-2eb2-4e7c-9213-5cc977abc660@kernel.org> (raw)
In-Reply-To: <20260308233540.13382-4-yanjun.zhu@linux.dev>
On 3/8/26 5:35 PM, Zhu Yanjun wrote:
> @@ -101,20 +100,20 @@ static inline void rxe_reclassify_recv_socket(struct socket *sock)
> }
>
> static struct dst_entry *rxe_find_route4(struct rxe_qp *qp,
> + struct net *net,
> struct net_device *ndev,
> struct in_addr *saddr,
> struct in_addr *daddr)
> {
> struct rtable *rt;
> - struct flowi4 fl = { { 0 } };
> + struct flowi4 fl = {};
>
> - memset(&fl, 0, sizeof(fl));
changing init of fl here and fl6 in the next function are not relevant
to this patch. It should be a different one after this set.
> fl.flowi4_oif = ndev->ifindex;
> memcpy(&fl.saddr, saddr, sizeof(*saddr));
> memcpy(&fl.daddr, daddr, sizeof(*daddr));
> fl.flowi4_proto = IPPROTO_UDP;
>
> - rt = ip_route_output_key(&init_net, &fl);
> + rt = ip_route_output_key(net, &fl);
> if (IS_ERR(rt)) {
> rxe_dbg_qp(qp, "no route to %pI4\n", &daddr->s_addr);
> return NULL;
> @@ -125,21 +124,21 @@ static struct dst_entry *rxe_find_route4(struct rxe_qp *qp,
>
> #if IS_ENABLED(CONFIG_IPV6)
> static struct dst_entry *rxe_find_route6(struct rxe_qp *qp,
> + struct net *net,
> struct net_device *ndev,
> struct in6_addr *saddr,
> struct in6_addr *daddr)
> {
> struct dst_entry *ndst;
> - struct flowi6 fl6 = { { 0 } };
> + struct flowi6 fl6 = {};
>
> - memset(&fl6, 0, sizeof(fl6));
> fl6.flowi6_oif = ndev->ifindex;
> memcpy(&fl6.saddr, saddr, sizeof(*saddr));
> memcpy(&fl6.daddr, daddr, sizeof(*daddr));
> fl6.flowi6_proto = IPPROTO_UDP;
>
> - ndst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(recv_sockets.sk6->sk),
> - recv_sockets.sk6->sk, &fl6,
> + ndst = ipv6_stub->ipv6_dst_lookup_flow(net,
> + rxe_ns_pernet_sk6(dev_net(ndev)), &fl6,
why dev_net(ndev) here?
> NULL);
> if (IS_ERR(ndst)) {
> rxe_dbg_qp(qp, "no route to %pI6\n", daddr);
next prev parent reply other threads:[~2026-03-09 18:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 23:35 [PATCH v4 0/4] RDMA/rxe: Add the support that rxe can work in net namespace Zhu Yanjun
2026-03-08 23:35 ` [PATCH v4 1/4] RDMA/nldev: Add dellink function pointer Zhu Yanjun
2026-03-08 23:35 ` [PATCH v4 2/4] RDMA/rxe: Add net namespace support for IPv4/IPv6 sockets Zhu Yanjun
2026-03-09 18:54 ` David Ahern
2026-03-10 0:59 ` yanjun.zhu
2026-03-08 23:35 ` [PATCH v4 3/4] RDMA/rxe: Support RDMA link creation and destruction per net namespace Zhu Yanjun
2026-03-09 18:54 ` David Ahern [this message]
2026-03-10 0:57 ` yanjun.zhu
2026-03-08 23:35 ` [PATCH v4 4/4] RDMA/rxe: Add testcase for net namespace rxe Zhu Yanjun
2026-03-08 23:40 ` [PATCH v4 0/4] RDMA/rxe: Add the support that rxe can work in net namespace Zhu Yanjun
2026-03-09 18:55 ` David Ahern
2026-03-10 0:55 ` yanjun.zhu
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=a91c6ed2-2eb2-4e7c-9213-5cc977abc660@kernel.org \
--to=dsahern@kernel.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--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.