From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67BA1C43617 for ; Mon, 12 Apr 2021 16:50:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43FA760FED for ; Mon, 12 Apr 2021 16:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343795AbhDLQuR (ORCPT ); Mon, 12 Apr 2021 12:50:17 -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-Google-Smtp-Source: ABdhPJz9fBvbM4XHx1uojO8mBo3giiBwXBSUd5XBxlO6lGGJeZqumr+MM9otn8fqTpoUMRG3aT5MrZr6iB1Be3zOJrc= 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) {