From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-252.mta0.migadu.com [91.218.175.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E258943A7F8 for ; Fri, 14 Aug 2026 10:42:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.252 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786704190; cv=none; b=Qjvasy5aV/DqixtfdhB70K3I33YVmpH00kAkuDUwjdVEvkR8i1JTTW5DdsPx1V8ytQoi3Aw4fQqTeRWnVYk0TzDcxNsYSKBh8sLHXa0sZv44Tft2STJrP0OEKkkHSBgQovJ/REEv0YuFiz6ymuvdkogKuY1ckI0AQB35qeoRM8s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786704190; c=relaxed/simple; bh=TkMHXxDX3Q0Ph7sOnBczYV2bh5oVujI/gXqvKj6gW+A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZnBMO0AmrDmMeUPkzhzcq66xGoD2r5XcTvh+I9svE3spPafgVv0q2ARrR3V5D/Fubp21muHlMExTVvz5qiKZJOYRr2troz88VXDJxOpkE2qwzPhqKVByaTJsa3kQ151C5QOHSVxEcg5XP79BYihZn3KsS+w34ZGcmB2e2ijcFzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=pIdRBMBV; arc=none smtp.client-ip=91.218.175.252 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="pIdRBMBV" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=TkMHXxDX3Q0Ph7sOnBczYV2bh5oVujI/gXqvKj6gW+A=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1786704174; v=1; x=1787308974; b=pIdRBMBVESsRM78I8mWM0rO7SwxkjZoKHVn5DOjBjKm1kKV6+GmLIvFf3pJe6LSqSfKHR87R B6/trAfs4ProABVURKDr0PlSw11NtVnnob5UzwMHMMOwvdBB3iL/5nwiNqsBmA7/Arc5aQ5yRP/ zfairugF3eHfQBvmssRXLCWE= X-Envelope-To: linux-kernel@vger.kernel.org Received: from [10.54.25.56] (210.22.144.162) by smtp.migadu.com with ESMTPS id 2962fc705d168a82; Fri, 14 Aug 2026 10:42:54 +0000 X-Migadu-Flow: FLOW_OUT Message-ID: Date: Fri, 14 Aug 2026 18:42:47 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next] net: advertise TCP MSS from the configured MTU, not the learned PMTU To: Eric Dumazet , Neal Cardwell , Willem de Bruijn Cc: netdev@vger.kernel.org, David Ahern , Ido Schimmel , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-kernel@vger.kernel.org References: <20260814063545.225896-1-jiayuan.chen@linux.dev> From: Jiayuan Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/14/26 5:21 PM, Eric Dumazet wrote: > On Fri, Aug 14, 2026 at 8:36 AM Jiayuan Chen wrote: >> The MSS a host puts in its SYN tells the peer how big a segment it may >> send us. Right now we can shrink it with a PMTU we learned on our own >> send path, which is the wrong direction entirely. >> >> On asymmetric paths this bites - think DSR load balancers, where the >> request side goes through a smaller-MTU overlay. We learn a small PMTU >> going out, then advertise a small MSS, and the peer stays capped for the >> whole connection even though its path back to us is wide. MSS only shows >> up in the SYN and never grows back. >> >> On symmetric paths we lose nothing by dropping it either: the peer runs >> its own PMTU discovery and usually already knows the real path MTU. >> >> So work out the advertised MSS from the configured route or device MTU >> and ignore the learned PMTU. Our send side is unchanged, still clamped by >> tcp_current_mss(). Add ip_dst_mtu_configured()/ip6_dst_mtu_configured() >> and use them from the two default_advmss() paths. >> >> Signed-off-by: Jiayuan Chen > > LGTM, but this probably needs Fixes: tags and should be sent to net tree. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Fixes: 164a5e7ad531 ("ipv4: ipv4_default_advmss() should use route mtu") > Cc: stable@vger.kernel.org > > I added the following packetdrill test, please add it in a series. > > commit f0c619ca446b669c48b5c2e2c78e23af1a0850b6 > Author: Eric Dumazet Thanks Eric, I will do it after cold time.