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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS 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 1E06AC43381 for ; Tue, 26 Feb 2019 18:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C62B62173C for ; Tue, 26 Feb 2019 18:38:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U63fik62" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728996AbfBZSii (ORCPT ); Tue, 26 Feb 2019 13:38:38 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35666 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729035AbfBZSii (ORCPT ); Tue, 26 Feb 2019 13:38:38 -0500 Received: by mail-ed1-f67.google.com with SMTP id g19so11653880edp.2 for ; Tue, 26 Feb 2019 10:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sItE9Mxag3jq37PfnOpzbP0eYAvQyr62aBY8GIYqSwo=; b=U63fik621q5awSt5pKMLWK38GF3licuo9xqlrX3vU4xIp18s2YWp/c9Y4e9lFGC3xd 62KPebXUk8tF/OmioBFuNKzjKk5+NLAdRjO/xkE3f5WQbvyKPgPf4pGu0vThi+LpZFZV zN7CucGzyqZyg2GfXaw/KA17tnnPtLNnBjwcvOH2EWK9xqI25WrmbJF9fkQ+phj3lAiO 1g3y7vS2mhLUST83ML5eueV/6Rr4Op1uRQTDXbI4tbbUB/b3dc7ImeoLcWtQwMEE/h/L Vle1Wo3FY29weqq+d6on7TQqxVTs9V8HKcblv+WeOqvQnzRAkvZCpjG9zcrVPxbm6qxI 6ohA== 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=sItE9Mxag3jq37PfnOpzbP0eYAvQyr62aBY8GIYqSwo=; b=qycwVKF1zthVjy8Whbj/qWfN0p6anjuG/1JReEn5SIWYjD7AjJ7T5jKKxMVrHrCtUY hDl03EwlgE82JfXVGGVXhfw3p03gyNc6DOL5/ZDsLL3GkSBv2X2Xf/oigb5jZsiFgqr/ p4myTFxbmLgzPGjgFk9d6Wqs/yAb82Y63azIjWN5o6MgmEO3xIGCahoKgvxb60CEfnzg FksjGgHQJ8Rh4TKQOqQadmy9iZZbXhpP1AfxBz4R9BzbtV8O+UHBEMNQdShtoziZymSp 3iHIe/DsV46a8OnG7vPIILe14XND7ap+Gjj0tezb9OPMwoeFnaUQZn4ZJ7GlItrjFnhu gYRw== X-Gm-Message-State: AHQUAuZH0n/R/6aCvpNb6ts+ju/jrPBj5vATjGMT98Sl3JM7DIo9qiYZ 53OSE21cVZYnc/nF237oAdrzjO6HdgGCcVC//F0= X-Google-Smtp-Source: AHgI3IZvY3vndJS5jDDqGha+NUGDKmQzbWBEbM5eQ9Juh6G0sUANATGDcxangoz2FnWt8HOLybEhAWIDZJxJNuqwa/Y= X-Received: by 2002:a50:b16d:: with SMTP id l42mr19736792edd.98.1551206316277; Tue, 26 Feb 2019 10:38:36 -0800 (PST) MIME-Version: 1.0 References: <2b1f4d9fe21346bc9f85c096e1b0922e4ff3c19d.1551173111.git.pabeni@redhat.com> In-Reply-To: <2b1f4d9fe21346bc9f85c096e1b0922e4ff3c19d.1551173111.git.pabeni@redhat.com> From: Willem de Bruijn Date: Tue, 26 Feb 2019 13:38:00 -0500 Message-ID: Subject: Re: [PATCH net] selftests: fixes for UDP GRO To: Paolo Abeni Cc: Network Development , "David S. Miller" , Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Feb 26, 2019 at 9:28 AM Paolo Abeni wrote: > > The current implementation for UDP GRO tests is racy: the receiver > may flush the RX queue while the sending is still transmitting and > incorrectly report RX errors, with a wrong number of packet received. > > Add explicit timeouts to the receiver for both connection activation > (first packet received for UDP) and reception completion, so that > in the above critical scenario the receiver will wait for the > transfer completion. > > Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") > Signed-off-by: Paolo Abeni Acked-by: Willem de Bruijn --- This is because of that "force termination after the second poll()"? Could perhaps also just extend do_recv to wait while (!interrupted && tnow < tstart + 2000) and avoid the explicit arguments.