On 04/30/2018 08:56 AM, David Miller wrote: > From: Eric Dumazet <eric.duma...@gmail.com> > Date: Mon, 30 Apr 2018 08:43:50 -0700 > >> I say sort of, because by the time we have any number, TCP might >> have received more packets anyway. > > That's fine. > > However, the number reported should have been true at least at some > finite point in time. > > If you allow overlapping changes to either of the two variables during > the sampling, then you are reporting a number which was never true at > any point in time. > > It is essentially garbage.
Correct. TCP sockets are read by a single thread really (or synchronized threads), or garbage is ensured, regardless of how the kernel ensures locking while reporting "queue length"