diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-11-07 02:30:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:31 -0500 |
commit | 9c55e01c0cc835818475a6ce8c4d684df9949ac8 (patch) | |
tree | 1115311436677f837a4b477e3fd23c5e0ae184ef /include | |
parent | bbdfc2f70610bebb841d0874dc901c648308e43a (diff) |
[TCP]: Splice receive support.
Support for network splice receive.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/net.h | 3 | ||||
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | include/net/tcp.h | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 596131ea46f4..0235d917d5c3 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/socket.h> | 22 | #include <asm/socket.h> |
23 | 23 | ||
24 | struct poll_table_struct; | 24 | struct poll_table_struct; |
25 | struct pipe_inode_info; | ||
25 | struct inode; | 26 | struct inode; |
26 | struct net; | 27 | struct net; |
27 | 28 | ||
@@ -172,6 +173,8 @@ struct proto_ops { | |||
172 | struct vm_area_struct * vma); | 173 | struct vm_area_struct * vma); |
173 | ssize_t (*sendpage) (struct socket *sock, struct page *page, | 174 | ssize_t (*sendpage) (struct socket *sock, struct page *page, |
174 | int offset, size_t size, int flags); | 175 | int offset, size_t size, int flags); |
176 | ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, | ||
177 | struct pipe_inode_info *pipe, size_t len, unsigned int flags); | ||
175 | }; | 178 | }; |
176 | 179 | ||
177 | struct net_proto_family { | 180 | struct net_proto_family { |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index bddd50bd6878..d39f53ef66bb 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -95,6 +95,7 @@ | |||
95 | 95 | ||
96 | struct net_device; | 96 | struct net_device; |
97 | struct scatterlist; | 97 | struct scatterlist; |
98 | struct pipe_inode_info; | ||
98 | 99 | ||
99 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 100 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
100 | struct nf_conntrack { | 101 | struct nf_conntrack { |
@@ -1559,6 +1560,11 @@ extern int skb_store_bits(struct sk_buff *skb, int offset, | |||
1559 | extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, | 1560 | extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, |
1560 | int offset, u8 *to, int len, | 1561 | int offset, u8 *to, int len, |
1561 | __wsum csum); | 1562 | __wsum csum); |
1563 | extern int skb_splice_bits(struct sk_buff *skb, | ||
1564 | unsigned int offset, | ||
1565 | struct pipe_inode_info *pipe, | ||
1566 | unsigned int len, | ||
1567 | unsigned int flags); | ||
1562 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | 1568 | extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
1563 | extern void skb_split(struct sk_buff *skb, | 1569 | extern void skb_split(struct sk_buff *skb, |
1564 | struct sk_buff *skb1, const u32 len); | 1570 | struct sk_buff *skb1, const u32 len); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index cb5b033e0e59..d893b4480769 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -309,6 +309,9 @@ extern int tcp_twsk_unique(struct sock *sk, | |||
309 | 309 | ||
310 | extern void tcp_twsk_destructor(struct sock *sk); | 310 | extern void tcp_twsk_destructor(struct sock *sk); |
311 | 311 | ||
312 | extern ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos, | ||
313 | struct pipe_inode_info *pipe, size_t len, unsigned int flags); | ||
314 | |||
312 | static inline void tcp_dec_quickack_mode(struct sock *sk, | 315 | static inline void tcp_dec_quickack_mode(struct sock *sk, |
313 | const unsigned int pkts) | 316 | const unsigned int pkts) |
314 | { | 317 | { |