Commit Graph

252 Commits

Author SHA1 Message Date
Shreyansh Jain
4c00db4bfb bus/fslmc: fix DPCI compare in scan
Incorrect string length was being compared while scanning DPCI object.

Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 01:36:50 +01:00
Neil Horman
a6ec31597a mk: add experimental tag check
Add checks during build to ensure that all symbols in the EXPERIMENTAL
version map section have __experimental tags on their definitions, and
enable the warnings needed to announce their use.  Also add an
ALLOW_EXPERIMENTAL_APIS define to allow individual libraries and files
to declare the acceptability of experimental api usage

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-29 23:35:29 +01:00
Hemant Agrawal
8824b74d8f bus/fslmc: register platform HW mempool on runtime
Detect if the DPAA2 mempool objects are present and register
it as platform default hw mempool

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-29 19:02:05 +01:00
Ferruh Yigit
ffc905f3b8 ethdev: separate driver APIs
Create a rte_ethdev_driver.h file and move PMD specific APIs here.
Drivers updated to include this new header file.

There is no update in header content and since ethdev.h included by
ethdev_driver.h, nothing changed from driver point of view, only
logically grouping of APIs. From applications point of view they can't
access to driver specific APIs anymore and they shouldn't.

More PMD specific data structures still remain in ethdev.h because of
inline functions in header use them. Those will be handled separately.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-22 01:26:49 +01:00
Hemant Agrawal
3771bd2a40 bus/fslmc: adjust to dpaa2 eventdev disabling
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-21 15:51:52 +01:00
Hemant Agrawal
043b36f621 net/dpaa2: support more than 16 burst size in Rx
This patch enhances the Rx function to support more than
16 burst size.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-21 15:51:52 +01:00
Nipun Gupta
496324d2a5 bus/fslmc: add flag to configure DCA in QBMAN multi Tx
With the current QBMAN multi-tx API, we need to create separate
enqueue descriptors for each of the packet which is required to
be enqueued to the hardware, once we support Atomic Queues
(with DCA) in dpaa2 drivers. Creating enqueue descriptor for
each packet is costly and have significant performance impact.
This patch introduces a flag parameter in the QBMAN multi-tx API,
so that DCA configuration (and later on ORP/ODP for ordered queues)
can be passed using flags and be updated in the EQCR using this flag.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
7b6edb640b event/dpaa2: have separate structure to hold dqrr entries
This patch provides cleaner approach to store the DQRR entries,
which are yet to be consumed in case of atomic queues.

Also, this patch changes the storage of the DQRR entry index
into the mbuf->seqn instead of ev->opaque

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
4170dbe266 bus/fslmc: introduce API to consume dqrr using index
A new API qbman_swp_dqrr_idx_consume is defined which takes
input as DQRR index to consume corresponding DQRR entry.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Hemant Agrawal
5329b95aae bus/fslmc: clear the vfio group on error
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-17 00:44:47 +01:00
Shreyansh Jain
42dcf0e2e7 bus/fslmc: support scanned device count
FSLMC bus detects a multiple type of logical objects representing
components of the datapath.

Using the type of device, a newly introduced API
rte_fslmc_get_device_count can return the count of devices
scanned of that device type.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
48e7f15609 net/dpaa2: optimize Tx path for best case
This patch handles the non-sg packets in more optimized way.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
a5852a94ba net/dpaa2: add parse function for LX2 device
Adding support for DPDK packet parsing logic for LX2
platform to accommodate the new FRC format introduced in LX2.

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-01-16 18:47:49 +01:00
Ashish Jain
44ea735587 net/dpaa2: align the frame size in MTU set
Setting correct frame size in dpaa2_dev_mtu_set
api call. Also correcting the correct max frame size
setting in hardware while dev_configure for jumbo frames

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
6fef517e17 bus/fslmc: add qman HW fq query count API
This patch add support for rx query debug API.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
8c71e99bf7 bus/fslmc: add braces for pointers in macros
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
e0ded73b5b bus/fslmc: expose platform SoC value register
This patch expose the dpaa2 soc platform family type.
This is required to make some soc variant specific
decision during configuration and runtime.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
92b7e33ef6 net/dpaa2: advertise link status as driver flag
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
f7768afac1 bus/fslmc: support dynamic IOVA
This patch add support for dynamic iova detection for DPAA2
devices and use of virtual address in such cases.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
2aab833725 drivers: change the deprecated memseg physaddr to IOVA
DPAA and DPAA2 drivers were using memseg physaddr, which
has been deprecated.

Fixes: 7ba49d39f1 ("mem: rename segment address from physical to IOVA")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
7adf01cf80 bus/fslmc: fix the cplusplus macro closure
Fixes: 10f1614f36 ("drivers: refactor DPAA2 object definition")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
6e9a6625e6 bus/fslmc: change EQCR stashing threshold to 1
Changing the EQCR stashing threshold boosts the performance
of l3fwd application on LS2088 by more than 20% as it helps
in burst packet processing at the Tx side. CPU is immediately
informed about the empty EQCR entries once consumed by the
hardware.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-12 12:49:39 +01:00
Hemant Agrawal
131a75b6e4 drivers: use SPDX tag in NXP dpaa2 files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-04 22:41:39 +01:00
Hemant Agrawal
6eaf4e7c33 bus/fslmc: set IOVA mode as physical
Setting the default iova mode as physical.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-11-07 15:39:31 +01:00
Santosh Shukla
455da54539 mbuf: rename physical address to IOVA
Rename buf_physaddr to buf_iova.
Keep the deprecated name in an anonymous union to avoid breaking
the API.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-11-06 22:44:26 +01:00
Gaetan Rivet
279b581c89 vfio: expose functions
The following symbols are used by vfio implementations within the PCI bus.
They need to be publicly available for the PCI bus to be outside the
EAL.

  + vfio_enable;
  + vfio_is_enabled;
  + vfio_noiommu_is_enabled;
  + vfio_release_device;
  + vfio_setup_device;

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-26 23:17:31 +02:00
Nipun Gupta
e6c9c22aa0 event/dpaa2: add queue parameter in processing callback
For event dequeues for ethernet queues, a dpaa2_queue structure is
required to get the configuration for that ethernet queue. Based on
this configuration the rte_event is to be filled at the ingress side.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-25 14:03:43 +02:00
Olivier Matz
cbc12b0a96 mk: do not generate LDLIBS from directory dependencies
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.

The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.

Some DEPDIRS-xyz variables become useless, remove them.

Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
2017-10-24 02:14:57 +02:00
Shreyansh Jain
1eb3ba846c bus/fslmc: add devices in sorted order
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>
2017-10-06 03:26:58 +02:00
Hemant Agrawal
04dfa63404 bus/fslmc: improve debug log messages
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>
2017-10-06 03:26:44 +02:00
Hemant Agrawal
a2e53a11fe bus/fslmc: enable link status interrupt
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:24:17 +02:00
Hemant Agrawal
01d0df35e7 bus/fslmc: cleanup the dpaa2 interrupt support
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:24:17 +02:00
Hemant Agrawal
2facdbae87 bus/fslmc: support check of dpbp presence
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:24:17 +02:00
Ashish Jain
c2e1975429 bus/fslmc: support LX2160 platform
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
2017-10-06 03:24:17 +02:00
Hemant Agrawal
d95bdc093b bus/fslmc: clean the QBMAN support code
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:24:16 +02:00
Hemant Agrawal
4ab87e3881 bus/fslmc: cleanup compat file
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:24:16 +02:00
Hemant Agrawal
69293c7762 bus/fslmc: remove unused funcs and align names in QBMAN
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>
2017-10-06 03:24:16 +02:00
Haiying Wang
f739d6f8f2 bus/fslmc: enhance the QBMAN CENA mode
Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:23:57 +02:00
Haiying Wang
07d862ea1e bus/fslmc: support up to 32 frames in one volatile dequeue
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>
2017-10-06 03:23:02 +02:00
Haiying Wang
43f7ff9de4 bus/fslmc: add QBMAN API to do enqueue with multiple frames
Clean it up and update the prototype.

Signed-off-by: Haiying Wang <haiying.wang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:21:57 +02:00
Hemant Agrawal
cb3bfcbb21 bus/fslmc: remove the export for QBMAN version
This func is not required to be used outside of the qbman driver.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 03:21:06 +02:00
Haiying Wang
8b87090577 bus/fslmc: replace word copy with memcpy in QBMAN
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>
2017-10-06 03:20:40 +02:00
Shreyansh Jain
16bbc98a3e bus/fslmc: update MC to 10.3.x
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 01:26:00 +02:00
Shreyansh Jain
828d51d8fc bus/fslmc: refactor scan and probe functions
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>
2017-10-06 01:08:58 +02:00
Shreyansh Jain
10f1614f36 drivers: refactor DPAA2 object definition
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>
2017-10-06 01:08:46 +02:00
Shreyansh Jain
bd8e994ef3 bus/fslmc: introduce new device type enumerator
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>
2017-10-06 01:08:23 +02:00
Shreyansh Jain
c1b1b9b902 bus/fslmc: support only single group and container
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>
2017-10-06 01:07:48 +02:00
Hemant Agrawal
b4d75d98f5 bus/fslmc: remove workaround for smmu mapping
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>
2017-07-19 08:26:08 +03:00
Stephen Hemminger
ba9219fe42 drivers/dpaa2: remove duplicate includes
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-16 17:30:06 +02:00
Hemant Agrawal
d62d95bcb6 bus/fslmc: align object name log to real resource name
the DPAA2 resources are named with ".", so changing
"-" with "."

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-14 15:56:39 +02:00
Hemant Agrawal
de85636da0 bus/fslmc: set the dpaa2 device name
rte_eth_dev_allocated expect the device name to be filled.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-14 15:55:18 +02:00
Hemant Agrawal
c4138d89eb bus/fslmc: fix debug build
Fixes: 9ccb76b24c ("bus/fslmc: enable portal interrupt handling")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-14 15:53:57 +02:00
Hemant Agrawal
441ea8899e bus/fslmc: fix missing brace
Fixes: c7fe1eea8a ("bus: simplify finding starting point")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-11 11:22:03 +02:00
Shreyansh Jain
fcee050aa1 update NXP copyright headers
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>
2017-07-10 12:26:40 +02:00
Thomas Monjalon
8d73e58f0b bus: fix driver registration
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>
2017-07-08 22:27:01 +02:00
Stephen Hemminger
c7fe1eea8a bus: simplify finding starting point
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>
2017-07-08 19:28:58 +02:00
Nipun Gupta
9ccb76b24c bus/fslmc: enable portal interrupt handling
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>
2017-07-07 09:27:49 +02:00
Nipun Gupta
9acdd08541 bus/fslmc: add interrupt enabling routine
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:27:39 +02:00
Nipun Gupta
6070ce4334 bus/fslmc: change argument to const to avoid warning
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>
2017-07-07 09:27:17 +02:00
Nipun Gupta
7223bd02ee bus/fslmc: add callback per queue to enable
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>
2017-07-07 09:27:06 +02:00
Nipun Gupta
33ae0a2915 bus/fslmc: support enqueue with multiple descriptors
This patch adds the QBMAN API which support multiple enqueue
descriptors.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:26:55 +02:00
Nipun Gupta
3844bdd14d bus/fslmc: support static dequeue from portal
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:26:33 +02:00
Nipun Gupta
71e50d4069 bus/fslmc: adding cpu support in stashing config
Stashing can also be configured by other drivers (for instance
event driver) passing cpu_id as an argument. This change
facilitates the same.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:26:11 +02:00
Nipun Gupta
15be42b688 bus/fslmc: register dpci as dpaa2 device for bus scan
Registering dpci as dpaa2 type device handling initialization,
allocation and freeing of the device

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:25:59 +02:00
Nipun Gupta
08464d2935 bus/fslmc: adding basic dpci support
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:25:47 +02:00
Hemant Agrawal
b981f26e9f bus/fslmc: export qbman dqrr funcs for eventdev usages
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-07 09:25:24 +02:00
Nipun Gupta
92c28aa457 bus/fslmc: add basic dpcon support
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:25:13 +02:00
Nipun Gupta
6e1f055d79 bus/fslmc: integrate dpio and dpbp to object framework
This patch removes the existing static call for dpio and dpbp
create and add them to object registration framework.

This patch also changes the vfio mc object processing to use
the framework.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:25:02 +02:00
Hemant Agrawal
f6af0de58e bus/fslmc: generic framework for mc object creation
There are muliple help mc object, which are not an independent
device, but they are required for dpaa2 based devices.
This framework allows registration and handling of all such
mc devices.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2017-07-07 09:24:51 +02:00
Akhil Goyal
81d587188a bus/fslmc: add macros to get/set FLE context
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-07-06 22:26:50 +02:00
Hemant Agrawal
774e9ea919 net/dpaa2: add support for multi seg buffers
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Shreyansh Jain
24a170cd30 bus/fslmc: add check for memseg availability
Cleanup the DMA map logic for memsegs. Earlier, in case
DMA mapping reaching end of segment, it reports a spurious error.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
e401e2c95a bus/fslmc: fix the failure loop condition
Correct the while condition for cleanup in case of failure.

Fixes: a0d5c9caf0 ("bus/fslmc: add frame queue based dq storage")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Jan Blunck
9188a3f596 bus/fslmc: implement method to find device
Signed-off-by: Jan Blunck <jblunck@infradead.org>
2017-07-04 01:08:25 +02:00
Jerin Jacob
98a7ea332b fix typos using codespell utility
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-06-14 23:54:13 +02:00
Hemant Agrawal
fd0c3f136d bus/fslmc: reduce the debug log messages
Reducing the amount of logging and making the err statement
as a single line statements.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
e24b05bfd2 bus/fslmc: add support to detect SoC version
This is required to configure the stashing destination
based on the cluster size.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
0ccb1bef96 bus/fslmc: update TAILQ usages in dpaa2 objects
This patch updates the usages of malloc and TAILQ in
dpbp and dpio objects.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
7ae777d064 net/dpaa2: add support for congestion notification
In case of HW egress FQ is congested, skip further
transmission of frames.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
250aabc098 bus/fslmc: export qbman results in map file
In order to check the congestion state of Egress FQs,
this qbman function will be used by the DPAA2 Ethernet PMD.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
312b82f275 bus/fslmc: support for parallel Rx DQ requests
DPAA2 hardware support the option to configure
multiple memories for Rx recv buffer (DPAA2-DQRR).
Each Rx request executing is called as 'DQ' request.
This patch adds routines to get information w.r.t each DQ request.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
9464dbe9c9 net/dpaa2: stop using software annotation
The DPAA2 driver is not using the DPAA2 frame descriptor
software annotation area. This patch reduces the
PTA length to zero and adjust the RX Buffer Layout
accordingly.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Akhil Goyal
ce8126838b bus/fslmc: add packet frame list entry definitions
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
2017-04-20 11:32:45 +02:00
Hemant Agrawal
a0d5c9caf0 bus/fslmc: add frame queue based dq storage
This patch adds generic functions for allowing dq storage
for the frame queues.
As the frame queues are common resource for different drivers
this is helpful.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
352db38111 bus/fslmc: support DMA mapping for ARM SMMU
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
df0011c923 bus/fslmc: add physical-virtual address translation helpers
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d64abecf57 bus/fslmc: add packet FLE definitions
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3d6a286ca6 bus/fslmc: define VLAN header length
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d08e662a4b bus/fslmc: introduce true and false macros
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
beb2a7865d bus/fslmc: define hardware annotation area size
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
73cddc740c bus/fslmc: define queues for DPAA2 devices
Before DPAA2 devices can communicate using hardware queues, this patch
adds queue definitions in the FSLMC bus which the DPAA2 devices would
instantiate.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d93818e1d1 bus/fslmc: affine dpio to crypto threads
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3981b74fc7 bus/fslmc: support hardware mempool object
Each mempool instance is represented by a DPBP object
from the FSL-MC bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
5374e50f10 bus/fslmc: add dpio portal driver
The portal driver is bound to DPIO objects discovered on the fsl-mc bus and
provides services that:
- allow other drivers, such as the Ethernet driver, to enqueue and dequeue
  frames for their respective objects

A system will typically allocate 1 DPIO object per CPU to allow queuing
operations to happen simultaneously across all CPUs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
52d4f4c765 bus/fslmc: support debug log
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
14ec4ddd2e bus/fslmc: scan for net and crypto device
This patch will add support in fslmc vfio process to
scan and parse the dpni and dpseci object for net and crypto
devices. It will add the scanned devices to the fslmc bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
70e58cf74c bus/fslmc: support VFIO
Add support for using VFIO for dpaa2 based fsl-mc bus.

There are some differences in the way vfio used for fsl-mc bus
from the eal vfio.
 - The scanning of bus for individual objects on the basis of
   the DPRC container.
 - The use and mapping of MC portal for object access

With the evolution of bus model, they can be further aligned with
eal vfio code.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
7ee4686401 bus/fslmc: support MC dpbp object
DPBP object represent a hw based buffer pool instance
in the DPAA2 hardware.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
2c63db040e bus/fslmc: support MC dpio object
This patch adds the DPIO object support in MC driver.

DPIO - Data Path Input Output represent the processing
context to access the QBMAN HW for packet I/O.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3af733ba8d bus/fslmc: introduce MC object functions
This patch introduces the DPAA2 MC(Management complex Driver).

This is a minimal set of low level functions to send and
receive commands to the fsl-mc. It includes support for basic
management commands and commands to manipulate MC objects.

This is common to be used by various DPAA2 PMDs. e.g.net, crypto
and other drivers.

This is a low level library also used in kernel.

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
531b17a780 bus/fslmc: add QBMAN driver to bus
QBMAN, is a hardware block which interfaces with the other
accelerating hardware blocks (For e.g., WRIOP) on NXP's DPAA2
SoC for queue, buffer and packet scheduling.

This patch introduces a userspace driver for interfacing with
the QBMAN hw block.

The qbman-portal component provides APIs to do the low level
hardware bit twiddling for operations such as:
  -initializing Qman software portals
  -building and sending portal commands
  -portal interrupt configuration and processing

This same/similar code is used in kernel and compat file is used
to make it working in user space.

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>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
7e7df6d0a4 bus/fslmc: introduce fsl-mc bus driver
The fslmc bus driver is a rte_bus driver which scans the fsl-mc bus
for NXP DPAA2 SoCs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00