Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp550420pxb; Thu, 12 Nov 2020 10:04:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLvO+PDioxkR72UMKJ9uXK3gTGtmdFVojLY64N0c8CjemSsIhFl073JitV0uNfG1EerYrl X-Received: by 2002:a19:230d:: with SMTP id j13mr231531lfj.378.1605204249256; Thu, 12 Nov 2020 10:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605204249; cv=none; d=google.com; s=arc-20160816; b=wx+ePhUjyg5tioiNR/Z48v4XR4TUd3G0uVY0a4Q8TwO2YR0VLL0d2rpqCZQ0FAJCOG zXLJ3uvf7y/GZSariMfO5w43PSLwXODcozx1/+Da2Yrk6yBFPhjaB3o8iQ3w0RaXgJLj r+q/tzKOUeVMb/DfghW+X8GpfPE5sIm0MQcgpyUWJ3WnoxJJa7WqtJan/prL4HGee9Wl iQLfJaTfbdosXmxcRZfGDHp6mztdnm2QpelmNBnYhbxNI0nIo50icYFwNkodzj4L7DUm G88dpNyCP/vJDVz/aa8D0q+HtgU9wNcMuKmJgH1Jx5mzUzHe2a7e4LHlGr5n2QQo9ZXt gRHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gHyENq1du3xnzTx4MtyTNOeHLOQv/mh9OSfN/xActdw=; b=wJ/YbX8aHdsF8Cv7b5JdxKIQHvZuLHfj3+QEZVYC7GKDcxFn9DBlDExLoH0XemljWL a1M6isfjhMwMWIhLikLCNvazQzvCyqVZQgiZ9wWwVyIzF4bw35IDwXoAsM+yhiCy0JBu sZn/YHcALiYfqdN+noZNJF/xe3qQKMhDmr326Ue0wBXG4RDEn2adlnnU2GxC6CRgVpeC jnXkMgczjBSZ2RS0wfCEXEBvDVDexw5V6TUOjzCBPOL0uWXnJzJ9xwCFyLVFqfxKfejd qXa8r4gNhSoO4rxTYSIoTDieHfx0NdQm36Xm0v9rJnI6eGunDdN11IIRcg0WbqSZrLRh mKkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=by1iYEFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si4412175edr.174.2020.11.12.10.03.45; Thu, 12 Nov 2020 10:04:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=by1iYEFX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbgKLR7d (ORCPT + 99 others); Thu, 12 Nov 2020 12:59:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:60176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgKLR7Z (ORCPT ); Thu, 12 Nov 2020 12:59:25 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED55221D91; Thu, 12 Nov 2020 17:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605203964; bh=DrzPJU7X9mQG5qJGkraIwXGPVbKy/tkk8OIbI65fe6Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=by1iYEFXNmpRlaCTCFEnUAM98NkarClMGMBJWaQUNGZ7AkqTKNfUEI278xHhYKmWU ADhFkUoqXvJH5XkmFpgvnZ+ndFJ2Aj7zxHw5iszq0oZ9tr0NADJfB4FBUXW51n/Jc7 k+qPst9vT+/Aa8tVPnT8U4aPqR1F+BAaoJoY2PzY= Date: Thu, 12 Nov 2020 09:59:22 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Paolo Abeni , Willem de Bruijn , Steffen Klassert , Eric Dumazet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 net 0/2] net: udp: fix Fast/frag0 UDP GRO Message-ID: <20201112095922.5868d9a0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Nov 2020 20:44:08 +0000 Alexander Lobakin wrote: > While testing UDP GSO fraglists forwarding through driver that uses > Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order > iperf packets: > > [ ID] Interval Transfer Bitrate Jitter > [SUM] 0.0-40.0 sec 12106 datagrams received out-of-order > > Simple switch to napi_gro_receive() or any other method without frag0 > shortcut completely resolved them. > > I've found two incorrect header accesses in GRO receive callback(s): > - udp_hdr() (instead of udp_gro_udphdr()) that always points to junk > in "fast" mode and could probably do this in "regular". > This was the actual bug that caused all out-of-order delivers; > - udp{4,6}_lib_lookup_skb() -> ip{,v6}_hdr() (instead of > skb_gro_network_header()) that potentionally might return odd > pointers in both modes. > > Each patch addresses one of these two issues. > > This doesn't cover a support for nested tunnels as it's out of the > subject and requires more invasive changes. It will be handled > separately in net-next series. Applied, thanks!