public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
@ 2025-09-12  8:39 Feng zhou
  2025-09-12 12:40 ` Pavel Begunkov
  0 siblings, 1 reply; 9+ messages in thread
From: Feng zhou @ 2025-09-12  8:39 UTC (permalink / raw)
  To: axboe, asml.silence, almasrymina, kuba, dtatulea
  Cc: io-uring, linux-kernel, yangzhenze, wangdongdong.6, zhoufeng.zf

From: Feng Zhou <zhoufeng.zf@bytedance.com>

ifq->if_rxq has not been assigned, is -1, the correct value is
in reg.if_rxq.

Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices")
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
---
 io_uring/zcrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 319eddfd30e0..3639283c87ca 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
 		goto err;
 	}
 
-	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq);
+	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
 	if (!ifq->dev) {
 		ret = -EOPNOTSUPP;
 		goto err;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12  8:39 [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL Feng zhou
@ 2025-09-12 12:40 ` Pavel Begunkov
  2025-09-12 13:54   ` [External] " Feng Zhou
  2025-09-12 14:22   ` Jakub Kicinski
  0 siblings, 2 replies; 9+ messages in thread
From: Pavel Begunkov @ 2025-09-12 12:40 UTC (permalink / raw)
  To: Feng zhou, axboe, almasrymina, kuba, dtatulea
  Cc: io-uring, linux-kernel, yangzhenze, wangdongdong.6

On 9/12/25 09:39, Feng zhou wrote:
> From: Feng Zhou <zhoufeng.zf@bytedance.com>
> 
> ifq->if_rxq has not been assigned, is -1, the correct value is
> in reg.if_rxq.

Good catch. Note that the blamed patch was merged via the net tree
this time around to avoid conflicts, and the io_uring tree doesn't
have it yet. You can repost it adding netdev@vger.kernel.org and
the net maintainers to be merged via the net tree. Otherwise it'll
have to wait until 6.18-rc1 is out

> Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices")
> Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
> ---
>   io_uring/zcrx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
> index 319eddfd30e0..3639283c87ca 100644
> --- a/io_uring/zcrx.c
> +++ b/io_uring/zcrx.c
> @@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
>   		goto err;
>   	}
>   
> -	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq);
> +	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
>   	if (!ifq->dev) {
>   		ret = -EOPNOTSUPP;
>   		goto err;

-- 
Pavel Begunkov


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [External] Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 12:40 ` Pavel Begunkov
@ 2025-09-12 13:54   ` Feng Zhou
  2025-09-12 14:22   ` Jakub Kicinski
  1 sibling, 0 replies; 9+ messages in thread
From: Feng Zhou @ 2025-09-12 13:54 UTC (permalink / raw)
  To: Pavel Begunkov, axboe, almasrymina, kuba, dtatulea
  Cc: io-uring, linux-kernel, yangzhenze, wangdongdong.6

在 2025/9/12 20:40, Pavel Begunkov 写道:
> On 9/12/25 09:39, Feng zhou wrote:
>> From: Feng Zhou <zhoufeng.zf@bytedance.com>
>>
>> ifq->if_rxq has not been assigned, is -1, the correct value is
>> in reg.if_rxq.
> 
> Good catch. Note that the blamed patch was merged via the net tree
> this time around to avoid conflicts, and the io_uring tree doesn't
> have it yet. You can repost it adding netdev@vger.kernel.org and
> the net maintainers to be merged via the net tree. Otherwise it'll
> have to wait until 6.18-rc1 is out

Thanks for reminding, will do.

> 
>> Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add 
>> support for custom DMA devices")
>> Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
>> ---
>>   io_uring/zcrx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
>> index 319eddfd30e0..3639283c87ca 100644
>> --- a/io_uring/zcrx.c
>> +++ b/io_uring/zcrx.c
>> @@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
>>           goto err;
>>       }
>> -    ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq);
>> +    ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
>>       if (!ifq->dev) {
>>           ret = -EOPNOTSUPP;
>>           goto err;
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
@ 2025-09-12 14:01 Feng zhou
  2025-09-15 19:36 ` Jens Axboe
  2025-09-16  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 9+ messages in thread
From: Feng zhou @ 2025-09-12 14:01 UTC (permalink / raw)
  To: axboe, asml.silence, almasrymina, kuba, edumazet, pabeni, horms,
	saeedm, tariqt, mbloch, leon, andrew+netdev, dtatulea
  Cc: netdev, io-uring, linux-kernel, yangzhenze, wangdongdong.6,
	zhoufeng.zf

From: Feng Zhou <zhoufeng.zf@bytedance.com>

ifq->if_rxq has not been assigned, is -1, the correct value is
in reg.if_rxq.

Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices")
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
---
 io_uring/zcrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 319eddfd30e0..3639283c87ca 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
 		goto err;
 	}
 
-	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq);
+	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
 	if (!ifq->dev) {
 		ret = -EOPNOTSUPP;
 		goto err;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 12:40 ` Pavel Begunkov
  2025-09-12 13:54   ` [External] " Feng Zhou
@ 2025-09-12 14:22   ` Jakub Kicinski
  2025-09-12 18:30     ` Mina Almasry
  2025-09-15 15:14     ` Pavel Begunkov
  1 sibling, 2 replies; 9+ messages in thread
From: Jakub Kicinski @ 2025-09-12 14:22 UTC (permalink / raw)
  To: Pavel Begunkov
  Cc: Feng zhou, axboe, almasrymina, dtatulea, io-uring, linux-kernel,
	yangzhenze, wangdongdong.6

On Fri, 12 Sep 2025 13:40:06 +0100 Pavel Begunkov wrote:
> On 9/12/25 09:39, Feng zhou wrote:
> > From: Feng Zhou <zhoufeng.zf@bytedance.com>
> > 
> > ifq->if_rxq has not been assigned, is -1, the correct value is
> > in reg.if_rxq.  
> 
> Good catch. Note that the blamed patch was merged via the net tree
> this time around to avoid conflicts, and the io_uring tree doesn't
> have it yet. You can repost it adding netdev@vger.kernel.org and
> the net maintainers to be merged via the net tree. Otherwise it'll
> have to wait until 6.18-rc1 is out

If only we had a maintainers entry that makes people automatically 
CC both lists, eh? :\

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 14:22   ` Jakub Kicinski
@ 2025-09-12 18:30     ` Mina Almasry
  2025-09-15 15:14     ` Pavel Begunkov
  1 sibling, 0 replies; 9+ messages in thread
From: Mina Almasry @ 2025-09-12 18:30 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Pavel Begunkov, Feng zhou, axboe, dtatulea, io-uring,
	linux-kernel, yangzhenze, wangdongdong.6

On Fri, Sep 12, 2025 at 7:22 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Fri, 12 Sep 2025 13:40:06 +0100 Pavel Begunkov wrote:
> > On 9/12/25 09:39, Feng zhou wrote:
> > > From: Feng Zhou <zhoufeng.zf@bytedance.com>
> > >
> > > ifq->if_rxq has not been assigned, is -1, the correct value is
> > > in reg.if_rxq.
> >
> > Good catch. Note that the blamed patch was merged via the net tree
> > this time around to avoid conflicts, and the io_uring tree doesn't
> > have it yet. You can repost it adding netdev@vger.kernel.org and
> > the net maintainers to be merged via the net tree. Otherwise it'll
> > have to wait until 6.18-rc1 is out
>
> If only we had a maintainers entry that makes people automatically
> CC both lists, eh? :\

FWIW that was the intention behind this patch I sent:

https://lore.kernel.org/netdev/20250821025620.552728-1-almasrymina@google.com/

I didn't get any feedback on it; I assumed people are not interested
(enough). Let me know if you want me to press the issue and send a
non-RFC version.

Although that one made sure that the changes are sent to net, only. I
guess I could add the io_uring list to the L entries.


--
Thanks,
Mina

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 14:22   ` Jakub Kicinski
  2025-09-12 18:30     ` Mina Almasry
@ 2025-09-15 15:14     ` Pavel Begunkov
  1 sibling, 0 replies; 9+ messages in thread
From: Pavel Begunkov @ 2025-09-15 15:14 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Feng zhou, axboe, almasrymina, dtatulea, io-uring, linux-kernel,
	yangzhenze, wangdongdong.6

On 9/12/25 15:22, Jakub Kicinski wrote:
> On Fri, 12 Sep 2025 13:40:06 +0100 Pavel Begunkov wrote:
>> On 9/12/25 09:39, Feng zhou wrote:
>>> From: Feng Zhou <zhoufeng.zf@bytedance.com>
>>>
>>> ifq->if_rxq has not been assigned, is -1, the correct value is
>>> in reg.if_rxq.
>>
>> Good catch. Note that the blamed patch was merged via the net tree
>> this time around to avoid conflicts, and the io_uring tree doesn't
>> have it yet. You can repost it adding netdev@vger.kernel.org and
>> the net maintainers to be merged via the net tree. Otherwise it'll
>> have to wait until 6.18-rc1 is out
> 
> If only we had a maintainers entry that makes people automatically
> CC both lists, eh? :\

It's caused by a patch being taken not through the designated tree,
which is fine, but CC wouldn't have prevented from the same
dependency management.

-- 
Pavel Begunkov


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 14:01 Feng zhou
@ 2025-09-15 19:36 ` Jens Axboe
  2025-09-16  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2025-09-15 19:36 UTC (permalink / raw)
  To: Feng zhou, asml.silence, almasrymina, kuba, edumazet, pabeni,
	horms, saeedm, tariqt, mbloch, leon, andrew+netdev, dtatulea
  Cc: netdev, io-uring, linux-kernel, yangzhenze, wangdongdong.6

On 9/12/25 8:01 AM, Feng zhou wrote:
> From: Feng Zhou <zhoufeng.zf@bytedance.com>
> 
> ifq->if_rxq has not been assigned, is -1, the correct value is
> in reg.if_rxq.

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
  2025-09-12 14:01 Feng zhou
  2025-09-15 19:36 ` Jens Axboe
@ 2025-09-16  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-16  1:30 UTC (permalink / raw)
  To: Feng zhou
  Cc: axboe, asml.silence, almasrymina, kuba, edumazet, pabeni, horms,
	saeedm, tariqt, mbloch, leon, andrew+netdev, dtatulea, netdev,
	io-uring, linux-kernel, yangzhenze, wangdongdong.6

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 12 Sep 2025 22:01:33 +0800 you wrote:
> From: Feng Zhou <zhoufeng.zf@bytedance.com>
> 
> ifq->if_rxq has not been assigned, is -1, the correct value is
> in reg.if_rxq.
> 
> Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices")
> Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
> 
> [...]

Here is the summary with links:
  - [net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL
    https://git.kernel.org/netdev/net-next/c/3a0ac202534b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-09-16  1:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12  8:39 [PATCH net-next] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL Feng zhou
2025-09-12 12:40 ` Pavel Begunkov
2025-09-12 13:54   ` [External] " Feng Zhou
2025-09-12 14:22   ` Jakub Kicinski
2025-09-12 18:30     ` Mina Almasry
2025-09-15 15:14     ` Pavel Begunkov
  -- strict thread matches above, loose matches on Subject: below --
2025-09-12 14:01 Feng zhou
2025-09-15 19:36 ` Jens Axboe
2025-09-16  1:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox