android_kernel_oneplus_msm8998/include/net
Yuchung Cheng 255924ea89 tcp: do not delay ACK in DCTCP upon CE status change
[ Upstream commit a0496ef2c23b3b180902dd185d0d63ccbc624cf8 ]

Per DCTCP RFC8257 (Section 3.2) the ACK reflecting the CE status change
has to be sent immediately so the sender can respond quickly:

""" When receiving packets, the CE codepoint MUST be processed as follows:

   1.  If the CE codepoint is set and DCTCP.CE is false, set DCTCP.CE to
       true and send an immediate ACK.

   2.  If the CE codepoint is not set and DCTCP.CE is true, set DCTCP.CE
       to false and send an immediate ACK.
"""

Previously DCTCP implementation may continue to delay the ACK. This
patch fixes that to implement the RFC by forcing an immediate ACK.

Tested with this packetdrill script provided by Larry Brakmo

0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
0.000 setsockopt(3, SOL_TCP, TCP_CONGESTION, "dctcp", 5) = 0
0.000 bind(3, ..., ...) = 0
0.000 listen(3, 1) = 0

0.100 < [ect0] SEW 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
0.100 > SE. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
0.110 < [ect0] . 1:1(0) ack 1 win 257
0.200 accept(3, ..., ...) = 4
   +0 setsockopt(4, SOL_SOCKET, SO_DEBUG, [1], 4) = 0

0.200 < [ect0] . 1:1001(1000) ack 1 win 257
0.200 > [ect01] . 1:1(0) ack 1001

0.200 write(4, ..., 1) = 1
0.200 > [ect01] P. 1:2(1) ack 1001

0.200 < [ect0] . 1001:2001(1000) ack 2 win 257
+0.005 < [ce] . 2001:3001(1000) ack 2 win 257

+0.000 > [ect01] . 2:2(0) ack 2001
// Previously the ACK below would be delayed by 40ms
+0.000 > [ect01] E. 2:2(0) ack 3001

+0.500 < F. 9501:9501(0) ack 4 win 257

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28 07:45:02 +02:00
..
9p 9p: switch p9_client_read() to passing struct iov_iter * 2015-04-11 22:28:27 -04:00
bluetooth Bluetooth: Fix connection if directed advertising and privacy is used 2018-07-03 11:21:35 +02:00
caif caif: fix a signedness bug in cfpkt_iterate() 2015-02-20 17:35:14 -05:00
irda irda: Convert function pointer arrays and uses to const 2014-12-10 15:33:16 -05:00
iucv s390/iucv: do not use arrays as argument 2015-09-21 16:03:04 -07:00
netfilter netfilter: nf_queue: Make the queue_handler pernet 2018-02-16 20:09:40 +01:00
netns netfilter: nf_queue: Make the queue_handler pernet 2018-02-16 20:09:40 +01:00
nfc NFC: nci: non-static functions can not be inline 2015-10-28 06:44:45 +01:00
phonet
sctp sctp: potential read out of bounds in sctp_ulpevent_type_enabled() 2017-10-21 17:09:01 +02:00
tc_act act_connmark: Remember the struct net instead of guessing it. 2015-09-18 21:59:31 +02:00
6lowpan.h 6lowpan: remove lowpan_is_addr_broadcast 2015-10-21 00:49:25 +02:00
act_api.h net_sched: make tcf_hash_destroy() static 2015-08-26 11:01:44 -07:00
addrconf.h ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf 2017-05-14 13:32:58 +02:00
af_ieee802154.h ieee802154: af_ieee802154: fix typo in comment. 2015-09-17 13:20:05 +02:00
af_rxrpc.h
af_unix.h af_unix: split 'u->readlock' into two: 'iolock' and 'bindlock' 2016-09-30 10:18:36 +02:00
af_vsock.h VSOCK: define VSOCK_SS_LISTEN once only 2015-11-01 12:14:47 -05:00
ah.h ipsec: Remove obsolete MAX_AH_AUTH_LEN 2014-09-18 10:54:36 +02:00
arp.h ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY 2018-01-31 12:06:14 +01:00
atmclip.h
ax25.h ax25: Stop using sock->sk_protinfo. 2015-06-28 16:55:44 -07:00
ax88796.h
bond_3ad.h bonding: simplify / unify event handling code for 3ad mode. 2015-11-02 22:52:24 -05:00
bond_alb.h net: Move bonding headers under include/net 2014-11-10 13:27:49 -05:00
bond_options.h bonding: convert num_grat_arp to the new bonding option API 2015-07-27 01:05:24 -07:00
bonding.h bonding: fix bond_get_stats() 2016-04-20 15:42:04 +09:00
busy_poll.h sched, net: Fixup busy_loop_us_clock() 2014-01-13 17:39:11 +01:00
cfg80211-wext.h
cfg80211.h cfg80211: make RATE_INFO_BW_20 the default 2018-04-13 19:50:00 +02:00
cfg802154.h nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
checksum.h net: Add inet_proto_csum_replace_by_diff utility function 2015-08-17 21:33:06 -07:00
cipso_ipv4.h netlabel: out of bound access in cipso_v4_validate() 2017-02-18 16:39:26 +01:00
cls_cgroup.h cls_cgroup: factor out classid retrieval 2015-07-20 12:41:30 -07:00
codel.h net_sched: update hierarchical backlog too 2016-05-18 17:06:39 -07:00
compat.h net: switch importing msghdr from userland to {compat_,}import_iovec() 2015-04-09 00:02:26 -04:00
datalink.h net: Move prototype declaration to header file include/net/datalink.h from net/ipx/af_ipx.c 2014-02-09 17:32:50 -08:00
dcbevent.h
dcbnl.h net/dcb: Add IEEE QCN attribute 2015-03-06 21:50:02 -05:00
dn.h net: Move prototype declaration to header file include/net/dn.h from net/decnet/af_decnet.c 2014-02-09 17:32:49 -08:00
dn_dev.h
dn_fib.h
dn_neigh.h netfilter: Pass net into okfn 2015-09-17 17:18:37 -07:00
dn_nsp.h
dn_route.h net: Move prototype declaration to appropriate header file from decnet/af_decnet.c 2014-02-09 17:32:49 -08:00
dsa.h net: dsa: use switchdev obj for VLAN add/del ops 2015-11-01 15:56:11 -05:00
dsfield.h
dst.h ipv4: add reference counting to metrics 2017-06-07 12:05:59 +02:00
dst_cache.h net: add dst_cache support 2018-02-25 11:03:34 +01:00
dst_metadata.h gro: Make GRO aware of lightweight tunnels. 2016-03-03 15:07:04 -08:00
dst_ops.h ipv4, ipv6: Pass net into __ip_local_out and __ip6_local_out 2015-10-08 04:27:02 -07:00
esp.h
ethoc.h net/ethoc: support big-endian register layout 2015-09-23 15:33:15 -07:00
fib_rules.h net: ipv6: use common fib_default_rule_pref 2015-09-09 14:19:50 -07:00
firewire.h
flow.h net: Rename FLOWI_FLAG_VRFSRC to FLOWI_FLAG_L3MDEV_SRC 2015-10-07 04:27:42 -07:00
flow_dissector.h flow_dissector: Don't use bit fields. 2015-09-01 16:46:08 -07:00
flowcache.h flowcache: Make flow cache name space aware 2014-02-12 07:02:11 +01:00
fou.h ip_tunnel: Ops registration for secondary encap (fou, gue) 2014-11-12 15:01:35 -05:00
garp.h
gen_stats.h net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
genetlink.h netlink: add a start callback for starting a netlink dump 2017-12-05 11:22:49 +01:00
geneve.h geneve: Consolidate Geneve functionality in single module. 2015-08-27 15:42:48 -07:00
gre.h gre: Remove support for sharing GRE protocol hook. 2015-08-10 14:03:54 -07:00
gro_cells.h gro_cells: remove spinlock protecting receive queues 2015-08-31 15:17:17 -07:00
gue.h gue: Protocol constants for remote checksum offload 2014-11-05 16:30:03 -05:00
icmp.h
ieee80211_radiotap.h mac80211: propagate STBC / LDPC flags to radiotap 2014-02-06 09:34:58 +01:00
ieee802154_netdev.h nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
if_inet6.h ipv6: do retries on stable privacy addresses 2015-03-23 22:12:09 -04:00
inet6_connection_sock.h ipv6: remove obsolete inet6 functions 2015-10-03 04:32:42 -07:00
inet6_hashtables.h ipv6: get rid of __inet6_hash() 2015-03-18 22:00:35 -04:00
inet_common.h net: avoid NULL deref in inet_ctl_sock_destroy() 2015-11-02 22:46:09 -05:00
inet_connection_sock.h tcp/dccp: fix another race at listener dismantle 2016-03-03 15:07:07 -08:00
inet_ecn.h ipv6: update skb->csum when CE mark is propagated 2016-01-31 11:29:01 -08:00
inet_frag.h Revert "net: fix percpu memory leaks" 2017-09-27 11:00:11 +02:00
inet_hashtables.h tcp/dccp: fix hashdance race for passive sessions 2015-10-23 05:42:21 -07:00
inet_sock.h tcp/dccp: fix other lockdep splats accessing ireq_opt 2017-11-18 11:11:07 +01:00
inet_timewait_sock.h soreuseport: initialise timewait reuseport field 2018-05-16 10:06:50 +02:00
inetpeer.h inet: tcp: fix inetpeer_set_addr_v4() 2015-12-16 00:14:12 -05:00
ip.h ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu 2018-05-30 07:49:04 +02:00
ip6_checksum.h net: add gro_compute_pseudo functions 2014-08-24 18:09:23 -07:00
ip6_fib.h ipv6: fix sparse warning on rt6i_node 2017-09-27 11:00:10 +02:00
ip6_route.h net: ipv6: Compare lwstate in detecting duplicate nexthops 2017-07-21 07:44:55 +02:00
ip6_tunnel.h net: replace dst_cache ip6_tunnel implementation with the generic one 2018-02-25 11:03:34 +01:00
ip_fib.h ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu 2018-05-30 07:49:04 +02:00
ip_tunnels.h ip_tunnel: replace dst_cache with generic implementation 2018-02-28 10:17:21 +01:00
ip_vs.h ipvs: drop first packet to redirect conntrack 2016-05-11 11:21:09 +02:00
ipcomp.h
ipconfig.h
ipv6.h ipv6: fix useless rol32 call on hash 2018-07-25 10:18:16 +02:00
ipx.h switch ipxrtr_route_packet() from iovec to msghdr 2014-11-24 04:28:49 -05:00
iw_handler.h wext: handle NULL extra data in iwe_stream_add_point better 2017-08-11 09:08:56 -07:00
l3mdev.h net: Propagate lookup failure in l3mdev_get_saddr to caller 2016-01-04 22:58:30 -05:00
lapb.h
lib80211.h lib80211: remove unused print_ssid() 2014-10-14 02:18:27 +02:00
llc.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h llc: Make llc_conn_ev_qfyr_t function pointer arrays const 2014-12-10 15:21:24 -05:00
llc_conn.h llc: properly handle dev_queue_xmit() return value 2018-05-30 07:49:06 +02:00
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h llc: Make llc_sap_action_t function pointer arrays const 2014-12-10 15:21:24 -05:00
llc_sap.h
lwtunnel.h dst: Pass net into dst->output 2015-10-08 04:27:03 -07:00
mac80211.h mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4 2018-05-30 07:48:59 +02:00
mac802154.h 6lowpan: cleanup lowpan_header_decompress 2015-10-21 00:49:24 +02:00
mip6.h
mld.h ipv6: mld: answer mldv2 queries with mldv1 reports in mldv1 fallback 2014-09-22 16:23:15 -04:00
mpls.h openvswitch: Add basic MPLS support to kernel 2014-11-05 23:52:33 -08:00
mpls_iptunnel.h mpls: multipath route support 2015-10-23 06:26:42 -07:00
mrp.h
ndisc.h Revert "ipv6: ndisc: inherit metadata dst when creating ndisc requests" 2015-12-01 15:07:59 -05:00
neighbour.h net: add explicit logging and stat for neighbour table overflow 2015-08-10 13:46:21 -07:00
net_namespace.h net: tcp: close sock if net namespace is exiting 2018-01-31 12:06:14 +01:00
net_ratelimit.h
netevent.h
netlabel.h netlabel: fix the netlbl_catmap_setlong() dummy function 2014-08-07 20:55:21 -04:00
netlink.h netlink: fix nla_put_{u8,u16,u32} for KASAN 2018-02-25 11:03:51 +01:00
netprio_cgroup.h cgroup: clean up cgroup_subsys names and initialization 2014-02-08 10:36:58 -05:00
netrom.h
nexthop.h net: fix rtnh_ok() 2018-05-16 10:06:50 +02:00
nl802154.h nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
p8022.h
ping.h net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
pkt_cls.h net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
pkt_sched.h net: sched: consolidate tc_classify{,_compat} 2015-08-27 14:18:48 -07:00
protocol.h net: Eliminate no_check from protosw 2014-05-23 16:28:53 -04:00
psnap.h
raw.h
rawv6.h
red.h net_sched: red: Avoid illegal values 2018-02-25 11:03:40 +01:00
regulatory.h regulatory: add NUL to request alpha2 2018-05-30 07:49:00 +02:00
request_sock.h tcp/dccp: fix race at listener dismantle phase 2015-10-16 00:52:19 -07:00
rose.h
route.h ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu 2018-05-30 07:49:04 +02:00
rtnetlink.h netlink: Rightsize IFLA_AF_SPEC size calculation 2015-10-21 19:15:20 -07:00
sch_generic.h net_sched: fix order of queue length updates in qdisc_replace() 2017-08-30 10:19:21 +02:00
scm.h unix: correctly track in-flight fds in sending process user_struct 2016-03-03 15:07:05 -08:00
secure_seq.h inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
slhc_vj.h slip: Check if rstate is initialized before uncompressing 2018-04-24 09:32:04 +02:00
snmp.h Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
sock.h net: avoid sk_forward_alloc overflows 2016-11-15 07:46:36 +01:00
Space.h
stp.h
switchdev.h switchdev: pass pointer to fib_info instead of copy 2016-06-24 10:18:16 -07:00
tcp.h tcp: do not delay ACK in DCTCP upon CE status change 2018-07-28 07:45:02 +02:00
tcp_memcontrol.h
tcp_states.h inet: add TCP_NEW_SYN_RECV state 2015-03-12 22:58:12 -04:00
timewait_sock.h inet: remove BUG_ON() in twsk_destructor() 2015-07-09 15:12:20 -07:00
transp_v6.h ipv6: make IPV6_RECVPKTINFO work for ipv4 datagrams 2014-01-19 19:53:18 -08:00
tso.h net: tso: add support for IPv6 2015-10-26 22:24:22 -07:00
udp.h net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
udp_tunnel.h vxlan: do not receive IPv4 packets on IPv6 socket 2015-08-29 13:07:54 -07:00
udplite.h udplite: fix partial checksum initialization 2018-03-11 16:19:46 +01:00
vsock_addr.h
vxlan.h vxlan: fix incorrect RCO bit in VXLAN header 2015-12-05 18:15:29 -05:00
wext.h
wimax.h net: treewide: Fix typo found in DocBook/networking.xml 2014-09-05 17:35:28 -07:00
x25.h net: x25: fix one potential use-after-free issue 2018-04-13 19:50:07 +02:00
x25device.h
xfrm.h xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY 2017-07-05 14:37:21 +02:00