Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2348776pxb; Mon, 12 Apr 2021 22:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjzp8p5aJJmr1uwM0AM1FuNLcTeaQhsOhljSp0YkkVku7qyHPp2ivO5v9ZZS/LvA0J16/3 X-Received: by 2002:a17:90a:a4c9:: with SMTP id l9mr3050707pjw.21.1618293473051; Mon, 12 Apr 2021 22:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618293473; cv=none; d=google.com; s=arc-20160816; b=SpvDxOzgRW5DqbmbK/hJlklrEgZ8L6jGBYigBcwMe5CQSqWapLyWIjWj8OFqCTCovH hPtGPzia037DfU7Kda0b+PVy05M6TX9OZ8k6hwJ2UtnL8+hueqIZuSDGEjF/hKoc+Uz3 DjwvXt+mfoSawujqPNXqHuLeQMwa41soGQ92ocm7vy9vPhv3By9ruKDXKGHd9J0xhbCg GMEBtUEwtz2KrEwFgCL3AcfudtO/mo7erI/IpQMk7gkGMtAZ6r/ZV4mn0SjTc7EYfdwX TjAeEPk9uiMKAEUTM77YhvhcIowzf6hoVC8OVKBoqlJvffc/QEsqHhPh+31fSLCRp04c VEtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8w9EURUSJ/JlzH1y4R+2PQ2Woxija1EBoUQCQMeXIhk=; b=pbJYY+Dwb1w9z2WkaUJjnX7WzKefEQx7hie49kehsbn9Tqlh95f3zTGLKEiyHycYyD 0lnn9oEeCWDvkpn/wswh+Df35b1ne22q5kvpftZ4dBiQSo6btQ2WNz9T8gRPka5BPSO/ Xs+dUV1o2oBVcLjDExFGRRpE1YxBgdxDmNkx0MNPEDDDGgJEOOI1mp4Stqt4pi0lapir 19IHGVahcSwHYPSwA+JCqaZroEG9qMfQs029T+61GkyKIPLUoWc2aKcQl32AXN9uyByH deevOcb6UhrLaNbAUBSCwBgfUBbDW3bRqptk6XXEkSRbLAiNwxpHdc9xEOzj7Rs/A/tT /Eow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Y8VPlPzK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m15si15187620pls.94.2021.04.12.22.57.40; Mon, 12 Apr 2021 22:57:53 -0700 (PDT) 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=@google.com header.s=20161025 header.b=Y8VPlPzK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343777AbhDLQuP (ORCPT + 99 others); Mon, 12 Apr 2021 12:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345717AbhDLQrs (ORCPT ); Mon, 12 Apr 2021 12:47:48 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859A2C061342 for ; Mon, 12 Apr 2021 09:47:21 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id 7so14836241qka.7 for ; Mon, 12 Apr 2021 09:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8w9EURUSJ/JlzH1y4R+2PQ2Woxija1EBoUQCQMeXIhk=; b=Y8VPlPzKH66v2WroMYwSo+VqXKTtIovqXmBxaR88iNXTknh/KKaMSLvqwXsRat50wb yD9jTZtrbKJCdBP6P4CZ03nPpfD0SAF81QcX/UECPZQZ0bWmlKODyyVSivXdoZKmRxuP 6APSXxsq6EtWmhYE1Ns92R+l8j/Solvv09wg64P+eMXzwOiIRDP8tXOiLbQgaRaRSdfQ r80xWyx/5PtBJCQJT/njtfZNZ9kUGbZqkJqZOzVnIcnkw1qTlhElP2Xa3X7h4oU6LHWy 0HwFUg2oluEWJC6CNw2uA4lJu5SFVGMQsVaQZgzO2+wpzS5IeAah0LZ2wN/8Ugn0aG8B xK3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8w9EURUSJ/JlzH1y4R+2PQ2Woxija1EBoUQCQMeXIhk=; b=qDKI3Njgx/VTSuNVwi64f8+OpacG6yu0GPEGPMQOnKQTJIoomwnfEHVb8b81BkL+Dh tGCaG0SZh71tpumoXS1SBAO8umZKP0+p+AYVkakcnRMxZ04zdnmhyXp52kRSPu+b86VY dlaLOk6oZxN1bU3VNJFJS44I74l+k+F2aZ8V9Ok+9TA52mps9Mc0n5l7Ie0lFnv+Uku3 GIkHnkCeAW2WuvuQl2gSAYSoVdmHzcPcRUzBpzkvncbo69OPKMEeYeAGZVAWIB8EN7LM weRXMC0J0Ls0lsFX2gM35dN2x/IlEm5Dx4p++ledrdBaXGuhKqsCR5X951Zy27Jdf4UP 1h/A== X-Gm-Message-State: AOAM530Dyodeqct90oVm9i7BeR5T+IzA5Gn8aes9bc6jijJq4JHuC4pP gTJWinLh9uSJ6zR5AzyDiOrwuuAwDBK24kPy71Jm7w== X-Received: by 2002:a05:6902:4d2:: with SMTP id v18mr38476903ybs.303.1618246039093; Mon, 12 Apr 2021 09:47:19 -0700 (PDT) MIME-Version: 1.0 References: <20210412051445.GA47322@roeck-us.net> In-Reply-To: From: Eric Dumazet Date: Mon, 12 Apr 2021 18:47:07 +0200 Message-ID: Subject: Re: Linux 5.12-rc7 To: Linus Torvalds Cc: Guenter Roeck , Xuan Zhuo , "Michael S. Tsirkin" , Linux Kernel Mailing List , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 6:31 PM Eric Dumazet wrote: > > On Mon, Apr 12, 2021 at 6:28 PM Linus Torvalds > wrote: > > > > On Sun, Apr 11, 2021 at 10:14 PM Guenter Roeck wrote: > > > > > > Qemu test results: > > > total: 460 pass: 459 fail: 1 > > > Failed tests: > > > sh:rts7751r2dplus_defconfig:ata:net,virtio-net:rootfs > > > > > > The failure bisects to commit 0f6925b3e8da ("virtio_net: Do not pull payload in > > > skb->head"). It is a spurious problem - the test passes roughly every other > > > time. When the failure is seen, udhcpc fails to get an IP address and aborts > > > with SIGTERM. So far I have only seen this with the "sh" architecture. > > > > Hmm. Let's add in some more of the people involved in that commit, and > > also netdev. > > > > Nothing in there looks like it should have any interaction with > > architecture, so that "it happens on sh" sounds odd, but maybe it's > > some particular interaction with the qemu environment. > > Yes, maybe. > > I spent few hours on this, and suspect a buggy memcpy() implementation > on SH, but this was not conclusive. > > By pulling one extra byte, the problem goes away. > > Strange thing is that the udhcpc process does not go past sendto(). This is the patch working around the issue. Unfortunately I was not able to root-cause it (I really suspect something on SH) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0824e6999e49957f7aaf7c990f6259792d42f32b..fd890a951beea03bdf24406809042666eb972655 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -408,11 +408,17 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi, /* Copy all frame if it fits skb->head, otherwise * we let virtio_net_hdr_to_skb() and GRO pull headers as needed. + * + * Apparently, pulling only the Ethernet Header triggers a bug on qemu-system-sh4. + * Since GRO aggregation really cares of IPv4/IPv6, pull 20 bytes + * more to work around this bug : These 20 bytes can not belong + * to UDP/TCP payload. + * As a bonus, this makes GRO slightly faster for IPv4 (one less copy). */ if (len <= skb_tailroom(skb)) copy = len; else - copy = ETH_HLEN + metasize; + copy = ETH_HLEN + sizeof(struct iphdr) + metasize; skb_put_data(skb, p, copy); if (metasize) {