From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] ethdev: add lock-less txq capability flag Date: Mon, 24 Apr 2017 14:34:59 +0200 Message-ID: <1937111.PEUejtoCqE@xps> References: <20170421122223.24194-1-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com To: Jerin Jacob Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 061982B9B for ; Mon, 24 Apr 2017 14:35:01 +0200 (CEST) In-Reply-To: <20170421122223.24194-1-jerin.jacob@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/04/2017 14:22, Jerin Jacob: > if this flag is advertised by a PMD, Multiple threads can > invoke rte_eth_tx_burst() concurrently on the same tx queue > without SW lock. This is an HW feature found in some NICs > and useful in the following use cases if HW supports it. Which hardware supports it? [...] > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > +#define DEV_TX_OFFLOAD_TXQ_MT_LOCKFREE 0x00004000 > +/**< Multiple threads can invoke rte_eth_tx_burst() concurrently on the > same + * tx queue without SW lock. > + */ Why TXQ in the name? DEV_TX_OFFLOAD_MT_LOCKFREE would be enough. I wonder whether "lock free" wording is confusing because the locks are probably handled in HW. I think the good wording is "offloaded multi-thread capability", maybe with a naming like DEV_TX_OFFLOAD_MT. Anyway we should reference this flag in rte_eth_tx_burst() and give more details in doc/guides/prog_guide/poll_mode_drv.rst. Should we wait a first hardware PoC to add this flag? Candidate for 17.08?