diff options
author | Nathan Scott <nathans@sgi.com> | 2006-06-20 14:56:23 +1000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-20 14:56:23 +1000 |
commit | 98174e46974323e4941c72e46345f7277755e146 (patch) | |
tree | c4644c8f38a519cfb3929d1175fc7107eefe48b9 /include/net/netdma.h | |
parent | d8ce75324135ea7100124c1fff4ec5090a350607 (diff) | |
parent | 25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff) | |
download | linux-stable-98174e46974323e4941c72e46345f7277755e146.tar.gz linux-stable-98174e46974323e4941c72e46345f7277755e146.tar.bz2 linux-stable-98174e46974323e4941c72e46345f7277755e146.zip |
Merge HEAD from ../linux-2.6
Diffstat (limited to 'include/net/netdma.h')
-rw-r--r-- | include/net/netdma.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/net/netdma.h b/include/net/netdma.h new file mode 100644 index 000000000000..19760eb131aa --- /dev/null +++ b/include/net/netdma.h @@ -0,0 +1,44 @@ +/* + * Copyright(c) 2004 - 2006 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The full GNU General Public License is included in this distribution in the + * file called COPYING. + */ +#ifndef NETDMA_H +#define NETDMA_H +#include <linux/config.h> +#ifdef CONFIG_NET_DMA +#include <linux/dmaengine.h> +#include <linux/skbuff.h> + +static inline struct dma_chan *get_softnet_dma(void) +{ + struct dma_chan *chan; + rcu_read_lock(); + chan = rcu_dereference(__get_cpu_var(softnet_data.net_dma)); + if (chan) + dma_chan_get(chan); + rcu_read_unlock(); + return chan; +} + +int dma_skb_copy_datagram_iovec(struct dma_chan* chan, + const struct sk_buff *skb, int offset, struct iovec *to, + size_t len, struct dma_pinned_list *pinned_list); + +#endif /* CONFIG_NET_DMA */ +#endif /* NETDMA_H */ |