RE: Can I set the UDP checksum to zero when running QUIC?

"Shihang(Vincent)" <shihang9@huawei.com> Wed, 13 March 2024 09:13 UTC

Return-Path: <shihang9@huawei.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 057E8C14F69D for <quic@ietfa.amsl.com>; Wed, 13 Mar 2024 02:13:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.205
X-Spam-Level:
X-Spam-Status: No, score=-4.205 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FR7cMwqeL_DL for <quic@ietfa.amsl.com>; Wed, 13 Mar 2024 02:13:53 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56286C14F695 for <quic@ietf.org>; Wed, 13 Mar 2024 02:13:53 -0700 (PDT)
Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TvlDh3vqqz6G87y for <quic@ietf.org>; Wed, 13 Mar 2024 17:13:40 +0800 (CST)
Received: from lhrpeml500002.china.huawei.com (unknown [7.191.160.78]) by mail.maildlp.com (Postfix) with ESMTPS id BA8FA1404F4 for <quic@ietf.org>; Wed, 13 Mar 2024 17:13:49 +0800 (CST)
Received: from kwepemd500008.china.huawei.com (7.221.188.231) by lhrpeml500002.china.huawei.com (7.191.160.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 13 Mar 2024 09:13:49 +0000
Received: from kwepemd100007.china.huawei.com (7.221.188.221) by kwepemd500008.china.huawei.com (7.221.188.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 13 Mar 2024 17:13:47 +0800
Received: from kwepemd100007.china.huawei.com ([7.221.188.221]) by kwepemd100007.china.huawei.com ([7.221.188.221]) with mapi id 15.02.1258.028; Wed, 13 Mar 2024 17:13:47 +0800
From: "Shihang(Vincent)" <shihang9@huawei.com>
To: Christian Huitema <huitema@huitema.net>, Martin Thomson <mt@lowentropy.net>
CC: "quic@ietf.org" <quic@ietf.org>
Subject: RE: Can I set the UDP checksum to zero when running QUIC?
Thread-Topic: Can I set the UDP checksum to zero when running QUIC?
Thread-Index: Adp0X6nS+KJ2EcB6Q4Ws9l3n9uGVBQALeecAAAxYPQAAGcsLcA==
Date: Wed, 13 Mar 2024 09:13:47 +0000
Message-ID: <b3d6ff62ae4048228826bd1010c45e3c@huawei.com>
References: <6e69606a9d9443668dda4ee33bf8f825@huawei.com> <0522153e-2492-46b9-a2ce-e29a479e79aa@betaapp.fastmail.com> <b492b220-605c-4066-a245-5a3871a2e689@huitema.net>
In-Reply-To: <b492b220-605c-4066-a245-5a3871a2e689@huitema.net>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.112.41.128]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/ihCzauhIMuweT37pYEtsbZ5xdp0>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Mar 2024 09:13:59 -0000

Hi Christian,
The idea of trial is interesting. I wonder if the trial should be done per path or per end host? Are you assuming some middleboxes will mess up the NULL checksum UDP packets?

Thanks,
Hang

-----Original Message-----
From: QUIC <quic-bounces@ietf.org> On Behalf Of Christian Huitema
Sent: Wednesday, March 13, 2024 12:51 PM
To: Martin Thomson <mt@lowentropy.net>; quic@ietf.org
Subject: Re: Can I set the UDP checksum to zero when running QUIC?

One the other hand, the cost of computing the checksum is tiny compared to the cost of encrypting the packets. So there is a small performance gain in not computing the checksum, compensate by the potential gain of loosing compatibility.

If I were to do that, I would do some trials. Until the handshake is complete, use the checksum. Then, send a trial packet with null checksum. If the peer acknowledges it, then further packets can be sent with null checksum. Redo the trial for each new path, or if there are large number of packet losses. Basically, treat that the same way we do PMTUD.

-- Christian Huitema

On 3/12/2024 3:57 PM, Martin Thomson wrote:
> The question is more of a compatibility one than anything else.  What, if anything breaks if you do this?
> 
> As noted, there are contexts in which not computing the checksum works.  So I guess the conclusion is that nothing breaks, so go ahead.  QUIC doesn't depend on the checksum.  All the cryptographic bits of QUIC use far stronger and more reliable mechanisms.
> 
> On Tue, Mar 12, 2024, at 22:04, Shihang(Vincent) wrote:
>> Hi QUIC wg,
>> Since QUIC has strong encryption and integrity protection provided by 
>> TLS 1.3. I wonder if the UDP checksum can be disabled(using UDP Zero 
>> Checksum Mode https://www.rfc-editor.org/rfc/rfc6936 )to save the 
>> computation just like in VXLAN(RFC7348 
>> <https://datatracker.ietf.org/doc/html/rfc7348#autoid-12>).
>>
>> Thanks,
>> Hang
>