From owner-freebsd-transport@freebsd.org Wed Dec 19 21:22:01 2018 Return-Path: Delivered-To: freebsd-transport@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B827613489C3 for ; Wed, 19 Dec 2018 21:22:01 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0630.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 013816FDB3 for ; Wed, 19 Dec 2018 21:21:59 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cLXq9d1JVlsT6C5zyM48O3sDw2xmmmbp7vo5gbjO8UA=; b=ahXbzd7jiun0tgZ2/TX/oaSQEBGbIia/SAHL+NzeKBCh7FqX+xeB7SgqKW1KLI6amtAQu+cFIsZA7jkeUsO+cCgw34rzZur8y8MTL7km5gxVsCrfC8Vx/fB2vc8TQKdLqGCMs1dpOCV+fpAFbw3Sc89IQoS7GN5CZ5F2/CN7C2s= Received: from SN4PR0601MB3728.namprd06.prod.outlook.com (10.167.142.14) by SN4PR0601MB3679.namprd06.prod.outlook.com (10.167.141.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.19; Wed, 19 Dec 2018 21:21:58 +0000 Received: from SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::8d1a:8d3a:30a:d011]) by SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::8d1a:8d3a:30a:d011%3]) with mapi id 15.20.1425.024; Wed, 19 Dec 2018 21:21:58 +0000 From: "Scheffenegger, Richard" To: "hiren@strugglingcoder.info" CC: "freebsd-transport@freebsd.org" Subject: possible RFC6675 compute_pipe counting issue. Thread-Topic: possible RFC6675 compute_pipe counting issue. Thread-Index: AdSX4N6w97YTgpFvSAejfVrdpCcUng== Date: Wed, 19 Dec 2018 21:21:57 +0000 Message-ID: Accept-Language: de-AT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcc3JpY2hhcmRcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZiODRiYTI5ZTM1Ylxtc2dzXG1zZy0xYzdjNmVjYi0wM2Q0LTExZTktYjVlNi0wMDE5ZDJlNGVjZDdcYW1lLXRlc3RcMWM3YzZlY2MtMDNkNC0xMWU5LWI1ZTYtMDAxOWQyZTRlY2Q3Ym9keS50eHQiIHN6PSIxODUwIiB0PSIxMzE4OTcyODExNjg0NjEwMDAiIGg9IjUxcVpHcnNKOE5oMWxNclU3QnQ5MkZyTm9JST0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4= x-dg-rorf: x-originating-ip: [213.143.121.76] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN4PR0601MB3679; 6:LTf/qOS1G+BfV2qhTA1c4r6uza2JK+ioJg7y6cNjP087ILlron2/WigvDwEFgB3dK7mkcKTWUCcYfzjHQ4lxZE2v+Ha8vfMzVdMyQtXlaRv4v4nw1cY8b56/UDtjz7mc8y40F3gz9y0WVQkPSCK+uBi+biFiBdO9aao6fR+6HGdiwvpONREFn9xc8civzoZ95qGNmq6i6GKpPVgwMruAcgfspPp2wpqw+YNLKcSygO92qsJ2l11wwI3pN9LnlwTzp/7w4WrQXrmk8DcBOGw0qkBhJXr3uyxIXeysr3Maa988j/DpQuZOeWAm75PFRliNFbGhwdx/P5bG6g6Fder6FxaksLeOdVwhX0Jr4q8eDiZ/x+839Zlish5b6cjnzCSEDJVJchSNhgv7qmpCkIcVwP0ouhyjKJrcMdQ7ToU19JblpD+ytNDTeiPuGFtb9xb0YLmaUjJ5Qq1chC03Rcy98A==; 5:mN7e6p3eOQCJJnHB76vwWQI5APPqfmijyU6VGpxc2IHQ82eUt4VEAGTxz+vvb5nPQk2YxUhac5Q1EEc3VebRJwYQmhvZ3DypnM4rP1hFlE9UDOsZnmDm/E9B7puwwsYlTtIckYn1jBbDEcXIKBzSW9JAhFgcYnaFP0HlhXSnD/E=; 7:DR3hKbbwS6Ye5gi2V5RxZHl3IdANkKgKtkDPJer+Ixkdt6JGnGLTj2wSCYtKzC/etgwukmv0t7a25KSOTqb8mXANmS0TkXcY2yzUTmSFX659eFtBolJFF8cDikIH6ElRQGgtswadx1oDZZ6fY6mm+w== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b0f41480-a983-49e1-95b9-08d665f80212 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7193020); SRVR:SN4PR0601MB3679; x-ms-traffictypediagnostic: SN4PR0601MB3679: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(999002)(5005023)(6040522)(2401047)(8121501046)(10201501046)(3002001)(3231475)(944501520)(52105112)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:SN4PR0601MB3679; BCL:0; PCL:0; RULEID:; SRVR:SN4PR0601MB3679; x-forefront-prvs: 0891BC3F3D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(346002)(39860400002)(136003)(396003)(189003)(199004)(4326008)(6506007)(102836004)(256004)(14444005)(7696005)(72206003)(2501003)(966005)(478600001)(25786009)(14454004)(33656002)(2906002)(476003)(486006)(2351001)(6436002)(8676002)(1730700003)(81166006)(81156014)(8936002)(105586002)(106356001)(5660300001)(68736007)(66066001)(3846002)(316002)(99286004)(74316002)(5640700003)(55016002)(71190400001)(86362001)(575784001)(71200400001)(7736002)(305945005)(186003)(6306002)(9686003)(26005)(6916009)(97736004)(53936002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0601MB3679; H:SN4PR0601MB3728.namprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: m0nBLPKAHOaiyQE5A6ycDS/Mk4BCD3TR9mZWmdxfSdxseofj1aqqCjnvvdwZ2StAX7/Iq+sMiungVF3d3VsCKWAMe78OMK+z8NQtWIcwI6CJw1hYRlt8Ash8b/2WE/ZpSfnoN+KYa/Z2rU/S8oISmjhwuzLP/fCeOLnGskc3a+Ib/g7J8CSLQ6JxXKRgqsyTrnSRWCTBHNfveIzpNUr2xf2NrG9/JpU5dccHfZp9KNTS+bSQKL+76/40MMnNsSaYHc+rM4QDEYenxj7dbw+frMLzPEh3saKG9I+OJSf3RyuukcB7xkr79xS1RGUuCboY spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: netapp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0f41480-a983-49e1-95b9-08d665f80212 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2018 21:21:57.9164 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0601MB3679 X-Rspamd-Queue-Id: 013816FDB3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=netapp.onmicrosoft.com header.s=selector1-netapp-com header.b=ahXbzd7j; spf=pass (mx1.freebsd.org: domain of Richard.Scheffenegger@netapp.com designates 2a01:111:f400:fe46::630 as permitted sender) smtp.mailfrom=Richard.Scheffenegger@netapp.com X-Spamd-Result: default: False [-2.96 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.966,0]; R_DKIM_ALLOW(-0.20)[netapp.onmicrosoft.com:s=selector1-netapp-com]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; NEURAL_HAM_LONG(-0.80)[-0.801,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[netapp.com]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[netapp.onmicrosoft.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[0.3.6.0.0.0.0.0.0.0.0.0.0.0.0.0.6.4.e.f.0.0.4.f.1.1.1.0.1.0.a.2.list.dnswl.org : 127.0.3.0]; MX_GOOD(-0.01)[mx63.netapp.com,mx61.netapp.com,mx143.netapp.com,mx1.netapp.iphmx.com,mx144.netapp.com,mx2.netapp.iphmx.com,mx141.netapp.com,mx65.netapp.com,mx142.netapp.com,mx62.netapp.com,mx63.netapp.com,mx61.netapp.com,mx143.netapp.com,mx1.netapp.iphmx.com,mx144.netapp.com,mx2.netapp.iphmx.com,mx141.netapp.com,mx65.netapp.com,mx142.netapp.com,mx62.netapp.com]; TO_DN_EQ_ADDR_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.68)[-0.685,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 21:22:02 -0000 Hi Hiren, I'm trying to reactivate my old Lost Retransmission Detection patch. And I found your 2015 patch around sacked_bytes (RFC6675) here https://github.com/rscheff/freebsd/commit/d3c29dd43ff23e293d5988258493015fb= 4a072ba (The line ~389 in tcp_sack.c) But I think the code is problematic in two reasons: a) very thin clients, which may only send SACK deltas instead of full excer= pts of the scoreboard (e.g. only a sack block covering the most recent rece= ived data) b) whenever the receiver scoreboard has more discontinuous entries than wha= t a single ACK can carry as SACK fields (typically 3, possibly 4 or as litt= le as one). However, these will overestimate the outstanding data (pipe). (a) A cheating receiver sending multiple, identical sack blocks could game = the sender, though, as the check is done on a ack sack block by block check= , rather than when the scoreboard is updated... Reason: Your patch only looks at the SACK data contained in the most recent= ACK, rather than proper accounting of the non-sack holes in the scoreboard= . When I improved Aris PRR code, I did the accounting when the scoreboard is = being updated; sacked_bytes need to exclude any snd.una move to the right, = but should be similar: https://github.com/rscheff/freebsd/commit/4a4877478fe55e8ebdfa0daf9a2be4b21= 2d07cde As PRR needs a proper value for the delivered delta bytes per ACK, it shoul= d be simple to keep track of the correct value for the SACKed bytes (not ho= les) in the scoreboard too... Obviously, this can not be that much of an issue, as RFC6675 pipe is disabl= ed by default, and would underestimate the number of sacked bytes at the re= ceiver, unless the receiver has malicious intent... Any thoughts? Best regards, Richard =20