From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44F53A04BF; Thu, 3 Sep 2020 17:38:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66DB01C0D5; Thu, 3 Sep 2020 17:35:34 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 140CB1C0CD for ; Thu, 3 Sep 2020 17:35:31 +0200 (CEST) IronPort-SDR: pHu0LvxBoQGLRr+hdUeH4vwDf3qFGqXooqFbGllDSTpxC3rF52x17yATvsMvboA4/6yh0DQ1P9 U73V+tIrBmlg== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="137115763" X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="137115763" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 08:35:31 -0700 IronPort-SDR: VQA6j3g0PkKH25AWVtjiXLEh+F08BOPaa41FMqxWgwOpjLU6GibAxvC+pPKHO6a2vMAqqBBeR6 gMMbClJmrSOw== X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="503103410" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.24.168]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 03 Sep 2020 08:35:29 -0700 Date: Thu, 3 Sep 2020 16:35:26 +0100 From: Bruce Richardson To: Chengchang Tang Cc: dev@dpdk.org, linuxarm@huawei.com, thomas@monjalon.net, arybchenko@solarflare.com, ferruh.yigit@intel.com, wenzhuo.lu@intel.com, maryam.tahhan@intel.com Message-ID: <20200903153526.GB1621@bricha3-MOBL.ger.corp.intel.com> References: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> <1598685199-1630-1-git-send-email-tangchengchang@huawei.com> <1598685199-1630-2-git-send-email-tangchengchang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1598685199-1630-2-git-send-email-tangchengchang@huawei.com> Subject: Re: [dpdk-dev] [PATCH v3 1/4] ethdev: add a field for rxq info structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Sat, Aug 29, 2020 at 03:13:16PM +0800, Chengchang Tang wrote: > Add a field named rx_buf_size in rte_eth_rxq_info to indicate the buffer > size used in receiving packets for HW. > > In this way, upper-layer users can get this information by calling > rte_eth_rx_queue_info_get. > > Signed-off-by: Chengchang Tang > Reviewed-by: Wei Hu (Xavier) > Acked-by: Andrew Rybchenko > --- > lib/librte_ethdev/rte_ethdev.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > index 70295d7..9fed5cb 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -1420,6 +1420,8 @@ struct rte_eth_rxq_info { > struct rte_eth_rxconf conf; /**< queue config parameters. */ > uint8_t scattered_rx; /**< scattered packets RX supported. */ > uint16_t nb_desc; /**< configured number of RXDs. */ > + /**< buffer size used for hardware when receive packets. */ > + uint16_t rx_buf_size; > } __rte_cache_min_aligned; > Since this is breaking the ABI, this looks like the perfect opportunity to add in a qinfo_size parameter to rte_eth_rx_queue_info_get() call which allows ABI sanity-checking. Also, if passed through to the individual drivers, allows them to make ABI determinations since driver functions cannot be versioned, i.e. the driver info function cannot know whether it has been called by queue_info_v21 or queue_info_v22. /Bruce