From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:33474 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754500AbeD3P4H (ORCPT ); Mon, 30 Apr 2018 11:56:07 -0400 Date: Mon, 30 Apr 2018 11:56:05 -0400 (EDT) Message-Id: <20180430.115605.1094351453502803017.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: soheil.kdev@gmail.com, netdev@vger.kernel.org, ycheng@google.com, ncardwell@google.com, edumazet@google.com, willemb@google.com, soheil@google.com Subject: Re: [PATCH V2 net-next 1/2] tcp: send in-queue bytes in cmsg upon read From: David Miller In-Reply-To: References: <20180427185733.36855-1-soheil.kdev@gmail.com> <20180430.113834.1760530542793231849.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet 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.