Commit Graph

325 Commits

Author SHA1 Message Date
Pavan Nikhilesh
6a697cf007 event/octeontx2: use opposite bucket for current chunk
Since TIM buckets are always aligned to 32B and our cache line size being
128B, we will always have a cache miss when reading current_chunk pointer.
Avoid the cache miss by storing the current_chunk pointer in the bucket
opposite to the current bucket.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
7c6e645b59 event/octeontx2: fix HW timer race condition
Fix HW race condition observed when timeout resolution is low (<5us).
When HW traverses a given TIM bucket it will clear chunk_remainder,
but since SW always decreases the chunk_remainder at the start of the
arm routine it might cause a race where SW updates chunk_remainder
after HW has cleared it that lead to nasty side effects.

Fixes: 95e4e4ec74 ("event/octeontx2: add timer arm timeout burst")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
3639b4ad20 event/octeontx: add appication domain validation
Add applicaton domain validation for OCTEON TX TIM vfs aka Event timer.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
a6d6f0afd0 net/octeontx: add application domain validation
Add domain validation for PKI and PKO vfs

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
b4134b2d31 common/octeontx: update mbox to version 1.1.3
Sync mail box data structures to version 1.1.3.
Add mail box version verification and defer initializing octeontx
devices if mail box version mismatches.
Update OCTEON TX limitaion with max mempool size used.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-11-26 07:49:30 +01:00
Pawel Modrak
85ff364f3b build: align symbols with global ABI version
Merge all versions in linker version script files to DPDK_20.0.

This commit was generated by running the following command:

:~/DPDK$ buildtools/update-abi.sh 20.0

Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20 23:05:39 +01:00
Anatoly Burakov
fbaf943887 build: remove individual library versions
Since the library versioning for both stable and experimental ABI's is
now managed globally, the LIBABIVER and version variables no longer
serve any useful purpose, and can be removed.

The replacement in Makefiles was done using the following regex:

	^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)?

(LIBABIVER := numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

The replacement for meson files was done using the following regex:

	^(#.*\n)?version\s*=\s*\d+\n(\s*\n)?

(version = numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

[David]: those variables are manually removed for the files:
- drivers/common/qat/Makefile
- lib/librte_eal/meson.build
[David]: the LIBABIVER is restored for the external ethtool example
library.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20 23:05:39 +01:00
Nipun Gupta
dbf63bd43a event/dpaa2: support ordered queue
Ordered queue is supported on DPAA2. Enable this case.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-11-08 16:40:29 +01:00
Kevin Traynor
5a4374e14c event/opdl: remove commented out code
Some variables are commented out. Remove them.

Fixes: d548ef513c ("event/opdl: add unit tests")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>
2019-11-08 16:40:29 +01:00
Andrzej Ostruszka
12bddd9134 event/octeontx2: clean LTO warnings
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized.  This patch silences these
warnings.

Exemplary compiler warning to suppress (with LTO enabled):
error: ‘chunk’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   bkt->current_chunk = (uintptr_t)chunk;

Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
2019-11-08 15:18:52 +01:00
Pavan Nikhilesh
ea8403d084 event/octeontx2: remove hot spots by prefetching data
Recent profiling revealed few hotspots in octeontx2 event device
driver add prefetch hints to reduce stalls.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-10-31 11:48:44 +01:00
Pavan Nikhilesh
23df006e9c event/octeontx2: use WFE while waiting for head
Use WFE to save power while waiting for tag to become head.

SSO signals EVENTI to allow cores to exit from wfe when they
are waiting for specific operations in which one of them is
setting HEAD bit in GWS_TAG.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-10-30 14:24:03 +01:00
Hemant Agrawal
8c83f28cc8 common/dpaax: move OF library from DPAA bus
This code is being shared by more than 1 type of driver.
Common is most appropriate place for it.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-23 16:43:08 +02:00
Bruce Richardson
524a0d5d66 build: enable extra warnings with meson
While meson always adds -Wall flag to C compiles, the make build adds extra
warning flags that are not present in the meson build. This addresses that
shortcoming by adding additional warning flags to our builds. The one
omission is the -Wcast-align flag, which though present in make gcc builds,
gives a lot of warnings/errors when used with clang.

The removed warning "-Wunused-parameter" is covered by the "-Wextra"
parameter so is unnecessary.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-10-24 01:03:30 +02:00
Nipun Gupta
c9d02b799d event/dpaa2: support Tx adapter
This patch adds the support of Tx adapter for DPAA2 platform

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-18 10:03:09 +02:00
Nipun Gupta
3835cc228f event/dpaa2: set priority as per DPCON device
This patch sets the priority of the dpcon dev, such that it is
within the supported range of dpcon

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-18 10:03:09 +02:00
Nipun Gupta
ba6c1aa294 event/dpaa: support Tx adapter
This patch adds the support of Tx adapter for DPAA1 platform

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-18 10:03:09 +02:00
Nipun Gupta
c37421a2d6 event/dpaa: fix number of supported atomic flows
The number of atomic flows supported was not returned correctly for
DPAA driver. This patch fixes the same.

Fixes: b08dc6430a ("event/dpaa: add queue config get/set")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-18 10:03:09 +02:00
Nipun Gupta
b21302a107 eventdev: add Tx flag for packets with same destination
This patch introduces a `flag` in the Eth TX adapter enqueue API.
Some drivers may support burst functionality only with the packets
having same destination device and queue.

The flag `RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST` can be used
to indicate this so the underlying driver, for drivers to utilize
burst functionality appropriately.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-18 10:03:08 +02:00
Hemant Agrawal
653242c337 event/dpaa2: add self test
This patch add support for testing dpaa2 eventdev self test
for basic sanity for parallel and atomic queues.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-05 15:39:31 +02:00
Nipun Gupta
68bc970461 event/dpaa2: add retry break in packet enqueue
The patch adds the break in the TX function, if it is failing
to send the packets out. Previously the system was trying
infinitely to send packet out.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2019-10-05 15:39:31 +02:00
Hemant Agrawal
febcd5a5b3 event/dpaa2: support destroy
This patch add support to destroy the event device

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-05 15:39:31 +02:00
Hemant Agrawal
fc0acd6ac5 event/dpaa2: remove conditional compilation
This patch removes the conditional compilation for
cryptodev event support from RTE_LIBRTE_SECURITY flag.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-05 15:39:31 +02:00
Hemant Agrawal
6f213fe940 event/dpaa2: fix default queue configuration
Test vector expect only one type of scheduling as default.
The old code is provide support scheduling types instead of default.

Fixes: 13370a3877 ("eventdev: fix inconsistency in queue config")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-10-05 15:39:31 +02:00
Pavan Nikhilesh
26351696ff event/octeontx2: fix Rx adapter capabilities
Octeontx2 SSO co-processor allows multiple ethernet device Rx queues
connected to a single Event device queue.
Fix the Rx adapter capabilities to allow application to configure
Rx queueus in n:1 ratio to event queues by adding
`RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ` as a capability.

Fixes: 37720fc1fb ("event/octeontx2: add Rx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-10-05 15:39:31 +02:00
Gage Eads
d02c470c87 event/sw: fix xstats reset value
The sw PMD implements xstats reset by having the xstat get operations
return a value to the statistic's value at the last reset. The value at the
last reset is maintained in the per-xstat reset_value field, but the PMD
was setting reset_value = current - reset_value instead of reset_value =
current.

Fixes: c1ad03df7a ("event/sw: support xstats")
Cc: stable@dpdk.org

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-10-05 15:39:31 +02:00
Nithin Dabilpuram
3b635472a9 net/octeontx2: support TSO offload
Add support to below TCP segmentation offloads for
96XX A1 onwards and 95xx B0 onwards.
- TCPv4, TCPv6
- VXLAN[v4 | v6][v4 | v6]
- GENEVE[v4 | v6][v4 | v6]

This patch also modifies a fastpath function to be forced
inline due to performance reasons for multi-seg mode.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-10-08 12:14:31 +02:00
Akhil Goyal
b0f66a68ca event/dpaa: support crypto adapter
event dpaa device support both ethernet as well as
crypto queues to be attached to it. eth_rx_adapter
provide infrastructure to attach ethernet queues and
crypto_adapter provide support for crypto queues.

This patch add support for dpaa_eventdev to attach
dpaa_sec queues.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-10-09 13:14:19 +02:00
David Marchand
8ac3591694 remove useless include of EAL memory config header
Restrict this header inclusion to its real users.

Fixes: 028669bc9f ("eal: hide shared memory config")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-10-09 10:22:24 +02:00
Pavan Nikhilesh
ef9f8bb6d5 event/octeontx2: fix null dereference
Fix NULL dereference after rte_realloc and add extra NULL checks.
Fix few memory leak with kvargs.

Coverity issue: 345023, 345022, 345009, 345011, 345026, 344997, 344990
Fixes: ffa4ec0b60 ("event/octeontx2: allow adapters to resize inflight buffers")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-29 22:17:29 +02:00
Harman Kalra
bd992b2adc net/octeontx2: fix PTP performance
A huge drop in per core MPPS value was observed when PTP stack is
enabled. The reason behind the bottleneck is HW serialises the
transfer of all SQEs, which seeks timestamp capture, on the same
send DMA path. Hence only those packets which requires timestamp
capture should set SETTSTAMP in send mem alg.
With this patch timestamping would be done only for those packets
with PKT_TX_IEEE1588_TMST set.

Fixes: fb3ae0951a ("net/octeontx2: support Tx")
Fixes: 8980a15300 ("event/octeontx2: support PTP for SSO")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 12:23:22 +02:00
Jerin Jacob
d622cad892 bus/pci: change IOVA as VA flag name
In order to align name with other PCI driver flag such as
RTE_PCI_DRV_NEED_MAPPING and to reflect its purpose, change
RTE_PCI_DRV_IOVA_AS_VA flag name as RTE_PCI_DRV_NEED_IOVA_AS_VA.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-07-22 17:46:32 +02:00
Pavan Nikhilesh
9c0a9024be event/octeontx2: add Tx adapter
Add event eth Tx adapter support to octeontx2 SSO.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-07 15:51:53 +02:00
Harman Kalra
8980a15300 event/octeontx2: support PTP for SSO
Add PTP support for SSO based on rx_offloads of the queue connected to
it.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-07 15:21:48 +02:00
Pavan Nikhilesh
0fe4accd8e event/octeontx2: add Rx adapter fastpath ops
Add support for event eth Rx adapter fastpath operations.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-07 15:16:33 +02:00
Pavan Nikhilesh
c60891f54d event/octeontx2: resize SSO in-flight buffers
Resize SSO internal in-flight buffer count based on the Rx queues
mempool size connected to event queues.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-07 15:11:31 +02:00
Pavan Nikhilesh
37720fc1fb event/octeontx2: add Rx adapter
Add event eth Rx adapter capabilities, queue add and delete functions.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-07-07 15:06:30 +02:00
Dilshod Urazov
db8bdaecca event/opdl: fix error sign
Fixes: 0bf298e392 ("event/opdl: add event port config get/set")
Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
Fixes: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")
Cc: stable@dpdk.org

Signed-off-by: Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-07-07 13:24:12 +02:00
Dilshod Urazov
0e21324459 event/sw: fix error sign
Fixes: 371a688fc1 ("event/sw: support linking queues to ports")
Cc: stable@dpdk.org

Signed-off-by: Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-07-07 13:24:12 +02:00
Gage Eads
7a0ac7cdb4 service: promote experimental functions to stable
The functions rte_service_may_be_active(), rte_service_lcore_attr_get(),
and rte_service_attr_reset_all() were introduced nearly a year ago in DPDK
18.08. They can be considered non-experimental for the 19.08 release.

rte_service_may_be_active() is used by the sw PMD, and this commit allows
it to not need any experimental API.

Signed-off-by: Gage Eads <gage.eads@intel.com>
2019-07-08 12:35:06 +02:00
Pavan Nikhilesh
cea66312b4 event/octeontx2: add libatomic dependency for 32-bit clang
When compiling with clang on 32-bit platforms, we are missing
copies of 64-bit atomic functions. We can solve this by linking
against libatomic for the drivers and libs which need those
atomic ops.

Fixes: f0b9982cb3 ("event/octeontx2: add TIM bucket operations")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-04 17:12:55 +02:00
Pavan Nikhilesh
28e767e819 event/octeontx2: add devargs to control timer adapters
Add devargs to control each event timer adapter i.e. TIM rings internal
parameters uniquely. The following dict format is expected
[ring-chnk_slots-disable_npa-stats_ena]. 0 represents default values.

Example:
	--dev "0002:0e:00.0,tim_ring_ctl=[2-1023-1-0]"

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:28 +02:00
Pavan Nikhilesh
b2530cda86 event/octeontx2: add devargs to limit timer adapters
Add devargs to limit the max number of TIM rings reserved on probe.
Since, TIM rings are HW resources we can avoid starving other
applications by not grabbing all the rings.

Example:
	--dev "0002:0e:00.0,tim_rings_lmt=2"

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:22 +02:00
Pavan Nikhilesh
d202edd715 event/octeontx2: add timer adapter start and stop
Add event timer adapter start and stop functions.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:20 +02:00
Pavan Nikhilesh
f513827934 event/octeontx2: add timer stats get and reset
Add event timer adapter statistics get and reset functions.
Stats are disabled by default and can be enabled through devargs.

Example:
	--dev "0002:0e:00.0,tim_stats_ena=1"

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:10 +02:00
Pavan Nikhilesh
17424ededb event/octeontx2: add timer cancel function
Add function to cancel event timer that has been armed.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:09 +02:00
Pavan Nikhilesh
95e4e4ec74 event/octeontx2: add timer arm timeout burst
Add event timer arm timeout burst function.
All the timers requested to be armed have the same timeout.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:08 +02:00
Pavan Nikhilesh
80999bac03 event/octeontx2: add timer arm routine
Add event timer arm routine.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:07 +02:00
Pavan Nikhilesh
f0b9982cb3 event/octeontx2: add TIM bucket operations
Add TIM bucket operations used for event timer arm and cancel.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:05 +02:00
Pavan Nikhilesh
984ffd72d6 event/octeontx2: add timer adapter info function
Add TIM event timer adapter info get function.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-03 06:57:04 +02:00