DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, 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,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev]  [PATCH] ethdev: add lock-less txq capability flag
Date: Fri, 21 Apr 2017 17:52:23 +0530	[thread overview]
Message-ID: <20170421122223.24194-1-jerin.jacob@caviumnetworks.com> (raw)

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.

1) Remove explicit spinlock in some application where cores
to tx queues are not mapped 1:1.
example: OVS has such instance
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L292
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L1821

2) In eventdev use case, Avoid dedicating a separate tx core
for transmit and thus enables more scaling as all workers
can transmit the packets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_ether/rte_ethdev.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index f9de9a2b6..696bc9d44 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -899,6 +899,10 @@ struct rte_eth_conf {
 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO     0x00000800    /**< Used for tunneling packet. */
 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO   0x00001000    /**< Used for tunneling packet. */
 #define DEV_TX_OFFLOAD_MACSEC_INSERT    0x00002000
+#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.
+ */
 
 struct rte_pci_device;
 
-- 
2.12.2

             reply	other threads:[~2017-04-21 12:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 12:22 Jerin Jacob [this message]
2017-04-24 12:34 ` Thomas Monjalon
2017-04-27 11:00   ` Jerin Jacob
2017-07-05 17:46     ` Thomas Monjalon
2017-07-06  6:00       ` Jerin Jacob
2017-07-06  6:21 ` [dpdk-dev] [PATCH v2] ethdev: introduce lock-free " Jerin Jacob
2017-07-08 16:08   ` Thomas Monjalon
2017-07-10 16:56     ` Jerin Jacob
2017-07-10 16:59   ` [dpdk-dev] [PATCH v3 ] " Jerin Jacob
2017-07-13 12:02     ` Hemant Agrawal
2017-07-18 13:43       ` Thomas Monjalon
2017-07-13 18:42     ` santosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170421122223.24194-1-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).