equal
deleted
inserted
replaced
22 #define NETDMA_H |
22 #define NETDMA_H |
23 #ifdef CONFIG_NET_DMA |
23 #ifdef CONFIG_NET_DMA |
24 #include <linux/dmaengine.h> |
24 #include <linux/dmaengine.h> |
25 #include <linux/skbuff.h> |
25 #include <linux/skbuff.h> |
26 |
26 |
27 static inline struct dma_chan *get_softnet_dma(void) |
|
28 { |
|
29 struct dma_chan *chan; |
|
30 rcu_read_lock(); |
|
31 chan = rcu_dereference(__get_cpu_var(softnet_data).net_dma); |
|
32 if (chan) |
|
33 dma_chan_get(chan); |
|
34 rcu_read_unlock(); |
|
35 return chan; |
|
36 } |
|
37 |
|
38 int dma_skb_copy_datagram_iovec(struct dma_chan* chan, |
27 int dma_skb_copy_datagram_iovec(struct dma_chan* chan, |
39 struct sk_buff *skb, int offset, struct iovec *to, |
28 struct sk_buff *skb, int offset, struct iovec *to, |
40 size_t len, struct dma_pinned_list *pinned_list); |
29 size_t len, struct dma_pinned_list *pinned_list); |
41 |
30 |
42 #endif /* CONFIG_NET_DMA */ |
31 #endif /* CONFIG_NET_DMA */ |