diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:55:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-19 21:55:56 -0400 |
commit | d0b952a9837f81cd89e756b1b34293fa6e1cb59d (patch) | |
tree | fbe488bc5f407afa0e91cefb262d9e9ee69062ac /include/net/sock.h | |
parent | d90125bfe958ed0451c6b98f831c86aba08b43d5 (diff) | |
parent | 47552c4e555eefe381f3d45140b59a2ea4b16486 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (109 commits)
[ETHTOOL]: Fix UFO typo
[SCTP]: Fix persistent slowdown in sctp when a gap ack consumes rx buffer.
[SCTP]: Send only 1 window update SACK per message.
[SCTP]: Don't do CRC32C checksum over loopback.
[SCTP] Reset rtt_in_progress for the chunk when processing its sack.
[SCTP]: Reject sctp packets with broadcast addresses.
[SCTP]: Limit association max_retrans setting in setsockopt.
[PFKEYV2]: Fix inconsistent typing in struct sadb_x_kmprivate.
[IPV6]: Sum real space for RTAs.
[IRDA]: Use put_unaligned() in irlmp_do_discovery().
[BRIDGE]: Add support for NETIF_F_HW_CSUM devices
[NET]: Add NETIF_F_GEN_CSUM and NETIF_F_ALL_CSUM
[TG3]: Convert to non-LLTX
[TG3]: Remove unnecessary tx_lock
[TCP]: Add tcp_slow_start_after_idle sysctl.
[BNX2]: Update version and reldate
[BNX2]: Use CPU native page size
[BNX2]: Use compressed firmware
[BNX2]: Add firmware decompression
[BNX2]: Allow WoL settings on new 5708 chips
...
Manual fixup for conflict in drivers/net/tulip/winbond-840.c
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index c9fad6fb629b..96565ff0de6a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -132,6 +132,7 @@ struct sock_common { | |||
132 | * @sk_receive_queue: incoming packets | 132 | * @sk_receive_queue: incoming packets |
133 | * @sk_wmem_alloc: transmit queue bytes committed | 133 | * @sk_wmem_alloc: transmit queue bytes committed |
134 | * @sk_write_queue: Packet sending queue | 134 | * @sk_write_queue: Packet sending queue |
135 | * @sk_async_wait_queue: DMA copied packets | ||
135 | * @sk_omem_alloc: "o" is "option" or "other" | 136 | * @sk_omem_alloc: "o" is "option" or "other" |
136 | * @sk_wmem_queued: persistent queue size | 137 | * @sk_wmem_queued: persistent queue size |
137 | * @sk_forward_alloc: space allocated forward | 138 | * @sk_forward_alloc: space allocated forward |
@@ -205,6 +206,7 @@ struct sock { | |||
205 | atomic_t sk_omem_alloc; | 206 | atomic_t sk_omem_alloc; |
206 | struct sk_buff_head sk_receive_queue; | 207 | struct sk_buff_head sk_receive_queue; |
207 | struct sk_buff_head sk_write_queue; | 208 | struct sk_buff_head sk_write_queue; |
209 | struct sk_buff_head sk_async_wait_queue; | ||
208 | int sk_wmem_queued; | 210 | int sk_wmem_queued; |
209 | int sk_forward_alloc; | 211 | int sk_forward_alloc; |
210 | gfp_t sk_allocation; | 212 | gfp_t sk_allocation; |
@@ -871,10 +873,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock) | |||
871 | if (filter) { | 873 | if (filter) { |
872 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, | 874 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, |
873 | filter->len); | 875 | filter->len); |
874 | if (!pkt_len) | 876 | err = pkt_len ? pskb_trim(skb, pkt_len) : -EPERM; |
875 | err = -EPERM; | ||
876 | else | ||
877 | skb_trim(skb, pkt_len); | ||
878 | } | 877 | } |
879 | 878 | ||
880 | if (needlock) | 879 | if (needlock) |
@@ -1271,11 +1270,22 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) | |||
1271 | * This routine must be called with interrupts disabled or with the socket | 1270 | * This routine must be called with interrupts disabled or with the socket |
1272 | * locked so that the sk_buff queue operation is ok. | 1271 | * locked so that the sk_buff queue operation is ok. |
1273 | */ | 1272 | */ |
1274 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) | 1273 | #ifdef CONFIG_NET_DMA |
1274 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) | ||
1275 | { | ||
1276 | __skb_unlink(skb, &sk->sk_receive_queue); | ||
1277 | if (!copied_early) | ||
1278 | __kfree_skb(skb); | ||
1279 | else | ||
1280 | __skb_queue_tail(&sk->sk_async_wait_queue, skb); | ||
1281 | } | ||
1282 | #else | ||
1283 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) | ||
1275 | { | 1284 | { |
1276 | __skb_unlink(skb, &sk->sk_receive_queue); | 1285 | __skb_unlink(skb, &sk->sk_receive_queue); |
1277 | __kfree_skb(skb); | 1286 | __kfree_skb(skb); |
1278 | } | 1287 | } |
1288 | #endif | ||
1279 | 1289 | ||
1280 | extern void sock_enable_timestamp(struct sock *sk); | 1290 | extern void sock_enable_timestamp(struct sock *sk); |
1281 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); | 1291 | extern int sock_get_timestamp(struct sock *, struct timeval __user *); |