aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ackvec.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 12:31:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 12:31:48 -0500
commit3d1f337b3e7378923c89f37afb573a918ef40be5 (patch)
tree386798378567a10d1c7b24f599cb50f70298694c /net/dccp/ackvec.h
parent2bf2154c6bb5599e3ec3f73c34861a0b12aa839e (diff)
parent5e35941d990123f155b02d5663e51a24f816b6f3 (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: (235 commits) [NETFILTER]: Add H.323 conntrack/NAT helper [TG3]: Don't mark tg3_test_registers() as returning const. [IPV6]: Cleanups for net/ipv6/addrconf.c (kzalloc, early exit) v2 [IPV6]: Nearly complete kzalloc cleanup for net/ipv6 [IPV6]: Cleanup of net/ipv6/reassambly.c [BRIDGE]: Remove duplicate const from is_link_local() argument type. [DECNET]: net/decnet/dn_route.c: fix inconsequent NULL checking [TG3]: make drivers/net/tg3.c:tg3_request_irq() static [BRIDGE]: use LLC to send STP [LLC]: llc_mac_hdr_init const arguments [BRIDGE]: allow show/store of group multicast address [BRIDGE]: use llc for receiving STP packets [BRIDGE]: stp timer to jiffies cleanup [BRIDGE]: forwarding remove unneeded preempt and bh diasables [BRIDGE]: netfilter inline cleanup [BRIDGE]: netfilter VLAN macro cleanup [BRIDGE]: netfilter dont use __constant_htons [BRIDGE]: netfilter whitespace [BRIDGE]: optimize frame pass up [BRIDGE]: use kzalloc ...
Diffstat (limited to 'net/dccp/ackvec.h')
-rw-r--r--net/dccp/ackvec.h53
1 files changed, 40 insertions, 13 deletions
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h
index f7dfb5f67b87..ec7a89bb7b39 100644
--- a/net/dccp/ackvec.h
+++ b/net/dccp/ackvec.h
@@ -13,6 +13,7 @@
13 13
14#include <linux/config.h> 14#include <linux/config.h>
15#include <linux/compiler.h> 15#include <linux/compiler.h>
16#include <linux/list.h>
16#include <linux/time.h> 17#include <linux/time.h>
17#include <linux/types.h> 18#include <linux/types.h>
18 19
@@ -42,39 +43,57 @@
42 * Ack Vectors it has recently sent. For each packet sent carrying an 43 * Ack Vectors it has recently sent. For each packet sent carrying an
43 * Ack Vector, it remembers four variables: 44 * Ack Vector, it remembers four variables:
44 * 45 *
45 * @dccpav_ack_seqno - the Sequence Number used for the packet
46 * (HC-Receiver seqno)
47 * @dccpav_ack_ptr - the value of buf_head at the time of acknowledgement. 46 * @dccpav_ack_ptr - the value of buf_head at the time of acknowledgement.
48 * @dccpav_ack_ackno - the Acknowledgement Number used for the packet 47 * @dccpav_records - list of dccp_ackvec_record
49 * (HC-Sender seqno)
50 * @dccpav_ack_nonce - the one-bit sum of the ECN Nonces for all State 0. 48 * @dccpav_ack_nonce - the one-bit sum of the ECN Nonces for all State 0.
51 * 49 *
52 * @dccpav_buf_len - circular buffer length
53 * @dccpav_time - the time in usecs 50 * @dccpav_time - the time in usecs
54 * @dccpav_buf - circular buffer of acknowledgeable packets 51 * @dccpav_buf - circular buffer of acknowledgeable packets
55 */ 52 */
56struct dccp_ackvec { 53struct dccp_ackvec {
57 u64 dccpav_buf_ackno; 54 u64 dccpav_buf_ackno;
58 u64 dccpav_ack_seqno; 55 struct list_head dccpav_records;
59 u64 dccpav_ack_ackno;
60 struct timeval dccpav_time; 56 struct timeval dccpav_time;
61 u8 dccpav_buf_head; 57 u8 dccpav_buf_head;
62 u8 dccpav_buf_tail; 58 u8 dccpav_buf_tail;
63 u8 dccpav_ack_ptr; 59 u8 dccpav_ack_ptr;
64 u8 dccpav_sent_len; 60 u8 dccpav_sent_len;
65 u8 dccpav_vec_len; 61 u8 dccpav_vec_len;
66 u8 dccpav_buf_len;
67 u8 dccpav_buf_nonce; 62 u8 dccpav_buf_nonce;
68 u8 dccpav_ack_nonce; 63 u8 dccpav_ack_nonce;
69 u8 dccpav_buf[0]; 64 u8 dccpav_buf[DCCP_MAX_ACKVEC_LEN];
65};
66
67/** struct dccp_ackvec_record - ack vector record
68 *
69 * ACK vector record as defined in Appendix A of spec.
70 *
71 * The list is sorted by dccpavr_ack_seqno
72 *
73 * @dccpavr_node - node in dccpav_records
74 * @dccpavr_ack_seqno - sequence number of the packet this record was sent on
75 * @dccpavr_ack_ackno - sequence number being acknowledged
76 * @dccpavr_ack_ptr - pointer into dccpav_buf where this record starts
77 * @dccpavr_ack_nonce - dccpav_ack_nonce at the time this record was sent
78 * @dccpavr_sent_len - lenght of the record in dccpav_buf
79 */
80struct dccp_ackvec_record {
81 struct list_head dccpavr_node;
82 u64 dccpavr_ack_seqno;
83 u64 dccpavr_ack_ackno;
84 u8 dccpavr_ack_ptr;
85 u8 dccpavr_ack_nonce;
86 u8 dccpavr_sent_len;
70}; 87};
71 88
72struct sock; 89struct sock;
73struct sk_buff; 90struct sk_buff;
74 91
75#ifdef CONFIG_IP_DCCP_ACKVEC 92#ifdef CONFIG_IP_DCCP_ACKVEC
76extern struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, 93extern int dccp_ackvec_init(void);
77 const gfp_t priority); 94extern void dccp_ackvec_exit(void);
95
96extern struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority);
78extern void dccp_ackvec_free(struct dccp_ackvec *av); 97extern void dccp_ackvec_free(struct dccp_ackvec *av);
79 98
80extern int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, 99extern int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
@@ -92,8 +111,16 @@ static inline int dccp_ackvec_pending(const struct dccp_ackvec *av)
92 return av->dccpav_sent_len != av->dccpav_vec_len; 111 return av->dccpav_sent_len != av->dccpav_vec_len;
93} 112}
94#else /* CONFIG_IP_DCCP_ACKVEC */ 113#else /* CONFIG_IP_DCCP_ACKVEC */
95static inline struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len, 114static inline int dccp_ackvec_init(void)
96 const gfp_t priority) 115{
116 return 0;
117}
118
119static inline void dccp_ackvec_exit(void)
120{
121}
122
123static inline struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority)
97{ 124{
98 return NULL; 125 return NULL;
99} 126}