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 8BFEF425CA; Mon, 18 Sep 2023 07:11:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B57E402E8; Mon, 18 Sep 2023 07:11:37 +0200 (CEST) Received: from VLXDG1SPAM1.ramaxel.com (email.unionmem.com [221.4.138.186]) by mails.dpdk.org (Postfix) with ESMTP id B0A4440263 for ; Mon, 18 Sep 2023 07:11:35 +0200 (CEST) Received: from V12DG1MBS03.ramaxel.local ([172.26.18.33]) by VLXDG1SPAM1.ramaxel.com with ESMTP id 38I5BTam009520; Mon, 18 Sep 2023 13:11:29 +0800 (GMT-8) (envelope-from wanry@3snic.com) Received: from [10.64.136.151] (10.64.136.151) by V12DG1MBS03.ramaxel.local (172.26.18.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.17; Mon, 18 Sep 2023 13:11:28 +0800 Message-ID: <517233ca-2067-4ad3-b22c-c4cd2fbcf883@3snic.com> Date: Mon, 18 Sep 2023 13:11:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 08/32] net/sssnic/base: add work queue To: Stephen Hemminger CC: , , Steven Song References: <20230904045658.238185-1-wanry@3snic.com> <20230904045658.238185-9-wanry@3snic.com> <20230917193350.5f56284d@hermes.local> From: Renyong Wan In-Reply-To: <20230917193350.5f56284d@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.64.136.151] X-ClientProxiedBy: V12DG1MBS03.ramaxel.local (172.26.18.33) To V12DG1MBS03.ramaxel.local (172.26.18.33) X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: VLXDG1SPAM1.ramaxel.com 38I5BTam009520 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 Hello Stephen,  I'll fix it next version. On 2023/9/18 10:33, Stephen Hemminger wrote: > On Mon, 4 Sep 2023 12:56:34 +0800 > wrote: > >> +void * >> +sssnic_workq_consume(struct sssnic_workq *workq, uint16_t num_entries, >> + uint16_t *ci) >> +{ >> + void *e; >> + uint16_t current_ci; >> + >> + if (workq->idle_entries + num_entries > workq->num_entries) >> + return NULL; >> + >> + current_ci = sssnic_workq_ci_get(workq); >> + e = (void *)sssnic_workq_entry_get(workq, current_ci); > Minor nit: cast to void * is not normally necessary in C. > Compiler will do it for you. -- Regards, Renyong Wan