Re: [PATCH net-next v25 08/13] net: add support for skbs with unreadable frags

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-09-10 01:57:51
Also in
bpf, dri-devel, linux-alpha, linux-arch, linux-doc, linux-kselftest, linux-media, linux-mips, lkml, netdev, sparclinux
Reply to
Mina Almasry, 2024-09-09
On Mon,  9 Sep 2024 05:43:13 +0000 Mina Almasry wrote:
For device memory TCP, we expect the skb headers to be available in host
memory for access, and we expect the skb frags to be in device memory
and unaccessible to the host. We expect there to be no mixing and
matching of device memory frags (unaccessible) with host memory frags
(accessible) in the same skb.

Add a skb->devmem flag which indicates whether the frags in this skb
are device memory frags or not.

__skb_fill_netmem_desc() now checks frags added to skbs for net_iov,
and marks the skb as skb->devmem accordingly.

Add checks through the network stack to avoid accessing the frags of
devmem skbs and avoid coalescing devmem skbs with non devmem skbs.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Kaiyuan Zhang <redacted>
Signed-off-by: Mina Almasry <redacted>
Reviewed-by: Eric Dumazet <redacted>
I'm sure we'll find more cases which need a check but I can't think 
of any now, so:

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Thread (28 messages) 28 messages, 5 authors, last reply 2024-10-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help