Commit Graph

158 Commits

Author SHA1 Message Date
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
Hemant Agrawal
2bd0d5b951 bus/dpaa: register platform HW mempool on runtime
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
Maxime Coquelin
54a328f552 bus/pci: forbid IOVA mode if IOMMU address width too small
Intel VT-d supports different address widths for the IOVAs, from
39 bits to 56 bits.

While recent processors support at least 48 bits, VT-d emulation
currently only supports 39 bits. It makes DMA mapping to fail in this
case when using VA as IOVA mode, as user-space virtual addresses uses
up to 47 bits (see kernel's Documentation/x86/x86_64/mm.txt).

This patch parses VT-d CAP register value available in sysfs, and
forbid VA as IOVA mode if the GAW is 39 bits or unknown.

Fixes: f37dfab21c ("drivers/net: enable IOVA mode for Intel PMDs")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Chas Williams <chas3@att.com>
2018-01-20 16:25:48 +01:00
Sunil Kumar Kori
ad6628ac9b bus/dpaa: support dynamic logging
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
43797e7b47 bus/dpaa: support event dequeue and consumption
To receive events from given event port, corresponding
function needs to be added which receives events
from portal. Also added function to consume received
events based on entry index.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +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
Akhil Goyal
c6c1ac5c4f bus/dpaa: support enqueue frames of multiple queues
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
f56488258a bus/dpaa: support static queues
DPAA hardware support two kinds of queues:
1. Pull mode queue - where one needs to regularly pull the packets.
2. Push mode queue - where the hw pushes the packet to queue. These are
   high performance queues, but limited in number.

This patch add the driver support for push mode queues.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
06268e2cb1 bus/dpaa: query queue frame count support
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
9d32ef0f5d bus/dpaa: support creating dynamic HW portal
HW portal is a processing context in DPAA. This patch allow
creation of a queue specific HW portal context.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
8dc8818365 bus/dpaa: optimize the endianness conversions
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Nipun Gupta
679e727832 bus/dpaa: optimize the qman HW stashing settings
The settings are tuned for performance.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
62f53995ca net/dpaa: add frame count based tail drop with CGR
Replace the byte based tail queue congestion support
with frame count based congestion groups.
It can easily map to number of RX descriptors for a queue.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
3b59b73dea bus/dpaa: update platform SoC value register routines
This patch update the logic and expose the soc value
register, so that it can be used by other modules as well.

Signed-off-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
Hemant Agrawal
0d941d16d3 bus/dpaa: fix ARM big endian build
Fix the following compilation error when compiling
with ARM BE compiler.

drivers/bus/dpaa/include/fsl_qman.h:1997:25:
error: statement with no effect [-Werror=unused-value]
 #define hw_sg_to_cpu(x) (x)

Fixes: c47ff048b9 ("bus/dpaa: add QMAN driver core routines")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-12 17:27:06 +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
Zhiyong Yang
6c7001480a bus/pci: fix interrupt handler type
For virtio legacy device, testpmd startup fails when using uio_pci_generic.

The issue is caused by invoking the function pci_ioport_map. The correct
value of intr_handle.type is already set before calling it, we should avoid
overwriting the default value "RTE_INTR_HANDLE_UNKNOWN" in this function.
Besides, the removal has no harm to other cases because it is set to 0 by a
memset on the whole struct during allocation in the function pci_scan_one.

Such assignments are removed in the meanwhile in pci_uio_map_resource(),
pci_vfio_map_resource_primary() and pci_vfio_map_resource_secondary() in
order to keep consistencies and avoid future questions.

Fixes: 756ce64b1e ("eal: introduce PCI ioport API")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-12 01:04:22 +01:00
Thomas Monjalon
3b792ed9c8 bus/vdev: add custom scan hook
The scan callback allows to spawn a vdev automatically
given some custom scan rules.
It is especially useful to create a TAP device automatically
connected to a netdevice as remote.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-01-12 00:39:20 +01:00
Stephen Hemminger
a12f226789 bus/pci: do not use kernel version to determine MSIX defines
In real life, kernel version is only weakly corolated with presence
or absence of defines in header files. Instead, check directly if
the needed value is defined.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 23:56:08 +01:00
Bruce Richardson
5566a3e358 drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Hemant Agrawal
d81734cacc drivers: use SPDX tag in NXP dpaa files
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-04 22:41: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
Ferruh Yigit
996672d351 bus/dpaa: fix build when assert enabled
Enabling CONFIG_RTE_ENABLE_ASSERT cause build error because some fields
protected by RTE_LIBRTE_DPAA_HWDEBUG macro accessed within DPAA_ASSERT.

All DPAA_ASSERT macro usage causing the build error wrapped with
RTE_LIBRTE_DPAA_HWDEBUG macro.

Fixes: f38f61e982 ("bus/dpaa: add BMAN hardware interfaces")
Fixes: c47ff048b9 ("bus/dpaa: add QMAN driver core routines")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-12-23 16:26:14 +01:00
Jerin Jacob
82bf1caf5f bus/pci: fix a typo in doxygen file description
Fixes: 764bf26873 ("add FreeBSD support")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-11-12 19:50:43 +01:00
Jonas Pfefferle
f1b7c6b7f5 bus/pci: fix PPC condition for IOMMU class
This fixes the use of an never defined PPC64 define in
ret_pci_get_iommu_class.

Fixes: b48e0e2d9c ("bus/pci: fix IOMMU class for sPAPR")

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
2017-11-07 17:04:09 +01:00
Jianfeng Tan
d22fcb225c bus/vdev: change log type
Use specialized dynamic log type for vdev bus logging.

Suggested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Suggested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-11-07 16:54:07 +01:00
Jianfeng Tan
d4a586d29e bus/vdev: move code from EAL into a new driver
Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-11-07 16:54:07 +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
Hemant Agrawal
d5a4e3a00c bus/dpaa: set IOVA mode as physical
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-11-07 14:51:21 +01:00
Thomas Monjalon
c52dd39411 bus/pci: fix namespace of sysfs path function
The function pci_get_sysfs_path was moved from EAL to the PCI driver.

The namespace is now fixed by adding "rte_" prefix.
The map files are fixed by removing the symbol from EAL and adding
it to the PCI driver.

It is an API break but it is probably not used by applications.
Anyway this API is already broken by the move in a new header file.

Fixes: c752998b5e ("pci: introduce library and driver")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-11-07 00:44:10 +01:00
Jonas Pfefferle
b48e0e2d9c bus/pci: fix IOMMU class for sPAPR
PPC64 sPAPR iommu does not support iova as va.
Use pa mode instead.

Fixes: 815c7deaed ("pci: get IOMMU class on Linux")

Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
2017-11-07 00:42:42 +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