Adjusts sruct size and refactor of code.
This commit is contained in:
+34
-38
@@ -7,59 +7,55 @@
|
||||
|
||||
#include <linux/math64.h>
|
||||
|
||||
/* State in which roccet currently opperates */
|
||||
/* State in which roccet currently operates */
|
||||
enum roccet_state {
|
||||
LAUNCH,
|
||||
ORBITER,
|
||||
RTT_PROBE,
|
||||
RTT_PROBE_REFILL,
|
||||
DRAIN
|
||||
};
|
||||
|
||||
/* TCP ROCCET helper type, storing data related to ack counting */
|
||||
struct ack_rate {
|
||||
u32 last_rate; /* Last ACK-rate */
|
||||
u32 last_rate_time; /* Timestamp of the last ACK-rate */
|
||||
u32 curr_rate; /* Current ACK-rate */
|
||||
u32 cnt; /* Used for counting acks */
|
||||
LAUNCH,
|
||||
ORBITER,
|
||||
RTT_PROBE,
|
||||
RTT_PROBE_REFILL,
|
||||
DRAIN
|
||||
};
|
||||
|
||||
/* TCP ROCCET struct based on the original BICTCP struct with
|
||||
* additions specific to the ROCCET-Algorithm.
|
||||
*/
|
||||
struct roccettcp {
|
||||
u32 cnt; /* increase cwnd by 1 after ACKs */
|
||||
u32 cnt; /* increase cwnd by 1 after ACKs */
|
||||
u32 last_max_cwnd; /* last maximum snd_cwnd */
|
||||
u32 last_cwnd; /* the last snd_cwnd */
|
||||
u32 last_time; /* time when updated last_cwnd */
|
||||
u32 last_cwnd; /* the last snd_cwnd */
|
||||
u32 last_time; /* time when updated last_cwnd */
|
||||
u32 bic_origin_point; /* origin point of bic function */
|
||||
u32 bic_K; /* time to origin point from the
|
||||
* beginning of the current epoch
|
||||
*/
|
||||
u32 delay_min; /* min delay (usec) */
|
||||
u32 bic_K; /* time to origin point from the
|
||||
* beginning of the current epoch
|
||||
*/
|
||||
u32 delay_min; /* min delay (usec) */
|
||||
u32 epoch_start; /* beginning of an epoch */
|
||||
u32 ack_cnt; /* number of acks */
|
||||
u32 tcp_cwnd; /* estimated tcp cwnd */
|
||||
u32 curr_rtt; /* last sample rtt of current round */
|
||||
u32 ack_cnt; /* number of acks */
|
||||
u32 tcp_cwnd; /* estimated tcp cwnd */
|
||||
u32 curr_rtt; /* last sample rtt of current round */
|
||||
|
||||
u32 roccet_last_event_time_us; /* The last time ROCCET was
|
||||
* triggered
|
||||
*/
|
||||
bool ece_received; /* Set to true if an ECE bit was received */
|
||||
u32 roccet_last_event_time_us; /* The last time ROCCET was triggered */
|
||||
u32 curr_min_rtt; /* The current observed minRTT */
|
||||
u32 next_min_rtt_probe; /* Next time to probe the minRTT */
|
||||
u32 next_min_rtt_probe; /* Next time to probe the minRTT */
|
||||
u32 probe_min_rtt_until; /* End of minRTT probing period */
|
||||
u32 refill_until; /* End of pipe refill after minRTT probe */
|
||||
u32 refill_until; /* End of pipe refill after minRTT probe */
|
||||
u32 cwnd_before_min_rtt_probe; /* cwnd before min RTT probeing */
|
||||
u32 curr_srrtt; /* srRTT calculated based on the latest ACK */
|
||||
u32 curr_srrtt; /* srRTT calculated based on the latest ACK */
|
||||
u32 next_srrtt_check; /* Next check for srRTT */
|
||||
struct ack_rate ack_rate; /* The last and the current ACK rate */
|
||||
u32 last_rtt; /* sample rtt of previous round.
|
||||
* Used for jitter calculation
|
||||
*/
|
||||
enum roccet_state state; /* State in which roccet currently opperates */
|
||||
u32 interval_snd_seq_start;
|
||||
u32 interval_una_seq_start;
|
||||
u32 last_rtt; /* sample rtt of previous round.
|
||||
* Used for jitter calculation
|
||||
*/
|
||||
|
||||
u32 interval_snd_seq_start;
|
||||
u32 interval_una_seq_start;
|
||||
|
||||
u32 ack_rate_last_rate_time; /* Timestamp of the last ACK-rate */
|
||||
u16 ack_rate_last_rate; /* Last ACK-rate */
|
||||
u16 ack_rate_curr_rate; /* Current ACK-rate */
|
||||
u16 ack_rate_cnt; /* Used for counting acks */
|
||||
|
||||
bool ece_received; /* Set to true if an ECE bit was received */
|
||||
enum roccet_state state; /* State in which roccet currently operates */
|
||||
};
|
||||
|
||||
#endif /* __TCP_ROCCET_H */
|
||||
|
||||
Reference in New Issue
Block a user