diff options
| author | Lorenzo Bianconi <lorenzo@kernel.org> | 2026-06-25 11:42:46 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-27 15:44:30 -0700 |
| commit | 32f1c2bbb26ae2be476c8b66e3b41789b6b97bfc (patch) | |
| tree | 32655a6009299d4b1975f7837026a6cca63874bf /rust/zerocopy/git@git.tavy.me:linux-stable.git | |
| parent | d4be5f6f9094c7c7e96b2fef6d030e23ce9211f3 (diff) | |
net: airoha: dma map xmit frags with skb_frag_dma_map()
Map xmit skb fragments using skb_frag_dma_map() instead of
dma_map_single(skb_frag_address()). skb_frag_address() relies on
page_address() to obtain a kernel virtual address, which is not
guaranteed to work for all page types (e.g. highmem pages or
user-pinned pages from MSG_ZEROCOPY).
skb_frag_dma_map() maps the fragment directly via its struct page and
offset through dma_map_page(), avoiding the need for a kernel virtual
address entirely.
Introduce an enum airoha_dma_map_type to track how each queue entry was
mapped (single vs page), so that the matching unmap function is called
on completion and in error paths.
Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260625-airoha-eth-skb_frag_dma_map-v1-1-31d9e460aae6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
