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 E1176A0540; Wed, 21 Sep 2022 13:22:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D488C4067C; Wed, 21 Sep 2022 13:22:52 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 9E3474014F for ; Wed, 21 Sep 2022 13:22:51 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MXbYD3QyqzpStm; Wed, 21 Sep 2022 19:20:00 +0800 (CST) Received: from [10.67.103.235] (10.67.103.235) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 19:22:48 +0800 Subject: Re: [PATCH v2 3/6] app/procinfo: add module info dump To: Stephen Hemminger References: <20220722091236.15469-1-liudongdong3@huawei.com> <20220920105148.7664-1-liudongdong3@huawei.com> <20220920105148.7664-4-liudongdong3@huawei.com> <20220920082229.17a642f4@hermes.local> CC: , , , , , "Min Hu (Connor)" , Maryam Tahhan From: Dongdong Liu Message-ID: <04273e59-7197-a05c-1985-e8a0a9e35686@huawei.com> Date: Wed, 21 Sep 2022 19:22:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20220920082229.17a642f4@hermes.local> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.235] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 2022/9/20 23:22, Stephen Hemminger wrote: > On Tue, 20 Sep 2022 18:51:44 +0800 > Dongdong Liu wrote: > >> + >> + RTE_ETH_FOREACH_DEV(i) { >> + /* Skip if port is not in mask */ >> + if ((enabled_port_mask & (1ul << i)) == 0) >> + continue; >> + >> + if (!rte_eth_dev_is_valid_port(i)) >> + continue; > > There is no way RTE_ETH_FOREACH_DEV would iterate > over an invalid port. If it did the macro would be seriously > broken. > > That code is unnecessary. Good point, will delete the code. Thanks, Dongdong > . >