ethdev: introduce lock-free Tx queue capability
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 10 Jul 2017 16:59:46 +0000 (22:29 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 18 Jul 2017 12:32:55 +0000 (15:32 +0300)
commit7146aa19aca1ae78a04f620fbedb64190c219409
treed216d3f4122930b67cada165e6c22bd3d0e1a1f4
parenta599eb31f2e477674fc6176cdf989ee17432b552
ethdev: introduce lock-free Tx queue capability

Introducing the DEV_TX_OFFLOAD_MT_LOCKFREE TX capability flag.
if a PMD advertises DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads
can invoke rte_eth_tx_burst() concurrently on the same tx queue without
SW lock. This PMD feature will be useful in the following use cases and
found in the OCTEON family of NPUs.

1) Remove explicit spinlock in some applications where lcores
to TX queues are not mapped 1:1.
example: OVS has such instance
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L299
https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L1859
See the the usage of tx_lock spinlock.

2) In the eventdev use case, avoid dedicating a separate TX core for
transmitting and thus enables more scaling as all workers can
send the packets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
doc/guides/nics/features/default.ini
doc/guides/prog_guide/poll_mode_drv.rst
lib/librte_ether/rte_ethdev.h