summaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:30:19 +0200
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:45:40 +0200
commitd0c05fe4448db5cbdd886186860581f736f59ae9 (patch)
tree883543f6992615a8cf9404a8904d35cdde46ddc3 /net/dccp/ccids/ccid3.h
parentf76fd327a8b32d3ad5b51639faf6f54d18be0981 (diff)
dccp ccid-3: Simplified handling of TX states
Since CCIDs are only used during the established phase of a connection, they have very little internal state; this specifically reduces to: * "no packet sent" if and only if s == 0, for the TX packet size s; * when the first packet has been sent (i.e. `s' > 0), the question is whether or not feedback has been received: - if a feedback packet is received, "feedback = yes" is set, - if the nofeedback timer expires, "feedback = no" is set. Thus the CCID only needs to remember state about whether or not feedback has been received. This is now implemented using a boolean flag, which is toggled when a feedback packet arrives or the nofeedback timer expires. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ccids/ccid3.h')
-rw-r--r--net/dccp/ccids/ccid3.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h
index 7884159937a..1773a8dd36d 100644
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -70,13 +70,6 @@ enum ccid3_options {
TFRC_OPT_RECEIVE_RATE = 194,
};
-/* TFRC sender states */
-enum ccid3_hc_tx_states {
- TFRC_SSTATE_NO_SENT = 1,
- TFRC_SSTATE_NO_FBACK,
- TFRC_SSTATE_FBACK,
-};
-
/** struct ccid3_hc_tx_sock - CCID3 sender half-connection socket
*
* @x - Current sending rate in 64 * bytes per second
@@ -87,7 +80,7 @@ enum ccid3_hc_tx_states {
* @s - Packet size in bytes
* @t_rto - Nofeedback Timer setting in usecs
* @t_ipi - Interpacket (send) interval (RFC 3448, 4.6) in usecs
- * @state - Sender state, one of %ccid3_hc_tx_states
+ * @feedback - Whether feedback has been received or not
* @last_win_count - Last window counter sent
* @t_last_win_count - Timestamp of earliest packet with
* last_win_count value sent
@@ -105,7 +98,7 @@ struct ccid3_hc_tx_sock {
u32 t_rto;
u32 t_ipi;
u16 s;
- enum ccid3_hc_tx_states state:8;
+ bool feedback:1;
u8 last_win_count;
ktime_t t_last_win_count;
struct timer_list no_feedback_timer;