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 56F0DA0548; Tue, 31 May 2022 17:14:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26FFC4067B; Tue, 31 May 2022 17:14:53 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id EEBAC40143 for ; Tue, 31 May 2022 17:14:50 +0200 (CEST) Received: from [192.168.1.38] (unknown [188.170.81.145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 0C45186; Tue, 31 May 2022 18:14:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0C45186 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1654010090; bh=NuJK7kUw34jCLPHACV0uMT1WnszW/WLOmwCHaCOf240=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=clnuKw96MgprUzjMNCLeMBwKGs1JyFuaS65+oHYc4Lf9fm+2gDDeOzhBcU8vppdVW rlMagYi8jpWS6EOrEwxK1jJZz3wcQgLrJ+0WIyhA+A6rIN/X8lNy6lYtLYNBMK2Opv K8FeuEf4kzRUgjDotqU2K9jDzRVyHzwFSQFEpFVY= Message-ID: <265f67d0-126c-63cb-e8fd-a02239af9888@oktetlabs.ru> Date: Tue, 31 May 2022 18:14:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2 2/2] app/testpmd: register driver specific commands Content-Language: en-US To: Thomas Monjalon , David Marchand Cc: dev@dpdk.org, ferruh.yigit@xilinx.com, Xiaoyun Li , Aman Singh , Yuying Zhang , Bruce Richardson 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> From: Andrew Rybchenko In-Reply-To: <1859176.gKo4GoxMFQ@thomas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 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. > > Acked-by: Thomas Monjalon > > Thanks > > Acked-by: Andrew Rybchenko