Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EFCCC636CC for ; Tue, 31 Jan 2023 23:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232041AbjAaXLW (ORCPT ); Tue, 31 Jan 2023 18:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbjAaXLU (ORCPT ); Tue, 31 Jan 2023 18:11:20 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A93594ED23 for ; Tue, 31 Jan 2023 15:11:16 -0800 (PST) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D8F1641AB7 for ; Tue, 31 Jan 2023 23:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1675206672; bh=od+H8iRL7U/hEgOt5OEJuPafvt2sARzXNu/6vCcYVbk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=QMJmu/G2Z5m2PSePmMxWDlAcsfSQZIBvs08F51WQd//es2pyqJBHgtogBwReIiROH QqI2FX3Pc1YHA3dDWenYHe0Nfi0gUfI04ydd+KtIz+WYfc3gqQrTYOzuwCNqmv7M+L L9Td/eigT/pRDpgrdo8wZKJX7tiXiBlGOmCMXXdY838ZVVrvMKGFdAMwejHzXZzDTn aynHy5tcsH0fImKwA7nRIq1GKgy8L0gY9iUCAtf8cfxTE6/S33LBETTvtpxgQgg7WJ VAG3lGMhUBD97ltXg5HyZ+K6D7iGNfvTGWfHyYtTtR9plwdM2znQNipucZ/oUIXIbv eErWl3V3clvFA== Received: by mail-wm1-f70.google.com with SMTP id l38-20020a05600c1d2600b003ddff4b9a40so81081wms.9 for ; Tue, 31 Jan 2023 15:11:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=od+H8iRL7U/hEgOt5OEJuPafvt2sARzXNu/6vCcYVbk=; b=aJ1q5m03p8MgSIqi3qJ/F5ZZssfefpMpAQbpwayqNBwgfgShRCsbJk9E+6C5yooCir fnYqIhLI0jniMMpR1IkKhff3E6LQFkjKbuvo2wIlB2yseA1OsvWXyj/pyA7lfzt4Y5yV hN3lZ74hoI3RSQLYLwW46ZQxsZXWqWfZNBRwNFPgUR+gx1+G3FS6FbPw4LpFxCo+zWzW ZsO0We3NPlwZB/aqaDqoBz1l62A/Rhtp6unCSzkI01bSlbhLKqmQrVW9HQi+LGTglyWt CudKDl14vv7T78U3ShDGbiyYeNL08KUr2rnIyiGBRri/gAcSJPrRro1kBG6xWTTfKKgO eVCg== X-Gm-Message-State: AO0yUKXhjTn0sRXw12LKOvxFWv3n/Zipw5PueZMSgrAkDzE8+J99BRl4 IlWrWL6gGmn0hToBYLf2jnm1InUOo77PIjGgBj5X/0fqg3dPs3Fgqs2/5yinsrYvnkIGbq75kN/ IiiwaBvPyEYQkL9AYw69HBz3YX83971evkM5oAI6rrg== X-Received: by 2002:a05:6000:1561:b0:2bf:eb67:4774 with SMTP id 1-20020a056000156100b002bfeb674774mr957195wrz.11.1675206669981; Tue, 31 Jan 2023 15:11:09 -0800 (PST) X-Google-Smtp-Source: AK7set+UghtwG5i6RKk6gUXdtXT/2iCWC9F9Q8LwQyUgDAkiThUw4PdcBKNkwWZzCmZP4Bi8M/VSCA== X-Received: by 2002:a05:6000:1561:b0:2bf:eb67:4774 with SMTP id 1-20020a056000156100b002bfeb674774mr957170wrz.11.1675206669737; Tue, 31 Jan 2023 15:11:09 -0800 (PST) Received: from qwirkle ([81.2.157.149]) by smtp.gmail.com with ESMTPSA id x7-20020a5d6b47000000b002bbed1388a5sm15947931wrw.15.2023.01.31.15.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 15:11:09 -0800 (PST) Date: Tue, 31 Jan 2023 23:11:07 +0000 From: Andrei Gherzan To: Willem de Bruijn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Fred Klassen , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 4/4] selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking Message-ID: References: <20230131210051.475983-4-andrei.gherzan@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/01/31 05:28PM, Willem de Bruijn wrote: > On Tue, Jan 31, 2023 at 5:16 PM Andrei Gherzan > wrote: > > > > On 23/01/31 04:51PM, Willem de Bruijn wrote: > > > On Tue, Jan 31, 2023 at 4:01 PM Andrei Gherzan > > > wrote: > > > > > > > > The test tool can check that the zerocopy number of completions value is > > > > valid taking into consideration the number of datagram send calls. This can > > > > catch the system into a state where the datagrams are still in the system > > > > (for example in a qdisk, waiting for the network interface to return a > > > > completion notification, etc). > > > > > > > > This change adds a retry logic of computing the number of completions up to > > > > a configurable (via CLI) timeout (default: 2 seconds). > > > > > > > > Fixes: 79ebc3c26010 ("net/udpgso_bench_tx: options to exercise TX CMSG") > > > > Signed-off-by: Andrei Gherzan > > > > Cc: Willem de Bruijn > > > > Cc: Paolo Abeni > > > > --- > > > > tools/testing/selftests/net/udpgso_bench_tx.c | 34 +++++++++++++++---- > > > > 1 file changed, 27 insertions(+), 7 deletions(-) > > > > > > > > diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net/udpgso_bench_tx.c > > > > index b47b5c32039f..ef887842522a 100644 > > > > --- a/tools/testing/selftests/net/udpgso_bench_tx.c > > > > +++ b/tools/testing/selftests/net/udpgso_bench_tx.c > > > > @@ -62,6 +62,7 @@ static int cfg_payload_len = (1472 * 42); > > > > static int cfg_port = 8000; > > > > static int cfg_runtime_ms = -1; > > > > static bool cfg_poll; > > > > +static int cfg_poll_loop_timeout_ms = 2000; > > > > static bool cfg_segment; > > > > static bool cfg_sendmmsg; > > > > static bool cfg_tcp; > > > > @@ -235,16 +236,17 @@ static void flush_errqueue_recv(int fd) > > > > } > > > > } > > > > > > > > -static void flush_errqueue(int fd, const bool do_poll) > > > > +static void flush_errqueue(int fd, const bool do_poll, > > > > + unsigned long poll_timeout, const bool poll_err) > > > > > > nit: his indentation looks off though > > > > This one I've missed but I couldn't find any guidelines on it. Could you > > clarify to me what this should be or point me to soem docs? Happy to fix > > otherwise. I'm currently using vim smartindent but it is definitely not > > in line with what is here already. > > It should align with the parameter above. Found the roots of the issue - tab stop was 4 so it was rendered confusing for me. I'll fix and resend including email prefix change (net vs net next) and the CC footers (they should be Cc: not CC:). > > https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings -- Andrei Gherzan