Re: [tcpm] question about if a recent Linux patch is compliant with RFC7323 on window scaling
"Cui, Cheng" <Cheng.Cui@netapp.com> Tue, 30 August 2016 14:22 UTC
Return-Path: <Cheng.Cui@netapp.com>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 406DF12D8EE for <tcpm@ietfa.amsl.com>; Tue, 30 Aug 2016 07:22:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.469
X-Spam-Level:
X-Spam-Status: No, score=-7.469 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.548, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1_OmPmJS4yt3 for <tcpm@ietfa.amsl.com>; Tue, 30 Aug 2016 07:22:40 -0700 (PDT)
Received: from mx141.netapp.com (mx141.netapp.com [216.240.21.12]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E1F5812D8B3 for <tcpm@ietf.org>; Tue, 30 Aug 2016 07:17:48 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="5.30,256,1470726000"; d="scan'208";a="143422408"
Received: from hioexcmbx06-prd.hq.netapp.com ([10.122.105.39]) by mx141-out.netapp.com with ESMTP; 30 Aug 2016 07:16:47 -0700
Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by hioexcmbx06-prd.hq.netapp.com (10.122.105.39) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 30 Aug 2016 07:16:47 -0700
Received: from HIOEXCMBX03-PRD.hq.netapp.com ([::1]) by hioexcmbx03-prd.hq.netapp.com ([fe80::a009:cb7a:e519:7347%21]) with mapi id 15.00.1210.000; Tue, 30 Aug 2016 07:16:47 -0700
From: "Cui, Cheng" <Cheng.Cui@netapp.com>
To: "tcpm@ietf.org" <tcpm@ietf.org>
Thread-Topic: question about if a recent Linux patch is compliant with RFC7323 on window scaling
Thread-Index: AQHR/ktWq33ah5ClWE2yMFWt4EpCvqBhx/sA
Date: Tue, 30 Aug 2016 14:16:47 +0000
Message-ID: <B8074EE2-093E-4C8B-94EA-1E470C1A173E@netapp.com>
References: <D3E38481.146B4%Cheng.Cui@netapp.com>
In-Reply-To: <D3E38481.146B4%Cheng.Cui@netapp.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.122.56.79]
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <6AF8547DD8EBC541BC5CC2B605347475@hq.netapp.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/09nCEatIY57BrRpvfaSw0PGAzqM>
X-Mailman-Approved-At: Tue, 30 Aug 2016 08:33:42 -0700
Subject: Re: [tcpm] question about if a recent Linux patch is compliant with RFC7323 on window scaling
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Aug 2016 14:22:44 -0000
Six days have passed and no response yet. Can anyone in this board make a comment?
Thanks,
--Cheng Cui
NetApp Scale Out Networking
On 8/24/16, 5:06 PM, "Cui, Cheng" <Cheng.Cui@netapp.com> wrote:
Hello David,
I hope this email could reach you well, because I found related
discussions about this topic on window scaling and the case of window
shrinking (or retraction or loss of precision). And I try to make this
question simple.
There is a recent Linux patch at receiver side to round-up advertised
window due to precision loss of window scaling. It reaches my attention
because the same problem could also happen between a pair of Linux and
FreeBSD nodes, and I am not aware of any similar patch in FreeBSD yet.
The Linux patch is this:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6
07bfbf2d55dd1cfe5368b41c2a81a8c9ccf4723
And I quote some description of the Linux patch below:
> If the sender uses up the entire window before it is shrunk, this can
>have
> chaotic effects on the connection. When sending ACKs,
>tcp_acceptable_seq()
> will notice that the window has been shrunk since tcp_wnd_end() is before
> tp->snd_nxt, which makes it choose tcp_wnd_end() as sequence number.
> This will fail the receivers checks in tcp_sequence() however since it
> is before it's tp->rcv_wup, making it respond with a dupack.
If the Linux sender?s behavior is right ("ACK-only packets should be sent
with the largest in-window sequence number that has ever been sent." ref:
https://www.ietf.org/mail-archive/web/tcpm/current/msg10512.html) it
actually chooses "tp->snd_una+tp->snd_wnd" (tcp_wnd_end()) instead of
tp->snd_nxt, as it thought tp->snd_nxt is out of window, in case of
precision loss which made the receiver?s advertise-window smaller.
However, the RFC7323 explicitly specifies the receiver should right shift
the exact scale factor, without mentioning any further round-up:
https://tools.ietf.org/html/rfc7323#page-9
> o The window field (SEG.WND) of every outgoing segment, with the
> exception of <SYN> segments, MUST be right-shifted by
> Rcv.Wind.Shift bits:
>
> SEG.WND = RCV.WND >> Rcv.Wind.Shift
And also if I am understanding correctly, RFC7323 page 10 (2.4. Addressing
Window Retraction) specifies it is the sender?s responsibility to handle
the sequence number out of window:
https://tools.ietf.org/html/rfc7323#page-10
> 4) On first retransmission, or if the sequence number is out of
> window by less than 2^Rcv.Wind.Shift, then do normal
> retransmission(s) without regard to the receiver window as long
> as the original segment was in window when it was sent.
>
> 5) Subsequent retransmissions MAY only be sent if they are within
> the window announced by the most recent <ACK>.
In your discussion of the link below, if I am understanding correctly, you
were also in favor of "Yes. It is ok to have more receive buffer space
available than you advertise in the window, but not ok to advertise a
larger window than you are willing to accept." So I think you were not in
favor of rounding-up the advertise-window.
https://www.ietf.org/mail-archive/web/tsvwg/current/msg06475.html
So my question is: Is the Linux patch (on receiver side to round-up the
advertise-window) RFC compliant? Or is it just the right thing (vendor
specific) and other systems like FreeBSD have to follow up, so that their
talks can have no problem?
Thanks and apologize in advance if I did not do enough research,
--Cheng Cui
- [tcpm] question about if a recent Linux patch is … Cui, Cheng
- Re: [tcpm] question about if a recent Linux patch… Cui, Cheng
- Re: [tcpm] question about if a recent Linux patch… Yoshifumi Nishida
- Re: [tcpm] question about if a recent Linux patch… Cui, Cheng