diff options
author | Andrei Vagin <avagin@google.com> | 2019-06-05 16:29:25 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-06-05 16:30:45 -0700 |
commit | a12848ffebcc2e123f55d8ac805c5248d03a9055 (patch) | |
tree | 898dc8d080c1b00cdb0fc96139e458b54f2c932a /pkg/tcpip/transport/tcp | |
parent | d18bb4f38a7a89456dad1f3a0e8ff13a0b65ba7f (diff) |
netstack/tcp: fix calculating a number of outstanding packets
In case of GSO, a segment can container more than one packet
and we need to use the pCount() helper to get a number of packets.
PiperOrigin-RevId: 251743020
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r-- | pkg/tcpip/transport/tcp/snd.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index afc1d0a55..3464e4be7 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -779,7 +779,7 @@ func (s *sender) sendData() { break } dataSent = true - s.outstanding++ + s.outstanding += s.pCount(seg) s.writeNext = seg.Next() } } |