Skip to content

Commit

Permalink
Merge branch 'tcp_nv'
Browse files Browse the repository at this point in the history
Lawrence Brakmo says:

====================
tcp: add NV congestion control

Removed most of the module parameters

Tested in a rack using between 1 and 380 active TCP-NV flows.

Consists of the following patches:
[PATCH net-next v2 1/2] tcp: add in_flight to tcp_skb_cb
[PATCH net-next v2 2/2] tcp: add NV congestion control
====================

Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
  • Loading branch information
David S. Miller committed Jun 11, 2016
2 parents 3e7fb80 + 699fafa commit f6664f1
Show file tree
Hide file tree
Showing 6 changed files with 502 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ struct tcp_skb_cb {
union {
struct {
/* There is space for up to 20 bytes */
__u32 in_flight;/* Bytes in flight when packet sent */
} tx; /* only used for outgoing skbs */
union {
struct inet_skb_parm h4;
Expand Down Expand Up @@ -859,6 +860,7 @@ union tcp_cc_info;
struct ack_sample {
u32 pkts_acked;
s32 rtt_us;
u32 in_flight;
};

struct tcp_congestion_ops {
Expand Down
16 changes: 16 additions & 0 deletions net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,22 @@ config TCP_CONG_VEGAS
window. TCP Vegas should provide less packet loss, but it is
not as aggressive as TCP Reno.

config TCP_CONG_NV
tristate "TCP NV"
default n
---help---
TCP NV is a follow up to TCP Vegas. It has been modified to deal with
10G networks, measurement noise introduced by LRO, GRO and interrupt
coalescence. In addition, it will decrease its cwnd multiplicatively
instead of linearly.

Note that in general congestion avoidance (cwnd decreased when # packets
queued grows) cannot coexist with congestion control (cwnd decreased only
when there is packet loss) due to fairness issues. One scenario when they
can coexist safely is when the CA flows have RTTs << CC flows RTTs.

For further details see http://www.brakmo.org/networking/tcp-nv/

config TCP_CONG_SCALABLE
tristate "Scalable TCP"
default n
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ obj-$(CONFIG_TCP_CONG_HSTCP) += tcp_highspeed.o
obj-$(CONFIG_TCP_CONG_HYBLA) += tcp_hybla.o
obj-$(CONFIG_TCP_CONG_HTCP) += tcp_htcp.o
obj-$(CONFIG_TCP_CONG_VEGAS) += tcp_vegas.o
obj-$(CONFIG_TCP_CONG_NV) += tcp_nv.o
obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o
obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
Expand Down
5 changes: 4 additions & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -3115,6 +3115,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
long ca_rtt_us = -1L;
struct sk_buff *skb;
u32 pkts_acked = 0;
u32 last_in_flight = 0;
bool rtt_update;
int flag = 0;

Expand Down Expand Up @@ -3154,6 +3155,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
if (!first_ackt.v64)
first_ackt = last_ackt;

last_in_flight = TCP_SKB_CB(skb)->tx.in_flight;
reord = min(pkts_acked, reord);
if (!after(scb->end_seq, tp->high_seq))
flag |= FLAG_ORIG_SACK_ACKED;
Expand Down Expand Up @@ -3250,7 +3252,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,

if (icsk->icsk_ca_ops->pkts_acked) {
struct ack_sample sample = { .pkts_acked = pkts_acked,
.rtt_us = ca_rtt_us };
.rtt_us = ca_rtt_us,
.in_flight = last_in_flight };

icsk->icsk_ca_ops->pkts_acked(sk, &sample);
}
Expand Down
Loading

0 comments on commit f6664f1

Please sign in to comment.