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 DDA5D43BDD; Mon, 26 Feb 2024 03:57:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8C83402B2; Mon, 26 Feb 2024 03:57:15 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 5614140271 for ; Mon, 26 Feb 2024 03:57:14 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TjlWz4PM5z1S5GZ; Mon, 26 Feb 2024 10:52:15 +0800 (CST) Received: from kwepemd100004.china.huawei.com (unknown [7.221.188.31]) by mail.maildlp.com (Postfix) with ESMTPS id 5CB881A016B; Mon, 26 Feb 2024 10:57:12 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Mon, 26 Feb 2024 10:57:11 +0800 Message-ID: Date: Mon, 26 Feb 2024 10:57:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 1/7] ethdev: support report register names and filter To: Stephen Hemminger CC: , , , , , References: <20231214015650.3738578-1-haijie1@huawei.com> <20240220105823.570841-1-haijie1@huawei.com> <20240220105823.570841-2-haijie1@huawei.com> <20240220071405.05e4fb6e@hermes.local> From: Jie Hai In-Reply-To: <20240220071405.05e4fb6e@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemd100004.china.huawei.com (7.221.188.31) 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 2024/2/20 23:14, Stephen Hemminger wrote: > On Tue, 20 Feb 2024 18:58:17 +0800 > Jie Hai wrote: > >> @@ -20,6 +25,12 @@ struct rte_dev_reg_info { >> uint32_t length; /**< Number of registers to fetch */ >> uint32_t width; /**< Size of device register */ >> uint32_t version; /**< Device version */ >> + /** >> + * Filter for target subset of registers. >> + * This field could affects register selection for data/length/names. >> + */ >> + char *filter; >> + struct rte_eth_reg_name *names; /**< Registers name saver */ >> }; > > filter and names should be const, i.e won't get modified by call. > . The "filter" can be a pointer to a const string. It's OK to add const. The "names" could be modified. The APPs are free to assign space for regisger names and "names" point to the first element. And the ethdev and drivers are free to modifiy each element.