Skip to content
Snippets Groups Projects
Select Git revision
  • 082ac2d51d9f19ec1c29bdaaaf7fb49889e4fade
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

tcp_output.c

  • Martin KaFai Lau's avatar
    082ac2d5
    tcp: Merge tx_flags and tskey in tcp_collapse_retrans · 082ac2d5
    Martin KaFai Lau authored
    
    If two skbs are merged/collapsed during retransmission, the current
    logic does not merge the tx_flags and tskey.  The end result is
    the SCM_TSTAMP_ACK timestamp could be missing for a packet.
    
    The patch:
    1. Merge the tx_flags
    2. Overwrite the prev_skb's tskey with the next_skb's tskey
    
    BPF Output Before:
    ~~~~~~
    <no-output-due-to-missing-tstamp-event>
    
    BPF Output After:
    ~~~~~~
    packetdrill-2092  [001] d.s.   453.998486: : ee_data:1459
    
    Packetdrill Script:
    ~~~~~~
    +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10`
    +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1`
    +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
    +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
    +0 bind(3, ..., ...) = 0
    +0 listen(3, 1) = 0
    
    0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7>
    0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7>
    0.200 < . 1:1(0) ack 1 win 257
    0.200 accept(3, ..., ...) = 4
    +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
    
    0.200 write(4, ..., 730) = 730
    +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0
    0.200 write(4, ..., 730) = 730
    +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0
    0.200 write(4, ..., 11680) = 11680
    +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0
    
    0.200 > P. 1:731(730) ack 1
    0.200 > P. 731:1461(730) ack 1
    0.200 > . 1461:8761(7300) ack 1
    0.200 > P. 8761:13141(4380) ack 1
    
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:2921,nop,nop>
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:4381,nop,nop>
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:5841,nop,nop>
    0.300 > P. 1:1461(1460) ack 1
    0.400 < . 1:1(0) ack 13141 win 257
    
    0.400 close(4) = 0
    0.400 > F. 13141:13141(0) ack 1
    0.500 < F. 1:1(0) ack 13142 win 257
    0.500 > . 13142:13142(0) ack 2
    
    Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Soheil Hassas Yeganeh <soheil@google.com>
    Cc: Willem de Bruijn <willemb@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Tested-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    082ac2d5
    History
    tcp: Merge tx_flags and tskey in tcp_collapse_retrans
    Martin KaFai Lau authored
    
    If two skbs are merged/collapsed during retransmission, the current
    logic does not merge the tx_flags and tskey.  The end result is
    the SCM_TSTAMP_ACK timestamp could be missing for a packet.
    
    The patch:
    1. Merge the tx_flags
    2. Overwrite the prev_skb's tskey with the next_skb's tskey
    
    BPF Output Before:
    ~~~~~~
    <no-output-due-to-missing-tstamp-event>
    
    BPF Output After:
    ~~~~~~
    packetdrill-2092  [001] d.s.   453.998486: : ee_data:1459
    
    Packetdrill Script:
    ~~~~~~
    +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10`
    +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1`
    +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
    +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
    +0 bind(3, ..., ...) = 0
    +0 listen(3, 1) = 0
    
    0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7>
    0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7>
    0.200 < . 1:1(0) ack 1 win 257
    0.200 accept(3, ..., ...) = 4
    +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
    
    0.200 write(4, ..., 730) = 730
    +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0
    0.200 write(4, ..., 730) = 730
    +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0
    0.200 write(4, ..., 11680) = 11680
    +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0
    
    0.200 > P. 1:731(730) ack 1
    0.200 > P. 731:1461(730) ack 1
    0.200 > . 1461:8761(7300) ack 1
    0.200 > P. 8761:13141(4380) ack 1
    
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:2921,nop,nop>
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:4381,nop,nop>
    0.300 < . 1:1(0) ack 1 win 257 <sack 1461:5841,nop,nop>
    0.300 > P. 1:1461(1460) ack 1
    0.400 < . 1:1(0) ack 13141 win 257
    
    0.400 close(4) = 0
    0.400 > F. 13141:13141(0) ack 1
    0.500 < F. 1:1(0) ack 13142 win 257
    0.500 > . 13142:13142(0) ack 2
    
    Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Soheil Hassas Yeganeh <soheil@google.com>
    Cc: Willem de Bruijn <willemb@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Tested-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>