public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "yanjun.zhu" <yanjun.zhu@linux.dev>
To: David Ahern <dsahern@kernel.org>,
	jgg@ziepe.ca, leon@kernel.org, zyjzyj2000@gmail.com,
	linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Zhu Yanjun <yanjun.zhu@linux.dev>
Subject: Re: [PATCH v4 3/4] RDMA/rxe: Support RDMA link creation and destruction per net namespace
Date: Mon, 9 Mar 2026 17:57:49 -0700	[thread overview]
Message-ID: <a8667ffa-8157-42b7-b1e8-632891de7f1c@linux.dev> (raw)
In-Reply-To: <a91c6ed2-2eb2-4e7c-9213-5cc977abc660@kernel.org>

On 3/9/26 11:54 AM, David Ahern wrote:
> 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.

Thanks. The changes have been done. It is a trivial problem. Let us keep 
them in this patch series.

> 
>>   	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?

Got it. I will fix it in the latest commits.

Zhu Yanjun

> 
> 
>>   					       NULL);
>>   	if (IS_ERR(ndst)) {
>>   		rxe_dbg_qp(qp, "no route to %pI6\n", daddr);
> 


  reply	other threads:[~2026-03-10  0:58 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
2026-03-10  0:57     ` yanjun.zhu [this message]
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=a8667ffa-8157-42b7-b1e8-632891de7f1c@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=dsahern@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox