Commit Graph

206 Commits

Author SHA1 Message Date
Mattias Rönnblom
4ba0dcaa42 event/dsw: sort events on dequeue
With this patch, the DSW event device will (optionally) sort the event
burst before giving it to the application. The sorting will primarily
be on queue id, and secondary on flow id.

The sorting is an attempt to optimize data and instruction cache usage
for the application, at the cost of additional event device overhead.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:46:03 +02:00
Mattias Rönnblom
f6257b22e7 event/dsw: add load balancing
The DSW event device will now attempt to migrate (move) flows between
ports in order to balance the load.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:50 +02:00
Mattias Rönnblom
2b7bc6a5b2 event/dsw: add port load measurements
The DSW event device port now attempts to estimate its load (i.e. how
busy it is). This is required for load balancing to work (although
load balancing is not included in this patch), and may also be useful
for debugging purposes.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
2018-10-01 16:45:37 +02:00
Mattias Rönnblom
1c8e3caa3b event/dsw: add event scheduling and device start/stop
With this patch, the DSW event device can be started and stopped,
and also supports scheduling events between ports.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:23 +02:00
Mattias Rönnblom
0cb8b0a03e event/dsw: support linking/unlinking ports
Added support for linking and unlinking ports to queues in a DSW event
device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:45:10 +02:00
Mattias Rönnblom
236acd0dc5 event/dsw: add port configuration
Allow port setup and release in the DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:56 +02:00
Mattias Rönnblom
4540ee9c68 event/dsw: add device and queue configuration
Allow queue- and device-level configuration for and retrieval of
contextual information from a DSW event device.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:42 +02:00
Mattias Rönnblom
46a186b1f0 event/dsw: add device registration and build system
This patch contains the Meson and GNU Make build system extensions
required for the Distributed Event Device, and also the initialization
code for the driver itself.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-01 16:44:14 +02:00
Luca Boccassi
7abb521d2c event/opdl: add in meson build
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Luca Boccassi
76ca29a7d6 event/opdl: rename map file to match library name
So that it can be used from Meson as well

Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18 22:53:35 +02:00
Pavan Nikhilesh
56aa489e8e event/octeontx: remove unnecessary port start and stop
Modifying port state is not necessary when starting/stopping Rx adapter
as it is same as starting/stopping ethdev.

Fixes: 45a914c5bd ("event/octeontx: support event Rx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-07-25 14:29:17 +02:00
Pavan Nikhilesh
ab0e481b4c event/octeontx: prefetch mbuf instead of wqe
Prefetch mbuf pointer instead of wqe when SSO receives pkt from PKI.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-07-25 14:28:25 +02:00
Pavan Nikhilesh
179c7e893f mempool/octeontx: fix pool to aura mapping
HW needs each pool to be mapped to an aura set of 16 auras.
Previously, pool to aura mapping was considered to be 1:1.

Fixes: 02fd6c7443 ("mempool/octeontx: support allocation")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-07-12 21:58:36 +02:00
Hemant Agrawal
2aaffeee7b drivers: support function name in NXP logs
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-07-12 14:41:28 +02:00
Gage Eads
8490488a68 event/sw: support device stop flush callback
This commit also adds a flush callback test to the sw eventdev's selftest
suite.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-07-06 06:54:49 +02:00
Pavan Nikhilesh
6461abf76b event/octeontx: fix flush callback
When event queues are being flushed the getwork operation used to extract
events should be a grouped getwork operation to the specific event queue.

Fixes: 8384f0e039 ("event/octeontx: support device stop flush callback")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-07-06 06:54:49 +02:00
Thomas Monjalon
f8e9989606 remove useless constructor headers
A constructor is usually declared with RTE_INIT* macros.
As it is a static function, no need to declare before its definition.
The macro is used directly in the function definition.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-07-12 00:00:35 +02:00
Abhinandan Gujjar
9dc1bd7326 eventdev: add driver interface of crypto adapter
This patch defines capabilities & functions to be called
for eventdev PMDs.

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-05-10 14:07:37 +02:00
Ashish Jain
64f5de4194 event/dpaa2: remove link from info structure
Removing use of link data under evq_info_t structure which was
used to check whether the the associated evq has been linked
or not. Since, an evq can be linked to multiple event ports,
thus setting the link variable only allowed the first event
port to be associated with the evq. This led to huge performance
drop in case of multiple event ports as I/O only worked on
first event port associated with the evq.

Fixes: 0ce3ce7c27 ("event/dpaa2: add configuration functions")
Cc: stable@dpdk.org

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-10 14:03:47 +02:00
Nipun Gupta
3c21086bcb event/dpaa2: remove check on epoll return
Driver shouldn't take decision on signals received. The return
from epoll was blocking on EINTR which is not the right use-case.

Fixes: 36d87bb922 ("event/dpaa2: handle timeout using interrupts in dequeue")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-10 14:03:39 +02:00
Pavan Nikhilesh
db6a330baa event/octeontx: fix SPDX tag placement
Fixes: fd5baf09cd ("event/octeontx: probe timvf PCIe devices")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-10 14:03:25 +02:00
Pavan Nikhilesh
55fbc92d78 event/octeontx: fix build with clang 6
Clang 6 & 7 fail to naturally align packed structs due to this clang
can't use 8byte atomic primitives and splits them into lesser atomic
primitives. To use lesser atomic primitives we need to link libatomic
(-latomic), instead supply alignment attribute to the compiler.

timvf_worker.c:(.text+0x498): undefined reference to `__atomic_fetch_add_8'
timvf_worker.c:(.text+0x525): undefined reference to `__atomic_store_2'
timvf_worker.c:(.text+0x557): undefined reference to `__atomic_fetch_add_4'
timvf_worker.c:(.text+0x5de): undefined reference to `__atomic_store_2'

Fixes: f874c1eb15 ("event/octeontx: create and free timer adapter")

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-05-10 14:03:12 +02:00
Nipun Gupta
91e96999ef bus/fslmc: keep Tx queues information for DPCI devices
The DPCI devices have both Tx and Rx queues. Event devices use
DPCI Rx queues only, but CMDIF (AIOP) uses both Tx and Rx queues.
This patch enables Tx queues configuration too.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-08 14:20:06 +02:00
Shreyansh Jain
365fb925d3 bus/fslmc: optimize physical to virtual address search
With Hotplugging memory support, the order of memseg has been changed
from physically contiguous to virtual contiguous. FSLMC bus and dpaa2
drivers depend on PA to VA address conversion when in Physical
addressing mode.

This patch creates a list of blocks requested to be pinned to the
DPAA2 mempool. For searching physical addresses, it is expected that
it would belong to this list (from hardware pool) and hence it is
less expensive than memseg walks. Though, this has marginal impact on
performance vis-a-vis legacy mode with physically contiguous memsegs.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-27 21:40:43 +02:00
Pavan Nikhilesh
13573bd3f4 event/octeontx: fix snprintf mempool name overflow
Bugzilla-ID: 28
Fixes: f874c1eb15 ("event/octeontx: create and free timer adapter")

Reported-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-25 16:49:17 +02:00
Bruce Richardson
b67dde5b19 drivers/dpaa: reduce meson dependency lists
Meson build currently tracks the dependencies between libraries, which
can often make things easier, but has the side-effect of slowing down
the initial meson run if too many duplicated dependencies are provided.
Therefore, we remove dependencies from the dpaa items where other
dependencies already depend on those. This provides a noticable speed-up
in meson configuration runs when lots of sample apps are included in the
build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-17 16:09:43 +02:00
Gowrishankar Muthukrishnan
100915c0a5 event/dpaa: fix integer overflow of max ports
dev_info->max_event_ports is uint8_t. dpaa_event_dev_info_get assigns
DPAA_EVENT_MAX_EVENT_PORT (which is RTE_MAX_LCORE, upto 256 in ppc64le)
into this variable, which breaks compile in ppc64le.

drivers/event/dpaa/dpaa_eventdev.c: In function ‘dpaa_event_dev_info_get’:
   rte_config.h:23:23: error:
   large integer implicitly truncated to unsigned type [-Werror=overflow]
      #define RTE_MAX_LCORE 256

Fixes: 9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-04-16 16:45:11 +02:00
Pavan Nikhilesh
3e249bc559 event/octeontx: add option to use fpavf as chunk pool
Add compile-time configurable option to force TIMvf to use Octeontx
FPAvf pool manager as its chunk pool.
When FPAvf is used as pool manager the TIMvf automatically frees the
chunks to FPAvf through gpool-id.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
4cec5aae58 event/octeontx: optimize timer adapter resolution parameters
When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag
while creating adapter underlying driver is free to optimize the
resolution for best possible configuration.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
0896f7e080 event/octeontx: add burst mode for timer arm
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
7684fcf1f4 event/octeontx: add single producer timer arm variant
When application creates the timer adapter by passing
`RTE_EVENT_TIMER_ADAPTER_F_SP_PUT` flag, we can optimize the arm sequence
by removing the locking overhead.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
b6d814d846 event/octeontx: add multiproducer timer arm and cancel
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
d1925c87d0 event/octeontx: add event timer stats get and reset
Add functions to get and reset event timer adapter stats.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
ea73fed2a6 event/octeontx: start and stop timer device
When application requests to start the timer adapter through
`rte_event_timer_adapter_start`, Octeontx TIMvf ring does the
following:
- Uses mbox to communicate TIMpf driver about,
  * SCLK frequency used to convert ns<->cycles.
  * program the ring control parameters and start the ring.
  * get the exact cycle at which the TIMvf ring has started which can be
  used to estimate the bucket position.

On `rte_event_timer_adapter_stop` i.e stop, Octeontx TIMvf ring does the
following:
- Use mbox to communicate TIMpf driver about,
  * reset the ring control parameters and stop the ring.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
f874c1eb15 event/octeontx: create and free timer adapter
When the application requests to create a timer device, Octeontx TIM
create does the following:
- Get the requested TIMvf ring based on adapter_id.
- Verify the config parameters supplied.
- Allocate memory required for
  * Buckets based on min and max timeout supplied.
  * Allocate the chunk pool based on the number of timers.
- Clear the interrupts.

On Free:
- Free the allocated bucket and chunk memory.
- Free private data used by TIMvf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Pavan Nikhilesh
fd5baf09cd event/octeontx: probe timvf PCIe devices
On Octeontx HW, each event timer device is enumerated as separate SRIOV VF
PCIe device.

In order to expose as a event timer device:
On PCIe probe, the driver stores the information associated with the
PCIe device and later when application requests for a event timer device
through `rte_event_timer_adapter_create` the driver infrastructure creates
the timer adapter with earlier probed PCIe VF devices.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 11:27:15 +02:00
Erik Gabriel Carrillo
47d05b2928 eventdev: add timer adapter common code
This commit adds the logic that is shared by all event timer adapter
drivers; the common code handles instance allocation and some
initialization.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-04-16 11:04:46 +02:00
Jerin Jacob
8384f0e039 event/octeontx: support device stop flush callback
Add support for stop flush callback along with unit test.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
2018-04-16 10:10:23 +02:00
Gage Eads
d593a8177f eventdev: add device stop flush callback
When an event device is stopped, it drains all event queues and ports.
These events may contain pointers, so to prevent memory leaks eventdev now
supports a user-provided flush callback that is called during the queue
drain process. This callback is stored in process memory, so the callback
must be registered by any process that may call rte_event_dev_stop().

This commit also clarifies the behavior of rte_event_dev_stop().

This follows this mailing list discussion:
http://dpdk.org/ml/archives/dev/2018-January/087484.html

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-16 10:10:12 +02:00
Liang Ma
b770f952de event/opdl: fix atomic queue race condition
If application link one atomic queue to multiple ports,
and each worker core update flow_id, there will have a
chance to hit race condition issue and lead to double processing
same event. This fix solve the problem and eliminate
the race condition issue.

Fixes: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")
Cc: stable@dpdk.org

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-16 10:10:03 +02:00
Gage Eads
4deeb214ac event/sw: perform partial burst enqueues
Previously, the sw PMD would enqueue either all or no events, depending on
if enough inflight credits were available for the new events in the burst.
If a port is enqueueing a large burst (i.e. a multiple of the credit update
quanta), this can result in suboptimal performance, and requires an
understanding of the sw PMD implementation (in particular, its credit
scheme) to tune an application's burst size.

This affects software that enqueues large bursts of new events, such as the
ethernet event adapter which uses a 128-deep event buffer, when the input
packet rate is sufficiently high.

This change makes the sw PMD enqueue as many events as it has credits, if
there are any new events in the burst.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-04-16 10:09:53 +02:00
Vipin Varghese
e4dff5503a event/sw: simplify counter assignment
Counter variable 'out_pkts' had been set to 0, then updated. Current
code change elimates double assignment to direct assignment.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:07:50 +02:00
Vipin Varghese
642bc2a33c event/sw: move stats code for better cache access
variables 'out_pkts_total' and 'out_pkts_total' will be in registers.
Hence shifting the code after the loop, helps the update from registers.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:07:03 +02:00
Vipin Varghese
63ddc00239 event/sw: add unlikely branch predict
For most run cases 'sw->started' holds true. Adding a branch prediction
suggestion to compiler helps as this is first conditional check just
after entering the function.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
2018-04-16 10:06:55 +02:00
Anatoly Burakov
00bc40e265 bus/fslmc: use iova2virt instead of memseg iteration
Reduce dependency on internal details of EAL memory subsystem, and
simplify code.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
2018-04-11 19:54:40 +02:00
Pavan Nikhilesh
d8dd31652c common/octeontx: move mbox to common folder
Move commonly used functions across mempool, event and net devices to a
common folder in drivers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-04-04 23:14:52 +02:00
Shreyansh Jain
358309f367 event/dpaa2: support dynamic logging
Some changes had already been pushed via SHA:72654f090a11 patch. This
patch updates them.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-04-02 23:42:23 +02:00
Hemant Agrawal
6ec78c2463 build: add meson support for dpaaX platforms
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15 17:50:02 +01:00
Hemant Agrawal
5ae1edff68 dpaa2: prepare for 32-bit build
This patch prepare the dpaa2 drivers for compilation on 32 bit machine.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15 17:41:35 +01:00
Hemant Agrawal
89cf958482 event/dpaa: fix header include
rte_cycles.h shall be included instead of rte_cycles_64.h

dpaa_eventdev.c:32:27:
fatal error: rte_cycles_64.h: No such file or directory

Fixes: 9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15 17:39:33 +01:00