With the IOVA auto detection changes, bus scan is performed before
memory initialization. DPAA bus scan must not use rte_malloc in
its path.
Fixes: cf408c2247 ("eal: auto detect IOVA mode")
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Before this patch, the devices discovered from VFIO layer were
being added in the device list in the order received from directory
scan. This causes an issue in case devices are reordered.
This patch makes all the devices inserted in the device list in
sorted order according to their name.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
enable the printing of objects during debuging.
use RTE_LOG to avoid function name printing for object name.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
name alignment for check command and result functions
putting them as separate functions instead of changing the original
functions.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
QMan5.0 supports up to 32 frames in one volatile dequeue
command. For the older Qman versions which only support
up to 16 frames, the highest bit in NUMF will be ignored.
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The word_copy is not as efficient as expected, so remove it from
this driver.
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Now that QBMAN (QMAN, BMAN) and FMAN drivers are available, this patch
integrates the DPAA Bus driver for using the drivers for scanning
devices and calling the PMD registered probe callbacks.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
The Buffer Manager (BMan) is a hardware buffer pool management block that
allows software and accelerators on the datapath to acquire and release
buffers in order to build frames.
This patch adds the core routines.
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
The Queue Manager (QMan) is a hardware queue management block that
allows software and accelerators on the datapath to enqueue and dequeue
frames in order to communicate.
This part of QBMAN DPAA Block.
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
QMAN frames are managed over a RB tree data structure.
This patch introduces necessary routines for implementing a RB tree.
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
An interrupt manager is implemented by emulating over pthreads.
Handlers are registered by QBMAN layer for being notified about
any interrupt request from DPAA blocks in userspace.
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
FMan or Frame Manager, inspects traffic, splits it into queueson ingress.
It is also responsible for directing traffic on queues on egress.
This patch introduces FMan configurational interfaces. This layer is
used by Bus driver for configuring the hardware block.
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
This layer is used by Bus driver's scan function. Devices are parsed
using OF parser and added to DPAA device list.
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Scan now searches for devices through sysfs interface and adds them
to a list for later initialization. During probe, each device is
initialized accroding to its property.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Initially, DPAA2 objects (except ETH and CRYPTO) were defined from VFIO
layer. This patch moves that into Bus definition.
This patch also realigns the object types with the new device types.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Existing devices and drivers depended on device ID rather than type.
A new enumerator for all DPAA2 devices is introduced in this patch.
At this point, the probe would not be able to link DPAA2 devices
with the driver and I/O would not work. Subsequent patches will
fix this.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Currently DPAA2 code doesn't support multiple groups and containers.
Remove such provision in code to simplify code.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This is not required any more for A72 based dpaa2 systems.
(A57 based platform is not in production anymore)
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
NXP Copyright has been wrongly worded with '(c)' at various places.
This patch removes these extra characters. It also removes
"All rights reserved".
Only NXP copyright syntax is changed. Freescale copyright is not
modified.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
The bus name was stored with embedded double quotes.
Indeed the bus name is given with a string in a macro,
which is not used elsewhere.
These macros are useless because the buses are drivers,
so they must not have any API for the application writer.
The registration can be done with a hardcoded value without quotes.
There is another (small) benefit of not using macros for driver names:
it is to have a meaningful constructor function name.
For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci.
The bus registration macro is also changed to use
the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers.
The priority is the highest (101) in order to be sure that the bus driver
is registered before its device drivers.
Fixes: 0fd1a0eaae ("pci: add bus driver")
Fixes: fea892e35f ("bus/vdev: use standard bus registration")
Fixes: 7e7df6d0a4 ("bus/fslmc: introduce fsl-mc bus driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
A separate boolean variable is not necessary when searching for
starting point in find_device. Just use the passed argument
as its own flag value.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Eventdev requires portal interrupts to handle timeout in the
event dequeue. This patch provides mechanism to enable the
portal interrupts.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
qbman_get_dqrr_idx() API is required with constant dqrr entry
in the eventdev driver. Also, this routine is not updating the
dqrr. So, this patch updates its input argument to a const type.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Dequeue from event device needs to process the event on
the basis of the hardware queue from which it is dequeued.
A callback is added into dpaa2_queue structure, to enable
event dequeue functionality to call that processing routine.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>