aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/page_pool.c
diff options
context:
space:
mode:
authorAlexander Lobakin <[email protected]>2024-12-11 17:26:47 +0000
committerJakub Kicinski <[email protected]>2024-12-13 02:23:08 +0000
commit0dffdb3b3366c932fb7d210f5032476c552f7000 (patch)
tree79b88b54d57625f545f2cdd3351e553d5aa4478a /net/core/page_pool.c
parentxdp: make __xdp_return() MP-agnostic (diff)
downloadkernel-0dffdb3b3366c932fb7d210f5032476c552f7000.tar.gz
kernel-0dffdb3b3366c932fb7d210f5032476c552f7000.zip
skbuff: allow 2-4-argument skb_frag_dma_map()
skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), DMA_TO_DEVICE) is repeated across dozens of drivers and really wants a shorthand. Add a macro which will count args and handle all possible number from 2 to 5. Semantics: skb_frag_dma_map(dev, frag) -> __skb_frag_dma_map(dev, frag, 0, skb_frag_size(frag), DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset) -> __skb_frag_dma_map(dev, frag, offset, skb_frag_size(frag) - offset, DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset, size) -> __skb_frag_dma_map(dev, frag, offset, size, DMA_TO_DEVICE) skb_frag_dma_map(dev, frag, offset, size, dir) -> __skb_frag_dma_map(dev, frag, offset, size, dir) No object code size changes for the existing callers. Users passing less arguments also won't have bigger size comparing to the full equivalent call. Signed-off-by: Alexander Lobakin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
0 files changed, 0 insertions, 0 deletions