From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2A8BBA0548; Tue, 31 May 2022 17:18:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10D954067B; Tue, 31 May 2022 17:18:46 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3AFBB40143 for ; Tue, 31 May 2022 17:18:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654010323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BdY5LDPDfi2QppS1bYjdxdd2PDbb3/wGogoNSK8nxOU=; b=Y7ITi8Fg5X05nbsTez83zrVWgVLivaBYhLMP6WBo60pt48782tQVd7JAq7Txzdpo/hSI8G ylMHFb2mWSYj416qqzTN0EM2z9vqVwYZhjWqGjsKokIhxCUkkrC5Xq0C165/BFPGWWWJU9 hfangTfTwtXRJvA+MekoI9lakkcYAGM= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-351-7m5dR3oHPseZc8n6UJIvKA-1; Tue, 31 May 2022 11:18:42 -0400 X-MC-Unique: 7m5dR3oHPseZc8n6UJIvKA-1 Received: by mail-lf1-f70.google.com with SMTP id k6-20020a0565123d8600b0047863fc54b9so6880728lfv.16 for ; Tue, 31 May 2022 08:18:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BdY5LDPDfi2QppS1bYjdxdd2PDbb3/wGogoNSK8nxOU=; b=KjJAZQrDKEDR/zJPGFuRLKUPT43/m6gRnUeUDPDzvqqaXGabDOqUYrbszNDv5PVdlG ReqkVzjeJq24LIZ83LhRE7mreOqCm00NYX8OVCrUd0BYWKb31wPld6SMQSQDTmWftWal +399FPLSfc/oL4IvF4hw0Z9JAg0L3TOysVSQvrvm5Fe9JfiuNzSvGjpsw2POLmf9DCCW Z8ZIpoXItvodogjgkFrOq/j8L/JFJy+p8hj6dMo9W5CPxnI04LX3YvNoSkK0PoZ55qhr w/goT2RMW3gfEURfIhngSfd2nyPN5kdRK2hZGLi+4xO0AlsKcfPaMNuRhxTCf16f0f66 mG1A== X-Gm-Message-State: AOAM533OWCcAZ4fkkC2IyWgSXbHQeuSyfX3rMI3AC6oRUD5bVh2zW9kK BSODmJL89DA0VkzsW5n4E17ipUnZBClmwL8mxSpPTV0UTiQKv1VLJntiAVldqzQ5JkccO5LwCQD wAoYrN9F85Gq3cLm+4pg= X-Received: by 2002:a2e:3e1a:0:b0:253:ed91:bd3b with SMTP id l26-20020a2e3e1a000000b00253ed91bd3bmr25916143lja.55.1654010320840; Tue, 31 May 2022 08:18:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIFLXr1q5ZJQYDN5sE2X0jG0KI70FIoB3jg8tMepRToz/0EMsR1APwbbS2f8ijzsPiET6VA6rC91rO4/bb2Mo= X-Received: by 2002:a2e:3e1a:0:b0:253:ed91:bd3b with SMTP id l26-20020a2e3e1a000000b00253ed91bd3bmr25916128lja.55.1654010320600; Tue, 31 May 2022 08:18:40 -0700 (PDT) MIME-Version: 1.0 References: <20220513075718.18674-1-david.marchand@redhat.com> <20220524200642.1322115-1-david.marchand@redhat.com> <20220524200642.1322115-3-david.marchand@redhat.com> <1859176.gKo4GoxMFQ@thomas> <265f67d0-126c-63cb-e8fd-a02239af9888@oktetlabs.ru> In-Reply-To: <265f67d0-126c-63cb-e8fd-a02239af9888@oktetlabs.ru> From: David Marchand Date: Tue, 31 May 2022 17:18:28 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] app/testpmd: register driver specific commands To: Andrew Rybchenko Cc: Thomas Monjalon , dev , Ferruh Yigit , Xiaoyun Li , Aman Singh , Yuying Zhang , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, May 31, 2022 at 5:14 PM Andrew Rybchenko wrote: > > On 5/24/22 23:28, Thomas Monjalon wrote: > > 24/05/2022 22:06, David Marchand: > >> + count = 0; > >> + for (i = 0; builtin_ctx[i] != NULL; i++, count++) > >> + ; > >> + TAILQ_FOREACH(c, &driver_commands_head, next) { > >> + for (i = 0; c->commands[i].ctx != NULL; i++, count++) > >> + ; > >> + } > > > > Just a personal preference: > > the iterator "i" is incremented inside the "for" instructions, > > but I would have incremented "count" as a statement of the loops. > > Since I dislike loops with empty body as well, I'll change it on > applying. I am fine with the proposed form. Thanks Andrew. -- David Marchand