[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izNHRmcuw=Ya4UC_QdtyJ_z_vYiHEWKRk1f6gQ5hdwXODw@mail.gmail.com>
Date: Thu, 11 Sep 2025 11:21:24 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org, sdf@...ichev.me,
alexanderduyck@...com
Subject: Re: [PATCH net-next] eth: fbnic: support devmem Tx
On Thu, Sep 11, 2025 at 7:43 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Support devmem Tx. We already use skb_frag_dma_map(), we just need
> to make sure we don't try to unmap the frags. Check if frag is
> unreadable and mark the ring entry.
>
> # ./tools/testing/selftests/drivers/net/hw/devmem.py
> TAP version 13
> 1..3
> ok 1 devmem.check_rx
> ok 2 devmem.check_tx
> ok 3 devmem.check_tx_chunks
> # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
For most of the netmem stuff we've tried as much as possible to keep
the complexity and type casts out of the driver and in core. I was
hoping the driver can avoid mem-type checking and special handling. In
the case of the tx path, the helpers provided are
netmem_dma_unmap_addr_set & netmem_dma_unmap_page_attrs. If you can
use them, great, or if you can improve them so that we don't have to
have per-driver special handling I think that would be good too.
It seems in your driver you have a special way to grab fields via
FIELD_GET and that's why you can't use the common helpers.
But this approach is fine too assuming you're ok with a bit extra
complexity and mem-type checks in the driver, so
Acked-by: Mina Almasry <almasrymina@...gle.com>
--
Thanks,
Mina
Powered by blists - more mailing lists