aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/irda/irda_device.h2
-rw-r--r--include/net/sctp/structs.h20
-rw-r--r--include/net/sock.h18
-rw-r--r--include/net/tcp.h5
4 files changed, 22 insertions, 23 deletions
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 71d6af83b6..92c828029c 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -224,7 +224,7 @@ int irda_device_is_receiving(struct net_device *dev);
224/* Interface for internal use */ 224/* Interface for internal use */
225static inline int irda_device_txqueue_empty(const struct net_device *dev) 225static inline int irda_device_txqueue_empty(const struct net_device *dev)
226{ 226{
227 return (skb_queue_len(&dev->qdisc->q) == 0); 227 return skb_queue_empty(&dev->qdisc->q);
228} 228}
229int irda_device_set_raw_mode(struct net_device* self, int status); 229int irda_device_set_raw_mode(struct net_device* self, int status);
230struct net_device *alloc_irdadev(int sizeof_priv); 230struct net_device *alloc_irdadev(int sizeof_priv);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 47727c7cc6..7435528a17 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -582,7 +582,6 @@ void sctp_datamsg_track(struct sctp_chunk *);
582void sctp_chunk_fail(struct sctp_chunk *, int error); 582void sctp_chunk_fail(struct sctp_chunk *, int error);
583int sctp_chunk_abandoned(struct sctp_chunk *); 583int sctp_chunk_abandoned(struct sctp_chunk *);
584 584
585
586/* RFC2960 1.4 Key Terms 585/* RFC2960 1.4 Key Terms
587 * 586 *
588 * o Chunk: A unit of information within an SCTP packet, consisting of 587 * o Chunk: A unit of information within an SCTP packet, consisting of
@@ -592,13 +591,8 @@ int sctp_chunk_abandoned(struct sctp_chunk *);
592 * each chunk as well as a few other header pointers... 591 * each chunk as well as a few other header pointers...
593 */ 592 */
594struct sctp_chunk { 593struct sctp_chunk {
595 /* These first three elements MUST PRECISELY match the first 594 struct list_head list;
596 * three elements of struct sk_buff. This allows us to reuse 595
597 * all the skb_* queue management functions.
598 */
599 struct sctp_chunk *next;
600 struct sctp_chunk *prev;
601 struct sk_buff_head *list;
602 atomic_t refcnt; 596 atomic_t refcnt;
603 597
604 /* This is our link to the per-transport transmitted list. */ 598 /* This is our link to the per-transport transmitted list. */
@@ -717,7 +711,7 @@ struct sctp_packet {
717 __u32 vtag; 711 __u32 vtag;
718 712
719 /* This contains the payload chunks. */ 713 /* This contains the payload chunks. */
720 struct sk_buff_head chunks; 714 struct list_head chunk_list;
721 715
722 /* This is the overhead of the sctp and ip headers. */ 716 /* This is the overhead of the sctp and ip headers. */
723 size_t overhead; 717 size_t overhead;
@@ -974,7 +968,7 @@ struct sctp_inq {
974 /* This is actually a queue of sctp_chunk each 968 /* This is actually a queue of sctp_chunk each
975 * containing a partially decoded packet. 969 * containing a partially decoded packet.
976 */ 970 */
977 struct sk_buff_head in; 971 struct list_head in_chunk_list;
978 /* This is the packet which is currently off the in queue and is 972 /* This is the packet which is currently off the in queue and is
979 * being worked on through the inbound chunk processing. 973 * being worked on through the inbound chunk processing.
980 */ 974 */
@@ -1017,7 +1011,7 @@ struct sctp_outq {
1017 struct sctp_association *asoc; 1011 struct sctp_association *asoc;
1018 1012
1019 /* Data pending that has never been transmitted. */ 1013 /* Data pending that has never been transmitted. */
1020 struct sk_buff_head out; 1014 struct list_head out_chunk_list;
1021 1015
1022 unsigned out_qlen; /* Total length of queued data chunks. */ 1016 unsigned out_qlen; /* Total length of queued data chunks. */
1023 1017
@@ -1025,7 +1019,7 @@ struct sctp_outq {
1025 unsigned error; 1019 unsigned error;
1026 1020
1027 /* These are control chunks we want to send. */ 1021 /* These are control chunks we want to send. */
1028 struct sk_buff_head control; 1022 struct list_head control_chunk_list;
1029 1023
1030 /* These are chunks that have been sacked but are above the 1024 /* These are chunks that have been sacked but are above the
1031 * CTSN, or cumulative tsn ack point. 1025 * CTSN, or cumulative tsn ack point.
@@ -1672,7 +1666,7 @@ struct sctp_association {
1672 * which already resides in sctp_outq. Please move this 1666 * which already resides in sctp_outq. Please move this
1673 * queue and its supporting logic down there. --piggy] 1667 * queue and its supporting logic down there. --piggy]
1674 */ 1668 */
1675 struct sk_buff_head addip_chunks; 1669 struct list_head addip_chunk_list;
1676 1670
1677 /* ADDIP Section 4.1 ASCONF Chunk Procedures 1671 /* ADDIP Section 4.1 ASCONF Chunk Procedures
1678 * 1672 *
diff --git a/include/net/sock.h b/include/net/sock.h
index 7b76f891ae..a1042d08be 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -684,16 +684,17 @@ extern void FASTCALL(release_sock(struct sock *sk));
684#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) 684#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock))
685#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) 685#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock))
686 686
687extern struct sock *sk_alloc(int family, int priority, 687extern struct sock *sk_alloc(int family,
688 unsigned int __nocast priority,
688 struct proto *prot, int zero_it); 689 struct proto *prot, int zero_it);
689extern void sk_free(struct sock *sk); 690extern void sk_free(struct sock *sk);
690 691
691extern struct sk_buff *sock_wmalloc(struct sock *sk, 692extern struct sk_buff *sock_wmalloc(struct sock *sk,
692 unsigned long size, int force, 693 unsigned long size, int force,
693 int priority); 694 unsigned int __nocast priority);
694extern struct sk_buff *sock_rmalloc(struct sock *sk, 695extern struct sk_buff *sock_rmalloc(struct sock *sk,
695 unsigned long size, int force, 696 unsigned long size, int force,
696 int priority); 697 unsigned int __nocast priority);
697extern void sock_wfree(struct sk_buff *skb); 698extern void sock_wfree(struct sk_buff *skb);
698extern void sock_rfree(struct sk_buff *skb); 699extern void sock_rfree(struct sk_buff *skb);
699 700
@@ -708,7 +709,8 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk,
708 unsigned long size, 709 unsigned long size,
709 int noblock, 710 int noblock,
710 int *errcode); 711 int *errcode);
711extern void *sock_kmalloc(struct sock *sk, int size, int priority); 712extern void *sock_kmalloc(struct sock *sk, int size,
713 unsigned int __nocast priority);
712extern void sock_kfree_s(struct sock *sk, void *mem, int size); 714extern void sock_kfree_s(struct sock *sk, void *mem, int size);
713extern void sk_send_sigurg(struct sock *sk); 715extern void sk_send_sigurg(struct sock *sk);
714 716
@@ -1132,7 +1134,8 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
1132} 1134}
1133 1135
1134static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, 1136static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
1135 int size, int mem, int gfp) 1137 int size, int mem,
1138 unsigned int __nocast gfp)
1136{ 1139{
1137 struct sk_buff *skb; 1140 struct sk_buff *skb;
1138 int hdr_len; 1141 int hdr_len;
@@ -1155,7 +1158,8 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
1155} 1158}
1156 1159
1157static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, 1160static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
1158 int size, int gfp) 1161 int size,
1162 unsigned int __nocast gfp)
1159{ 1163{
1160 return sk_stream_alloc_pskb(sk, size, 0, gfp); 1164 return sk_stream_alloc_pskb(sk, size, 0, gfp);
1161} 1165}
@@ -1188,7 +1192,7 @@ static inline int sock_writeable(const struct sock *sk)
1188 return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); 1192 return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2);
1189} 1193}
1190 1194
1191static inline int gfp_any(void) 1195static inline unsigned int __nocast gfp_any(void)
1192{ 1196{
1193 return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; 1197 return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
1194} 1198}
diff --git a/include/net/tcp.h b/include/net/tcp.h
index a166918ca5..f4f9aba07a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -860,7 +860,8 @@ extern void tcp_send_probe0(struct sock *);
860extern void tcp_send_partial(struct sock *); 860extern void tcp_send_partial(struct sock *);
861extern int tcp_write_wakeup(struct sock *); 861extern int tcp_write_wakeup(struct sock *);
862extern void tcp_send_fin(struct sock *sk); 862extern void tcp_send_fin(struct sock *sk);
863extern void tcp_send_active_reset(struct sock *sk, int priority); 863extern void tcp_send_active_reset(struct sock *sk,
864 unsigned int __nocast priority);
864extern int tcp_send_synack(struct sock *); 865extern int tcp_send_synack(struct sock *);
865extern void tcp_push_one(struct sock *, unsigned int mss_now); 866extern void tcp_push_one(struct sock *, unsigned int mss_now);
866extern void tcp_send_ack(struct sock *sk); 867extern void tcp_send_ack(struct sock *sk);
@@ -991,7 +992,7 @@ static __inline__ void tcp_fast_path_on(struct tcp_sock *tp)
991 992
992static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp) 993static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp)
993{ 994{
994 if (skb_queue_len(&tp->out_of_order_queue) == 0 && 995 if (skb_queue_empty(&tp->out_of_order_queue) &&
995 tp->rcv_wnd && 996 tp->rcv_wnd &&
996 atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf && 997 atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf &&
997 !tp->urg_data) 998 !tp->urg_data)