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 E70C8A0562; Wed, 14 Apr 2021 12:09:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D44D11611F0; Wed, 14 Apr 2021 12:09:26 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 34782160EB6 for ; Wed, 14 Apr 2021 12:09:25 +0200 (CEST) IronPort-SDR: XuhlhLJRRYcgdrxq5kzyrmIjVfdAKnaOqbZDrF6+rXwUkeYGbGOMsWEPoFB/Ea6Dz+3xzKU9AZ 2QgB81+3GSHQ== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="174715098" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="174715098" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 03:09:24 -0700 IronPort-SDR: OT9z646J70m8sa/liQ6ACDpFSnImrcrcfhihxBpi6OeKlEDX1gjmy9cvbzHe5rifqAYprj4EFm tF9gvf/wEF9Q== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="461156792" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.205.34]) ([10.213.205.34]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 03:09:22 -0700 To: Stephen Hemminger , oulijun Cc: dev@dpdk.org, Thomas Monjalon References: <1616070332-63414-1-git-send-email-oulijun@huawei.com> <1616670560-62333-1-git-send-email-oulijun@huawei.com> <3dfa2e6b-91b2-da43-a20a-84b8de362fad@huawei.com> <20210405185510.02ee53fb@hermes.local> From: Ferruh Yigit X-User: ferruhy Message-ID: <12555699-83c4-2a7b-a34e-52f103b09561@intel.com> Date: Wed, 14 Apr 2021 11:09:19 +0100 MIME-Version: 1.0 In-Reply-To: <20210405185510.02ee53fb@hermes.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH V2] ethdev: add queue state when retrieve queue information 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 Sender: "dev" On 4/6/2021 2:55 AM, Stephen Hemminger wrote: > On Tue, 6 Apr 2021 08:49:04 +0800 > oulijun wrote: > >>> /** >>> + * RX/TX queue states >>> + */ >>> +#define RTE_ETH_QUEUE_STATE_STOPPED 0 >>> +#define RTE_ETH_QUEUE_STATE_STARTED 1 >>> +#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 > > These could be an enum? > These values are already used to assign to 'rte_eth_dev_data->[rt]x_queue_state', which are 'uint8_t', end we can't change them to 'enum' because of ABI concerns, so I think we can keep them as it is. >>> +/** >>> * Ethernet device RX queue information structure. >>> * Used to retrieve information about configured queue. >>> */ >>> @@ -1591,6 +1598,8 @@ struct rte_eth_rxq_info { >>> uint8_t scattered_rx; /**< scattered packets RX supported. */ > > There is a one byte hole here waiting to be used. > Why not use that? > +1 >>> uint16_t nb_desc; /**< configured number of RXDs. */ >>> uint16_t rx_buf_size; /**< hardware receive buffer size. */ >>> + /**< Queues state: STARTED(1) / STOPPED(0). */ >>> + uint8_t queue_state; >>> } __rte_cache_min_aligned;