diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2010-10-27 15:16:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-28 13:27:00 -0400 |
commit | dc841e30eaea9f9f83c9ab1ee0b3ef9e5c95ce8a (patch) | |
tree | 921458d0ea02f1478dbac9305c1925dbea8c0dd9 /include/linux/dccp.h | |
parent | fe84f4140f0d24deca8591e38926b95cfd097e62 (diff) |
dccp: Extend CCID packet dequeueing interface
This extends the packet dequeuing interface of dccp_write_xmit() to allow
1. CCIDs to take care of timing when the next packet may be sent;
2. delayed sending (as before, with an inter-packet gap up to 65.535 seconds).
The main purpose is to take CCID-2 out of its polling mode (when it is network-
limited, it tries every millisecond to send, without interruption).
The mode of operation for (2) is as follows:
* new packet is enqueued via dccp_sendmsg() => dccp_write_xmit(),
* ccid_hc_tx_send_packet() detects that it may not send (e.g. window full),
* it signals this condition via `CCID_PACKET_WILL_DEQUEUE_LATER',
* dccp_write_xmit() returns without further action;
* after some time the wait-condition for CCID becomes true,
* that CCID schedules the tasklet,
* tasklet function calls ccid_hc_tx_send_packet() via dccp_write_xmit(),
* since the wait-condition is now true, ccid_hc_tx_packet() returns "send now",
* packet is sent, and possibly more (since dccp_write_xmit() loops).
Code reuse: the taskled function calls dccp_write_xmit(), the timer function
reduces to a wrapper around the same code.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r-- | include/linux/dccp.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 7187bd8a75f6..749f01ccd26e 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -462,7 +462,8 @@ struct dccp_ackvec; | |||
462 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking | 462 | * @dccps_hc_rx_insert_options - receiver wants to add options when acking |
463 | * @dccps_hc_tx_insert_options - sender wants to add options when sending | 463 | * @dccps_hc_tx_insert_options - sender wants to add options when sending |
464 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) | 464 | * @dccps_server_timewait - server holds timewait state on close (RFC 4340, 8.3) |
465 | * @dccps_xmit_timer - timer for when CCID is not ready to send | 465 | * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets |
466 | * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) | ||
466 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) | 467 | * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) |
467 | */ | 468 | */ |
468 | struct dccp_sock { | 469 | struct dccp_sock { |
@@ -502,6 +503,7 @@ struct dccp_sock { | |||
502 | __u8 dccps_hc_rx_insert_options:1; | 503 | __u8 dccps_hc_rx_insert_options:1; |
503 | __u8 dccps_hc_tx_insert_options:1; | 504 | __u8 dccps_hc_tx_insert_options:1; |
504 | __u8 dccps_server_timewait:1; | 505 | __u8 dccps_server_timewait:1; |
506 | struct tasklet_struct dccps_xmitlet; | ||
505 | struct timer_list dccps_xmit_timer; | 507 | struct timer_list dccps_xmit_timer; |
506 | }; | 508 | }; |
507 | 509 | ||