]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netmem: replace __netmem_clear_lsb() with netmem_to_nmdesc()
authorByungchul Park <byungchul@sk.com>
Mon, 13 Oct 2025 04:41:33 +0000 (13:41 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Oct 2025 11:37:26 +0000 (13:37 +0200)
commit53615ad26e9789bfcdf3a4dccbcecb15294ea024
tree08b6dcb5f8ac4a22699e65c372f183c82e0248e5
parent3dacc900c00bad7275ee8c096dbcaab699d83e36
netmem: replace __netmem_clear_lsb() with netmem_to_nmdesc()

Now that we have struct netmem_desc, it'd better access the pp fields
via struct netmem_desc rather than struct net_iov.

Introduce netmem_to_nmdesc() for safely converting netmem_ref to
netmem_desc regardless of the type underneath e.i. netmem_desc, net_iov.

While at it, remove __netmem_clear_lsb() and make netmem_to_nmdesc()
used instead.

Suggested-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Byungchul Park <byungchul@sk.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20251013044133.69472-1-byungchul@sk.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/netmem.h
net/core/netmem_priv.h