: net: Add SKB DMA mapping helper functions.
Subsystems (2)
David Miller
maintainerPATCH 2/3 : net: Add SKB DMA mapping helper functions.
net: Add SKB DMA mapping helper functions.
Signed-off-by David S. Miller <[email protected]>
--- include/linux/skbuff.h | 8 ++++++ net/core/Makefile | 1 + net/core/skb_dma_map.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 0 deletions(-) create mode 100644 net/core/skb_dma_map.c
include/linux/skbuff.h +8 -0
@@ -359,6 +359,14 @@ struct sk_buff {#include <asm/system.h> +#ifdef CONFIG_HAS_DMA +#include <linux/dma-mapping.h> +extern int skb_dma_map (struct device *dev,struct sk_buff *skb, +enum dma_data_direction dir); +extern void skb_dma_unmap (struct device *dev,struct sk_buff *skb, +enum dma_data_direction dir); +#endif +extern void kfree_skb (struct sk_buff *skb);extern void __kfree_skb (struct sk_buff *skb); extern struct sk_buff *__alloc_skb(unsigned int size,
net/core/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-y := sock.o request_sock.o skbuff.o iovec.o datagram.o stream.o scm.o \ gen_stats.o gen_estimator.o net_namespace.o obj-$(CONFIG_SYSCTL) += sysctl_net_core.o +obj-$(CONFIG_HAS_DMA) += skb_dma_map.o obj-y += dev.o ethtool.o dev_mcast.o dst.o netevent.o \ neighbour.o rtnetlink.o utils.o link_watch.o filter.o
net/core/skb_dma_map.c new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
1.5.6.5.GIT