From owner-freebsd-transport@freebsd.org Sat Jan 9 15:44:37 2016 Return-Path: Delivered-To: freebsd-transport@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172A8A69874 for ; Sat, 9 Jan 2016 15:44:37 +0000 (UTC) (envelope-from jtl@freebsd.org) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0137.outbound.protection.outlook.com [157.56.111.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8483618C8 for ; Sat, 9 Jan 2016 15:44:35 +0000 (UTC) (envelope-from jtl@freebsd.org) Received: from BL2PR05CA0026.namprd05.prod.outlook.com (10.255.226.26) by DM2PR0501MB1390.namprd05.prod.outlook.com (10.161.224.12) with Microsoft SMTP Server (TLS) id 15.1.361.13; Sat, 9 Jan 2016 15:11:12 +0000 Received: from BL2FFO11OLC001.protection.gbl (2a01:111:f400:7c09::111) by BL2PR05CA0026.outlook.office365.com (2a01:111:e400:c04::26) with Microsoft SMTP Server (TLS) id 15.1.365.19 via Frontend Transport; Sat, 9 Jan 2016 15:11:12 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.19) smtp.mailfrom=freebsd.org; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=freebsd.org; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning freebsd.org discourages use of 66.129.239.19 as permitted sender) Received: from p-emfe01b-sac.jnpr.net (66.129.239.19) by BL2FFO11OLC001.mail.protection.outlook.com (10.173.161.185) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Sat, 9 Jan 2016 15:11:12 +0000 Received: from magenta.juniper.net (172.17.27.123) by p-emfe01b-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Sat, 9 Jan 2016 07:11:11 -0800 Received: from [172.29.33.83] ([172.29.33.83]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id u09FB9D73532; Sat, 9 Jan 2016 07:11:09 -0800 (PST) (envelope-from jtl@freebsd.org) User-Agent: Microsoft-MacOutlook/14.5.9.151119 Date: Sat, 9 Jan 2016 10:11:07 -0500 Subject: Re: TCP_HAVERCVDFIN From: "Jonathan T. Looney" Sender: Jonathan Looney To: Sam Kumar CC: "freebsd-transport@freebsd.org" Message-ID: Thread-Topic: TCP_HAVERCVDFIN References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC001; 1:PnkRbypQZrKQtf9B3RJWGQmAxwAx8BsSq7CfhnFHkXMhmlPYEAkg2GIzUaWYLC4rFRepdT1am+1BOwVZ7MSa5Y0CxD1gNx1exsZrgdx2PhGTUJD8ZTBK6xhuFDGjSlwQVA4wWkiWmgczwGXiLy3BAQUVv+YDj6FogAuIoQeBhz7j0N0Hs86N3urT5Y33IrvVVRFqgiH+aRrBWfxLgNXAe/FVzV0hP1sC4INF8KEnV8yIrZhjJmoV2y+3I/+8GZwFo9ykxvlnSD7dk2gK6rmHMVr5ohkshOecEZ8iSauv55bPDyNNZwGKW02LNYXhUEbAr6yzT2PNxYglzT+NWzLlsyB6m/NV6yi/iQqQSFkdbb8= X-Forefront-Antispam-Report: CIP:66.129.239.19; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(24454002)(377454003)(479174004)(52604005)(189002)(199003)(55674003)(11100500001)(92566002)(586003)(69596002)(19580395003)(19580405001)(47776003)(2906002)(87936001)(50986999)(6806005)(1220700001)(86362001)(23726003)(1096002)(16796002)(230700001)(4326007)(105596002)(189998001)(50466002)(1411001)(106466001)(77096005)(76176999)(2950100001)(561944003)(54356999)(4001350100001)(81156007)(97736004)(5001960100002)(110136002)(36756003)(83506001)(46406003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0501MB1390; H:p-emfe01b-sac.jnpr.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 2:/FF6ytrvmayl3U5EKx1McUq9P1ykir3hcYGGi3M6R2WbvUFTso8BmhSiby/qls4Z3IbiPpeGiV43F3p1dluEebW3HKfws0PdvEXtkXHLnzt3BxPkI/d75SxUlYVXBrd2HY6EInsP9Ppz9g0TCHfE1g==; 3:uYwS6Al/xKG3456Ym/lzR0jb/yWq0Btkfw9v3cgrMBBftws0vEIXDBjCyqdpf5Tl4YJHpU6K3wlI4UbOHXrh/vZXpuoARU3To/GeaHGxBRzhKO5k4vZYTP+4VXGC6+NbjkZagoRzyP74Tr++PRZwfY8ZRZWDeQOOlKHWNv0xvqJWpyLVXlyvhVW0gm1tZN6JKXpbHX/MaAn2Y/ML1Hr9uRe8AcLurGHUbZOdu8RuwpY=; 25:8H0AjTuD2tn3Xhb6HIrEfO3eWhGFtiLuFHxgR7CHp/0d2efbiGIr0ypCUA8b7jEh9/t5kcSMR/S7AahkpUXEN6sOF8puAxRBFoAbw9vOyWZsfRmk8jV+DikjeCRnNeEuW9bO0KaLK8uGhOKdj5muolG9QClViXcHFIfQsJ+Ow+l080Yz3hjzJaIDusXRz7C8/G1kRvSTUWkeVldOms0biZc/xjh8S+4YQ3aYCjdfq+ny1vZk4XQ74nV8G2S44D68 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0501MB1390; X-MS-Office365-Filtering-Correlation-Id: 8e7e6982-0e47-47b9-cb97-08d319071cb0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 20:ynqdskAl/tSQvLsDaN5b8YTeJ7U9eMKrjTT1SbO31av09AiXw92lfM8Inisgzb4zNO2LUmUhKMuPJIUZPIK6LLtfStiqH8ExzpVlGf/QugShzGDPBQ1jkyLNtQGvImy9xdLsq7u5+8PYDfeRl5Mji4YTILBHMYh6fzLFXINDDBuP4+EWPH9EwjPNw8oKPFAvC3KeXTLoANUkXh1bxlM1OVtfwGz3r0xliuCXYlDi371ZAd3J21+K0iUncTVMVwvUv7V33EY0t/JGqinRvPe/bzs2mX4psSFyUGGBesN/JwC3gknQ95scO1ErolrOITobwZaBiowffp91C05Sx8qidR8FL2nUy+3cq+YWqDVsLVNG6jkRGuAuM9mXXd6TkxA+YvZQwIOQb62YSzWSdPlBuRdfNiuOqPUo+fkj63pDm+Ff+QLuRApfz47FfQLq4Un934V17r/94U/VrchY1hbbuYiYsTqNGvAHaWQj74QfnW6xYXw6uL3zvNlxcgqm1Kdy; 4:2DtX3zPln7fhBqSCwAuN9yRImyfaPMxp5QWBvkcKcwelKCTmsZacN15jpPiz1Pgh7OA0MaMt3O68ACWlcfpdjtg+GJYsc8hR8JPcpYzerOfpvAEzCAmWdTngr0syHll8/LdJmFHd9jL7EGzyo8n0a4jwO3/peq3irvnWvgTGBEBp5lWX1qgmt8zdXlMxydMSXzqSuTz9CSGRQIyuaHjK5o1hgCulELZKpBaJuXe67IiYeHRx6fu/6BVzNsaO+N/Kk7VzlbcOjosNGAnArpdTQ4qMXnUTzzbuuWGZ/UeGwCcnMjcLBlYoJNBkWCNC13tHGkhY7fTF+IjKaEyPsi77K7L/p7oWZu26zeL+z1PqfJyxGwc153D3lstQGguepJ8VOEXWluSqjVE1ORjHZ3T8Y28bRBXtiyqPqhoQJecXL56syIpCKfQnPlbP5vnMP6Cn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(13018025)(8121501046)(5005006)(13015025)(13017025)(10201501046)(3002001); SRVR:DM2PR0501MB1390; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0501MB1390; X-Forefront-PRVS: 0816F1D86E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0501MB1390; 23:nKbWDcw5O3ZAtXw75SBbU0QLdGe9S/FyaVDcsEB?= =?us-ascii?Q?UhwWzv2LMKud7Fzc3R0A54Tld3U34/wFgorKaOo+eKdKS1QpY2TL7X8AU2rv?= =?us-ascii?Q?R0LWDgMxfsumQ8O4QOSba8D4BhHhzH4T0nImyZkfiOHUfx/gmCMkPwYXQXUq?= =?us-ascii?Q?cgzIKbzatwt/9I7UKOetym12hmIoldNxO1CtB1GwnAZPzGnXuvK+CfZe8URT?= =?us-ascii?Q?P+/AgURRRQ/IlKI0NcnuxdimEPw3EWq0TlbYcRuCK2CTkAtM/9FU7JNRelgO?= =?us-ascii?Q?VU73xMuDFs2rCuVUthqqZmYcBcmCFvibUDwmGQSoiSeU8nOeCWydGzcViSA7?= =?us-ascii?Q?9iZVg/LPLAfpORtx2biZENtDCZS6QzAKmOUhlZvPJ6/bY4sEXReZStO955Ff?= =?us-ascii?Q?OU25geWqrwUB543pwLdnAn0JVdzgm+skhZcHBwy1eUxQAFfXj/BmR9k+slNy?= =?us-ascii?Q?u6XDu0OAZbR8FLUiBJcveoEcs5hmFudwp94c1BdsCu7CoeXclAZWQL5Vh3iN?= =?us-ascii?Q?UZkBX8PcOey6IVeXKCVug7/3tXcdXyxhEK18Voc65NjRYUB1fw1HjdocLkRy?= =?us-ascii?Q?e3KoxmU81KJvbUQhPQGxnU0dgE9CAZ1uIR5qJmeU4jgK8hSXbIRPTeLeJ/H6?= =?us-ascii?Q?exVkh5n9ldDb1YcESNXY1NQJUvFdHWtE3sjhzn3fUeQbSTBmbbH20dgKNb3e?= =?us-ascii?Q?WQ1CWtB5e/OWeJIzmIbiC78+cYEvHOwzh5ARHwu34QTjnyGJnmkAofCs1tPt?= =?us-ascii?Q?Ep3UNBtnFxCq27E7OtotQBvbRN/deuSMd/u/SDnqeVQcz/EWMSCXLMX2MiaW?= =?us-ascii?Q?wbHe9PzEk5JMAq3eLq/+rwQ4FIR0wQwCVO0W/k6E6V0EX8hGjlgAJbxDt6xz?= =?us-ascii?Q?JCDhhxdvveaZzhbo8BJ7d1+08RcEIhs3pzNDD6Xx/464AyAXCbbYzEl4P5Qz?= =?us-ascii?Q?wHNWZbqe+scMVGIAEvn/eEoe6ao0zuGO8/43w6XKDtOa9qkdGg3DS3yXwNjJ?= =?us-ascii?Q?aTFhvtl2Lh7doZ4ZVIzWURSDACTUSsjjydnSulmWpmR0Th0S1yO2ccRYVd/p?= =?us-ascii?Q?Ae6Z+oXl2xf71/fUA31TPDAejhxifXAmm4cNojJBH70HccFPcVP7MehTqlgW?= =?us-ascii?Q?oGQM5v0nG/d0u4GYKkL3qX5EToSIKWm4p+DGhFlLVZjysBOMoJYo3vh5+3n7?= =?us-ascii?Q?5wwBUSblA0acnFeo=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0501MB1390; 5:j4EIeBYNWX9h4GN/uYVjvlFOZJ7WPV273q3wttzOvbgRd+tuTg3KrAM1Z+HV+4E/f4IOQRx+JEBz487h1I4qRTpoTu4MYU0gonCxP9BLHPLOC++U3Bk+4k+IdX8XNbXqN16NozIVm4yV7tGm2eI4Uw==; 24:3aFdoo65NVzDszCPJD7hfHciPzpYWUcXu+BHfrIjHDa8wfQ6q0RySbWqUEj82UraNE9yPfRBw6Pmp3RznTsySZPamCmwhyLFSRQ5AmKwuBE= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2016 15:11:12.2441 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.19]; Helo=[p-emfe01b-sac.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB1390 X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 09 Jan 2016 15:44:37 -0000 On 1/8/16, 4:45 PM, "owner-freebsd-transport@freebsd.org on behalf of Sam Kumar" wrote: >I am working with the code for the TCP Stack. Thanks for choosing FreeBSD! :-) >In summary I suspect that the TCPS_HAVERCVDFIN macro needs to be >redefined, >but I'm not sure whether that is actually the case. I wanted to open a >discussion about this to explore whether this is a legitimate issue. In short, it appears you are correct that the macro name does not match the reality of what it checks. This is likely to cause a problem at some point, so it is legitimate to suggest it be fixed. However, this is non-trivial for at least several reasons: A) Changing this will require thoroughly testing all the impacted code. That requires both a thorough conformance-testing suite, as well as thorough performance tests (in case the change impacts performance). However, I don't think the FreeBSD project itself has such things at the moment. (gnn@ might have more to say on this topic. :-) ) B) Even if the code you reference made an erroneous assumption, others may have written other code that assumes the current behavior. Changing the current behavior to be "more correct" might impact other code in subtle ways. (Hence, the need for testing: see (A).) C) Even if we can fully qualify that *our* code works correctly after changing this, third parties may have extended our system in ways that rely on the current behavior. (Hence the need for testing. They "own" that to some extent. But, we owe them some duty to be careful about changing basic building blocks they may use.) D) Changing this may make it harder to port code from other OSs. For example, OpenBSD uses the same definition of TCPS_HAVERCVDFIN that we do. On the other hand, it looks like NetBSD updated theirs (17 years ago!) to something closer to what you suggest. So, porting code from other OSs may already be problematic. Because we now have some level of TCP stack modularity, we *should* be able to build a TCP module that does what you suggest and let people try it out while maintaining the option to fallback to the main stack if things go haywire. However, that is more complicated than I wish it were because it currently requires *copying* code rather than just compiling the same code a second time. I have a proposal to address that, but need to circulate it and get feedback. In the meantime, we can talk through some of these obstacles and see how we want to handle this. We can always define two macros (the old and new one) and change the macro usage from the old to the new one as we feel comfortable. If there is desire to proceed, I would recommend that as the way forward, assuming we can satisfy the testing concerns. Jonathan