From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang Subject: [PATCH v2 net-next 0/5] tcp: add 4 new stats Date: Tue, 31 Jul 2018 17:46:19 -0700 Message-ID: <20180801004624.154346-1-tracywwnj@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Eric Dumazet , Neal Cardwell , Soheil Hassas Yeganeh , Yuchung Cheng , Wei Wang To: David Miller , netdev@vger.kernel.org Return-path: Received: from mail-pf1-f175.google.com ([209.85.210.175]:36849 "EHLO mail-pf1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732804AbeHAC3a (ORCPT ); Tue, 31 Jul 2018 22:29:30 -0400 Received: by mail-pf1-f175.google.com with SMTP id b11-v6so1733260pfo.3 for ; Tue, 31 Jul 2018 17:46:36 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: From: Wei Wang This patch series adds 3 RFC4898 stats: 1. tcpEStatsPerfHCDataOctetsOut 2. tcpEStatsPerfOctetsRetrans 3. tcpEStatsStackDSACKDups and an addtional stat to record the number of data packet reordering events seen: 4. tcp_reord_seen Together with the existing stats, application can use them to measure the retransmission rate in bytes, exclude spurious retransmissions reflected by DSACK, and keep track of the reordering events on live connections. In particular the networks with different MTUs make bytes-based loss stats more useful. Google servers have been using these stats for many years to instrument transport and network performance. Note: The first patch is a refactor to add a helper to calculate opt_stats size in order to make later changes cleaner. Wei Wang (5): tcp: add a helper to calculate size of opt_stats tcp: add data bytes sent stats tcp: add data bytes retransmitted stats tcp: add dsack blocks received stats tcp: add stat of data packet reordering events include/linux/tcp.h | 13 ++++++++++-- include/uapi/linux/tcp.h | 10 ++++++++- net/ipv4/tcp.c | 46 +++++++++++++++++++++++++++++++++++++--- net/ipv4/tcp_input.c | 4 +++- net/ipv4/tcp_output.c | 2 ++ net/ipv4/tcp_recovery.c | 2 +- 6 files changed, 69 insertions(+), 8 deletions(-) -- 2.18.0.345.g5c9ce644c3-goog