Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1973874rwp; Thu, 13 Jul 2023 21:23:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaJFST7DxaZV6XYLklzvf/nv7nGm2DI945/lzCvzcGSGVAozVkkB+kPNiJ5+Ow8vyuHemS X-Received: by 2002:a05:6a20:8408:b0:130:46ea:29cb with SMTP id c8-20020a056a20840800b0013046ea29cbmr3280526pzd.25.1689308603768; Thu, 13 Jul 2023 21:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689308603; cv=none; d=google.com; s=arc-20160816; b=R+moSsQQasbnsKH6VIxd78dH6eng71wuElxeIt0Wz5jc6bInBHbq2tQcSBS1Eh05Ra BQ1yKPUdiTcnLhv31ivc4lddOxrODaKo0cuBKLYqYK+wHG8B5Sq1o1AIpzyvIz5pwtP/ dPWeFezRw+Lz0EqoB6jPRpEu3Q7XACSxgtBA90lBwzN/K5VWS2XARhaBKyYTyNjCYlBq rKVM9yg219H2FI11DuRFBZ8A9fB6xx0l5L+bt5Y6cvJVwdyst37eDDm5nu6pWovThNtZ SQQXTjw9ijIV1tf/uo1azHVTHW6cPog4L/QD/LMuLmmj4UbwnLdkck3S9eilEGDMXws2 BvuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Z0IXrRel0Jf5sI6yYnB7ussn8KJNTKMqE2zSLssKxOs=; fh=itQ2t8mz19cmqyYwcL6VfCewViRguWlK1XvBTPU/fFo=; b=eZ2qUw/BFqa3ICN6HlSZHoGtz6jtTzI2eLV1uA8p32vqvHs5B8ubf/+3/nw9TE+DNE VxhzBGMUNdwsRTfZFG7mnYADQ5DbGgAP/9KBh5hp31hLtekJA7H9zswkPpaYOQYnUk19 05mylDxXi+CdyxqcQo1KSfq4PKUQUQOrIm8l06AsFySsSdIwSP3Vom4LTaOP2pKqhs7k RMH0VDb6nO7bYZtcWHqu+hPH/NRAZXXFRLK1DVbzWgsPTMujn26LjIIKRqdtKLXij6Y2 Q/w4R5/DVJD33mAbhYNLvDE76kwaWflgefqPXF0tLh4xDAJxrOqD+FAIyT15VXqMkTGt /PIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ddcyXoit; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a170902a3c700b001b8a8f359fcsi6385939plb.208.2023.07.13.21.23.11; Thu, 13 Jul 2023 21:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ddcyXoit; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234875AbjGND7q (ORCPT + 99 others); Thu, 13 Jul 2023 23:59:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232628AbjGND7o (ORCPT ); Thu, 13 Jul 2023 23:59:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EF3A1FD8 for ; Thu, 13 Jul 2023 20:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689307140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z0IXrRel0Jf5sI6yYnB7ussn8KJNTKMqE2zSLssKxOs=; b=ddcyXoitP7tXQ0P6AR9Kutjwt7zLz6VFa4jvDbDT9heWVmWw9i6hydBHek+RozusxKJobh wuH5PCtqvOvuT0GaOCxeO6WcR7TQsw4K/aJ1cNkweC8O2MSikowwNXgGTzjjXQ8IcOLEUX yb/mEOmgC0m0ZJTdQLuM0wupYq1w4uM= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-5rByVKtrMceCpmqQQ6CwgA-1; Thu, 13 Jul 2023 23:58:58 -0400 X-MC-Unique: 5rByVKtrMceCpmqQQ6CwgA-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2b69825cca2so14511671fa.1 for ; Thu, 13 Jul 2023 20:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689307137; x=1691899137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z0IXrRel0Jf5sI6yYnB7ussn8KJNTKMqE2zSLssKxOs=; b=HOsCoKD2n7dheio4mF7mOZV0CAWBV0SoRMp/lk/uMrARhBs5b5sOm4Ws55i7nk7sPb SsxLiOeZE/aaDk5rDct9Jw+Kvo+4ZfzonJOYvrkBXhVYalOyZD+O41x7bSb/gNaE6/28 wT8LnAdjW8PTwIBJntVBok34vKgIuOdNQGvgowOyv1QuKPrpmtpCkuX/hBsd6qGXGyyE vziQV6C294ChjWWiKxNe8cdddzAw5+qKvBDAswxJkVpIvg4p5rJsWjOoWDm9DkVH24yc 9ONXeHRAPSKLXE5GILQq15S3+OQhhJPneRgSJ13NW68+QLpKY6LZulcyY5k+fnbwDQka BYhQ== X-Gm-Message-State: ABy/qLYflKLeeJebH+Y5HcVM2eSy5t2aAdRdQ5SiEM6kBvPlE7eUf+Gd udPi1xnd6VpoNzA2l8zEaR2YFjmwU99djf6W+RHIacsgunsYj8WJlrRfVm60ecb3agjOTMu/NXG coolXH5bQRHoaywnnpU4eMregsbAEbadDXESLmZWW X-Received: by 2002:a2e:2c11:0:b0:2b4:8446:82a9 with SMTP id s17-20020a2e2c11000000b002b4844682a9mr541700ljs.17.1689307137503; Thu, 13 Jul 2023 20:58:57 -0700 (PDT) X-Received: by 2002:a2e:2c11:0:b0:2b4:8446:82a9 with SMTP id s17-20020a2e2c11000000b002b4844682a9mr541689ljs.17.1689307137231; Thu, 13 Jul 2023 20:58:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jason Wang Date: Fri, 14 Jul 2023 11:58:46 +0800 Message-ID: Subject: Re: [PATCH v2 net] gso: fix dodgy bit handling for GSO_UDP_L4 To: Yan Zhai Cc: "open list:NETWORKING [TCP]" , kernel-team@cloudflare.com, Eric Dumazet , "David S. Miller" , David Ahern , Jakub Kicinski , Paolo Abeni , Marcelo Ricardo Leitner , Xin Long , Herbert Xu , Andrew Melnychenko , Willem de Bruijn , open list , "open list:SCTP PROTOCOL" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 14, 2023 at 1:28=E2=80=AFAM Yan Zhai wrote= : > > Commit 1fd54773c267 ("udp: allow header check for dodgy GSO_UDP_L4 > packets.") checks DODGY bit for UDP, but for packets that can be fed > directly to the device after gso_segs reset, it actually falls through > to fragmentation: > > https://lore.kernel.org/all/CAJPywTKDdjtwkLVUW6LRA2FU912qcDmQOQGt2WaDo28K= zYDg+A@mail.gmail.com/ > > This change restores the expected behavior of GSO_UDP_L4 packets. > > Fixes: 1fd54773c267 ("udp: allow header check for dodgy GSO_UDP_L4 packet= s.") > Suggested-by: Willem de Bruijn > Signed-off-by: Yan Zhai > > --- > v2: dropped modifications to tcp/sctp on DODGY bit removal after > validating gso_segs. Also moved the UDP header check into > __udp_gso_segment (per Willem's suggestion). > Acked-by: Jason Wang Thanks