diff options
author | Tomasz Grobelny <tomasz@grobelny.oswiecenia.net> | 2008-09-04 01:30:19 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:45:39 -0400 |
commit | d6da3511d6b558d0b017777b61dc08b8fbc06ea4 (patch) | |
tree | 473f9131b9e641d803bfbea174cf1dfc45aea3ca /net/dccp/dccp.h | |
parent | ddab05568eaa70fc92b2aae957136f188f724e9c (diff) |
dccp: Policy-based packet dequeueing infrastructure
This patch adds a generic infrastructure for policy-based dequeueing of
TX packets and provides two policies:
* a simple FIFO policy (which is the default) and
* a priority based policy (set via socket options).
Both policies honour the tx_qlen sysctl for the maximum size of the write
queue (can be overridden via socket options).
The priority policy uses skb->priority internally to assign an u32 priority
identifier, using the same ranking as SO_PRIORITY. The skb->priority field
is set to 0 when the packet leaves DCCP. The priority is supplied as ancillary
data using cmsg(3), the patch also provides the requisite parsing routines.
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r-- | net/dccp/dccp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 74c90cd27677..ce2dd6f6f34d 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -234,6 +234,18 @@ extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, | |||
234 | extern void dccp_send_sync(struct sock *sk, const u64 seq, | 234 | extern void dccp_send_sync(struct sock *sk, const u64 seq, |
235 | const enum dccp_pkt_type pkt_type); | 235 | const enum dccp_pkt_type pkt_type); |
236 | 236 | ||
237 | /* | ||
238 | * TX Packet Dequeueing Interface | ||
239 | */ | ||
240 | extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); | ||
241 | extern bool dccp_qpolicy_full(struct sock *sk); | ||
242 | extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); | ||
243 | extern struct sk_buff *dccp_qpolicy_top(struct sock *sk); | ||
244 | extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk); | ||
245 | |||
246 | /* | ||
247 | * TX Packet Output and TX Timers | ||
248 | */ | ||
237 | extern void dccp_write_xmit(struct sock *sk); | 249 | extern void dccp_write_xmit(struct sock *sk); |
238 | extern void dccp_write_space(struct sock *sk); | 250 | extern void dccp_write_space(struct sock *sk); |
239 | extern void dccp_flush_write_queue(struct sock *sk, long *time_budget); | 251 | extern void dccp_flush_write_queue(struct sock *sk, long *time_budget); |