summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
AgeCommit message (Collapse)Author
2018-07-12remove useless constructor headersThomas Monjalon
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-05-28bus/fslmc: fix export of unknown symbolThomas Monjalon
The function dpdmai_set_tx_queue() is not implemented, so it is removed from the export map file. Fixes: 23e8fcb0186c ("bus/fslmc: support MC DPDMAI object") Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-14bus/fslmc: remove dead codeShreyansh Jain
Coverity issue: 268338 Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-14bus/fslmc: fix memory leak and cleanupShreyansh Jain
Coverity issue: 268327 Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-14bus/fslmc: improve debug loggingHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-14bus/fslmc: support device blacklistingHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-10crypto/dpaa2_sec: remove IOVA conversion for fle addressHemant Agrawal
fle is already in virtual addressing mode - no need to perform address conversion for it. Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-05-08mem: add argument to memory event callbackAnatoly Burakov
It may be useful to pass arbitrary data to the callback (such as device pointers), so add this to the mem event callback API. Suggested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-05-08bus/fslmc: keep Tx queues information for DPCI devicesNipun Gupta
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-08bus/fslmc: expose API to free DPCI deviceNipun Gupta
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-08bus/fslmc: add macros required by QDMA for FLE and FDNipun Gupta
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-08bus/fslmc: support scanning and probing of QDMA devicesNipun Gupta
'dpdmai' devices detected on fsl-mc bus are represented by DPAA2 QDMA devices in DPDK. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-05-08bus/fslmc: support MC DPDMAI objectNipun Gupta
This patch adds the DPDMAI (Data Path DMA Interface) object support in MC driver. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-04-27bus/fslmc: optimize physical to virtual address searchShreyansh Jain
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-26bus/fslmc: do not log messages if bus not presentStephen Hemminger
A typical distribution will compile with default config and all buses enabled. Therefore every driver should be silent and not log anything for this normal case. This patch gets rid of these messages when running on basic x86 environment such as bare metal or VM. fslmc: DPAA2: DPRC not available fslmc: FSLMC Bus Not Available. Skipping Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-04-23crypto/dpaa2_sec: fix OP storage for physical IOVA modeHemant Agrawal
op storage in fle is just for reference for post dq. So, don't convert it to iova mode. Fixes: 37f96eb01bce ("crypto/dpaa2_sec: support scatter gather") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-17drivers/dpaa: reduce meson dependency listsBruce Richardson
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-19bus/fslmc: fix build with clang 3.4Hemant Agrawal
error: redefinition of typedef 'dma_addr_t' is a C11 feature [-Werror,-Wtypedef-redefinition] Fixes: 4bc5ab88dbd6 ("net/dpaa2: fix Tx only mode") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-04-15bus/fslmc: fix 64-bit format specifiersGowrishankar Muthukrishnan
Instead of llX, use C99 standard "PRIu64" in format specifier. Former one breaks compile in ppc64le. Fixes: c2c167fdb3 ("bus/fslmc: support memory event callbacks for VFIO") Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-13vfio: export some internal functionsHemant Agrawal
This patch moves some of the internal vfio functions from eal_vfio.h to rte_vfio.h for common uses with "rte_" prefix. This patch also change the FSLMC bus usages from the internal VFIO functions to external ones with "rte_" prefix Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-04-12bus/fslmc: configure separate portal for Ethernet RxNipun Gupta
In case of Receive from Ethernet we add a new pull request (prefetch) but do not fetch the results from that pull request until next dequeue operation. This keeps the portal in busy mode. This patch updates the portals bifurcation to have separate portals to receive packets for Ethernet and all other devices to use a common portal. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-04-11bus/fslmc: support memory event callbacks for VFIOAnatoly Burakov
VFIO needs to map and unmap segments for DMA whenever they become available or unavailable, so register a callback for memory events, and provide map/unmap functions. Remove unneeded check for number of segments, as in non-legacy mode this now becomes a valid scenario. Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> 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-11bus/fslmc: move VFIO DMA map into bus probeAnatoly Burakov
fslmc bus needs to map all allocated memory for VFIO before device probe. This bus doesn't support hotplug, so at the time of this call, all possible device that could be present, are present. This will also be the place where we install VFIO callback, although this change will come in the next patch. Since rte_fslmc_vfio_dmamap() is now only called at bus probe, there is no longer any need to check if DMA mappings have been already done. Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> 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-11mem: replace memseg with memseg listsAnatoly Burakov
Before, we were aggregating multiple pages into one memseg, so the number of memsegs was small. Now, each page gets its own memseg, so the list of memsegs is huge. To accommodate the new memseg list size and to keep the under-the-hood workings sane, the memseg list is now not just a single list, but multiple lists. To be precise, each hugepage size available on the system gets one or more memseg lists, per socket. In order to support dynamic memory allocation, we reserve all memory in advance (unless we're in 32-bit legacy mode, in which case we do not preallocate memory). As in, we do an anonymous mmap() of the entire maximum size of memory per hugepage size, per socket (which is limited to either RTE_MAX_MEMSEG_PER_TYPE pages or RTE_MAX_MEM_MB_PER_TYPE megabytes worth of memory, whichever is the smaller one), split over multiple lists (which are limited to either RTE_MAX_MEMSEG_PER_LIST memsegs or RTE_MAX_MEM_MB_PER_LIST megabytes per list, whichever is the smaller one). There is also a global limit of CONFIG_RTE_MAX_MEM_MB megabytes, which is mainly used for 32-bit targets to limit amounts of preallocated memory, but can be used to place an upper limit on total amount of VA memory that can be allocated by DPDK application. So, for each hugepage size, we get (by default) up to 128G worth of memory, per socket, split into chunks of up to 32G in size. The address space is claimed at the start, in eal_common_memory.c. The actual page allocation code is in eal_memalloc.c (Linux-only), and largely consists of copied EAL memory init code. Pages in the list are also indexed by address. That is, in order to figure out where the page belongs, one can simply look at base address for a memseg list. Similarly, figuring out IOVA address of a memzone is a matter of finding the right memseg list, getting offset and dividing by page size to get the appropriate memseg. This commit also removes rte_eal_dump_physmem_layout() call, according to deprecation notice [1], and removes that deprecation notice as well. On 32-bit targets due to limited VA space, DPDK will no longer spread memory to different sockets like before. Instead, it will (by default) allocate all of the memory on socket where master lcore is. To override this behavior, --socket-mem must be used. The rest of the changes are really ripple effects from the memseg change - heap changes, compile fixes, and rewrites to support fbarray-backed memseg lists. Due to earlier switch to _walk() functions, most of the changes are simple fixes, however some of the _walk() calls were switched to memseg list walk, where it made sense to do so. Additionally, we are also switching locks from flock() to fcntl(). Down the line, we will be introducing single-file segments option, and we cannot use flock() locks to lock parts of the file. Therefore, we will use fcntl() locks for legacy mem as well, in case someone is unfortunate enough to accidentally start legacy mem primary process alongside an already working non-legacy mem-based primary process. [1] http://dpdk.org/dev/patchwork/patch/34002/ 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-11bus/fslmc: use virt2memseg instead of iterationAnatoly Burakov
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-11bus/fslmc: use iova2virt instead of memseg iterationAnatoly Burakov
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-11bus/fslmc: use memseg walk instead of iterationAnatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.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-11bus/fslmc: do not needlessly check for IOVA modeAnatoly Burakov
We already set IOVA addresses of memsegs and memzones to VA address during initialization, so we don't need to check whether we're in RTE_IOVA_VA mode anywhere else. Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-04-05bus/fslmc: fix find device start conditionGaetan Rivet
If start is set and a device before it matches the data, this device is returned. Fixes: c7fe1eea8a74 ("bus: simplify finding starting point") Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-04-02bus/fslmc: remove unused debug macrosShreyansh Jain
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-02bus/fslmc: support dynamic loggingShreyansh Jain
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15build: add meson support for dpaaX platformsHemant Agrawal
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15bus/fslmc: enable compilation for other platformsHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15bus/fslmc: add 32-bit functional support for ARMHemant Agrawal
This patch adds the functional logic to make the dpaa2 drivers work on 32bit machine. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15dpaa2: prepare for 32-bit buildHemant Agrawal
This patch prepare the dpaa2 drivers for compilation on 32 bit machine. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-14mk: fix dependencies of dpaaX driversHemant Agrawal
This patch fixes the build dependency of various dpaaX components, when the dpaa or fslmc bus is disabled, or VFIO is disabled. Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8") Cc: stable@dpdk.org Reported-by: Yongseok Koh <yskoh@mellanox.com> Suggested-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-02-13lib: remove unused map symbolsPavan Nikhilesh
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-02-06bus/fslmc: fix build with latest glibcJerin Jacob
Fix the following build error with latest glibc-headers( Part of aarch64-linux-gnu-gcc-7.3.0 toolchain) In file included from drivers/bus/fslmc/mc/fsl_mc_sys.h:30:0, from drivers/bus/fslmc/mc/dpmng.c:7: /usr/aarch64-linux-gnu/usr/include/libio.h:21:2: error: #warning "<libio.h> is deprecated; use <stdio.h> instead." [-Werror=cpp] Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions") Cc: stable@dpdk.org Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-02-06bus/fslmc: fix mempool ops registrationNipun Gupta
Fixes: 8824b74d8f5f ("bus/fslmc: register platform HW mempool on runtime") Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31bus/fslmc: add function to prefetch next DQRR entryNipun Gupta
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-31bus/fslmc: fix DPCI compare in scanShreyansh Jain
Incorrect string length was being compared while scanning DPCI object. Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-29mk: add experimental tag checkNeil Horman
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-29bus/fslmc: register platform HW mempool on runtimeHemant Agrawal
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-22ethdev: separate driver APIsFerruh Yigit
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-21bus/fslmc: adjust to dpaa2 eventdev disablingHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-21net/dpaa2: support more than 16 burst size in RxHemant Agrawal
This patch enhances the Rx function to support more than 16 burst size. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19bus/fslmc: add flag to configure DCA in QBMAN multi TxNipun Gupta
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-19event/dpaa2: have separate structure to hold dqrr entriesNipun Gupta
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-19bus/fslmc: introduce API to consume dqrr using indexNipun Gupta
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-17bus/fslmc: clear the vfio group on errorHemant Agrawal
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>