Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abfcd13d authored by Razziell's avatar Razziell
Browse files

Add more tcp_* & update westwood (from BrateloSlava)

parent 3c1e0ed8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ struct westwood {
};

/* TCP Westwood functions and constants */
#define TCP_WESTWOOD_RTT_MIN   (HZ/20)	/* 50ms */
#define TCP_WESTWOOD_INIT_RTT  (20*HZ)	/* maybe too conservative?! */
#define TCP_WESTWOOD_RTT_MIN   50	/* 50ms */
#define TCP_WESTWOOD_INIT_RTT  20000	/* maybe too conservative?! */

/*
 * @tcp_westwood_create
@@ -67,7 +67,7 @@ static void tcp_westwood_init(struct sock *sk)
	w->accounted = 0;
	w->cumul_ack = 0;
	w->reset_rtt_min = 1;
	w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT;
	w->rtt_min = w->rtt = msecs_to_jiffies(TCP_WESTWOOD_INIT_RTT);
	w->rtt_win_sx = tcp_time_stamp;
	w->snd_una = tcp_sk(sk)->snd_una;
	w->first_ack = 1;
@@ -135,7 +135,7 @@ static void westwood_update_window(struct sock *sk)
	 * Obviously on a LAN we reasonably will always have
	 * right_bound = left_bound + WESTWOOD_RTT_MIN
	 */
	if (w->rtt && delta > max_t(u32, w->rtt, TCP_WESTWOOD_RTT_MIN)) {
	if (w->rtt && delta > max_t(u32, w->rtt, msecs_to_jiffies(TCP_WESTWOOD_RTT_MIN))) {
		westwood_filter(w, delta);

		w->bk = 0;