Re: [tcpm] question about if a recent Linux patch is compliant with RFC7323 on window scaling
Yoshifumi Nishida <nishida@sfc.wide.ad.jp> Sun, 04 September 2016 10:55 UTC
Return-Path: <nishida@sfc.wide.ad.jp>
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 BE44F12B12C for <tcpm@ietfa.amsl.com>; Sun, 4 Sep 2016 03:55:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.409
X-Spam-Level:
X-Spam-Status: No, score=-3.409 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.508, 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 L34LvmqulNRn for <tcpm@ietfa.amsl.com>; Sun, 4 Sep 2016 03:55:09 -0700 (PDT)
Received: from mail.sfc.wide.ad.jp (shonan.sfc.wide.ad.jp [203.178.142.130]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 353B412B0CD for <tcpm@ietf.org>; Sun, 4 Sep 2016 03:55:09 -0700 (PDT)
Received: from mail-ua0-f180.google.com (mail-ua0-f180.google.com [209.85.217.180]) by mail.sfc.wide.ad.jp (Postfix) with ESMTPSA id C48E127844C for <tcpm@ietf.org>; Sun, 4 Sep 2016 19:55:07 +0900 (JST)
Received: by mail-ua0-f180.google.com with SMTP id 31so7023346uao.0 for <tcpm@ietf.org>; Sun, 04 Sep 2016 03:55:07 -0700 (PDT)
X-Gm-Message-State: AE9vXwNyy+NZk2ZsUK+kA3ZJlPibPT+JzIvDrwm9zYpDw/J1UU6QPiqzkrGzQYRGvPgJD71mZ1C/uZ2wOK54cA==
X-Received: by 10.159.32.2 with SMTP id 2mr19089016uam.74.1472986506271; Sun, 04 Sep 2016 03:55:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.176.64.194 with HTTP; Sun, 4 Sep 2016 03:55:05 -0700 (PDT)
In-Reply-To: <B8074EE2-093E-4C8B-94EA-1E470C1A173E@netapp.com>
References: <D3E38481.146B4%Cheng.Cui@netapp.com> <B8074EE2-093E-4C8B-94EA-1E470C1A173E@netapp.com>
From: Yoshifumi Nishida <nishida@sfc.wide.ad.jp>
Date: Sun, 04 Sep 2016 03:55:05 -0700
X-Gmail-Original-Message-ID: <CAO249yeh3iCpMntw_F4p0rS0sawU_LDgpjh-O2DwVSLVtxLkfg@mail.gmail.com>
Message-ID: <CAO249yeh3iCpMntw_F4p0rS0sawU_LDgpjh-O2DwVSLVtxLkfg@mail.gmail.com>
To: "Cui, Cheng" <Cheng.Cui@netapp.com>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/-FEyutN163WZ5AVRXRxEpGRVon8>
Cc: "tcpm@ietf.org" <tcpm@ietf.org>
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: Sun, 04 Sep 2016 10:55:12 -0000
Hi Cheng, On Tue, Aug 30, 2016 at 7:16 AM, Cui, Cheng <Cheng.Cui@netapp.com> wrote: > 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? I think the Linux patch at least follows the following principle in RFC793. The mechanisms provided allow a TCP to advertise a large window and to subsequently advertise a much smaller window without having accepted that much data. This, so called "shrinking the window," is strongly discouraged. The robustness principle dictates that TCPs will not shrink the window themselves, but will be prepared for such behavior on the part of other TCPs. I personally think a real question would be how FreeBSD prepares for shrinking window. Linux chose one way for it, but I guess all implementations don't need to follow the same way. -- Yoshi
- [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