Commit Graph

27 Commits

Author SHA1 Message Date
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
Olivier Matz
4761b145b1 mempool/octeontx: fix dependency
The syntax "DEPDIRS-y = ..." is deprecated since
commit feb9f680cd ("mk: optimize directory dependencies").

Replace it with the new style.

Fixes: 8700239f77 ("mempool/octeontx: add build and log infrastructure")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-24 02:14:54 +02:00
Santosh Shukla
89ee1e94bc mempool/octeontx: move mbox from event to mempool
Octeontx mempool pmd need mailbox for pool setup.
That mailbox was defined at drivers/event/octeontx.
So mempool has dependency on event/octeontx driver and
commit:8700239f7767 has added make rule which makes sure event/*
get build before mempool, but this rule introduces
cyclic dependency and may create problem to future
feature addition in drivers/Makefile.

Same problem noticed and reported in below thread:
http://dpdk.org/ml/archives/dev/2017-October/079187.html

The patch solves problem by moving mbox definition from
drivers/event/octeontx to drivers/mempool/octeontx.
Moving mbox files involves below changes:

* Renamed ssovf_mbox.[ch] --> octeontx_mbox.[ch]
* Renamed ssovf_probe.c  --> octeontx_ssovf.c
* Introduced pool logger file.
* Moved API from rte_pmd_octeontx_ssovf_version.map to
  rte_mempool_octeontx_version.map.
* Respective Makefile changes done in
  drivers/event/octeontx/Makefile and drivers/mempool/octeontx/Makefile.

Fixes: 8700239f77 ("mempool/octeontx: add build and log infrastructure")

Reported-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-10-23 16:51:00 +02:00
Santosh Shukla
1513fc3023 mempool/octeontx: remove dead code
Coverity Issue: 195000
Fixes: 02fd6c7443 ("mempool/octeontx: support allocation")

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-23 16:51:00 +02:00
Jerin Jacob
50aa486c87 mempool/octeontx: fix build with old gcc
Replaced _Static_assert compiler function with RTE_BUILD_BUG_ON()
to fix build issue with old gcc.

Fixes: 02fd6c7443 ("mempool/octeontx: support allocation")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-13 15:28:09 +02:00
Hemant Agrawal
5518fc9542 mempool/dpaa2: improve error handling
Reverting the config on encountering errors.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-12 03:47:49 +02:00
Pablo de Lara
ca5aeab31d mempool/octeontx: fix icc build
drivers/mempool/octeontx/octeontx_fpavf.c(789):
error #592: variable "fpa" is used before its value is set
        RTE_SET_USED(fpa);

Fixes: 1c842786fe ("mempool/octeontx: probe fpavf PCIe devices")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-09 16:17:33 +02:00
Santosh Shukla
2baa3f0b7d mempool/octeontx: support memory area ops
Add support for register_memory_area ops in mempool driver.

Allow more than one HW pool when using OcteonTx mempool driver:
By storing each pool information to the list and find appropriate
list element by matching the rte_mempool pointers.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
06935a4f45 mempool/octeontx: support capabilities query
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
e48de68d89 mempool/octeontx: support count query
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
e4f6731454 mempool/octeontx: support enqueue and dequeue
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
806714f1e7 mempool/octeontx: support freeing
Upon pool free request from application, Octeon FPA free
does following:
- Uses mbox to reset fpapf pool setup.
- frees fpavf resources.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
02fd6c7443 mempool/octeontx: support allocation
Upon pool allocation request by application, Octeontx FPA alloc
does following:
- Gets free pool from pci fpavf array.
- Uses mbox to communicate fpapf driver about,
  * gpool-id
  * pool block_sz
  * alignemnt
- Programs fpavf pool boundary.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
1c842786fe mempool/octeontx: probe fpavf PCIe devices
A mempool device is set of PCIe vfs.
On Octeontx HW, each mempool devices are enumerated as
separate SRIOV VF PCIe device.

In order to expose as a mempool device:
On PCIe probe, the driver stores the information associated with the
PCIe device and later upon application pool request
(e.g. rte_mempool_create_empty), Infrastructure creates a pool device
with earlier probed PCIe VF devices.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:30:50 +02:00
Santosh Shukla
8700239f77 mempool/octeontx: add build and log infrastructure
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:24:07 +02:00
Santosh Shukla
797aa0a5e2 mempool/octeontx: add HW constants
add HW constants of octeontx fpa mempool device.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-08 19:24:04 +02:00
Thomas Monjalon
d4af27d9d0 drivers/dpaa: remove duplicate includes
Fixes: 866c306ff0 ("mempool/dpaa: support NXP DPAA mempool")
Fixes: 37f9b54bd3 ("net/dpaa: support Tx and Rx queue setup")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 19:10:19 +02:00
Shreyansh Jain
866c306ff0 mempool/dpaa: support NXP DPAA mempool
This Mempool driver works with DPAA BMan hardware block. This block
manages data buffers in memory, and provides efficient interface with
other hardware and software components for buffer requests.

This patch adds support for BMan. Compilation would be enabled in
subsequent patches.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-10-06 02:49:50 +02:00
Hemant Agrawal
f31f728883 mempool/dpaa2: fix freeing bp list
The dpaa2_bp_list is being allocated using "rte_malloc",
but the free is done using "free". Fixing it to use
"rte_free".

Fixes: 5dc43d22b5 ("mempool/dpaa2: add hardware offloaded mempool")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-21 09:28:22 +03:00
Hemant Agrawal
6ed4390e5e mempool/dpaa2: fix error code for allocation failure
In case the alloc api is not able to allocate the required
number of buffer, it can return '0', which will not indicate
the failure to the calling function.
This patch fix the return value to indicate the failure.

Fixes: 5dc43d22b5 ("mempool/dpaa2: add hardware offloaded mempool")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-21 09:27:58 +03:00
Hemant Agrawal
6a60f7de06 mempool/dpaa2: allocate pool data dynamically
In order to support multiprocess applications, pool data is to be
allocated on dynamic memory instead of existing usages of global
variable.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-21 09:27:57 +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
645bd25ad8 drivers: add newline in dpaa2 logs
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-14 16:01:30 +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
Hemant Agrawal
5dc43d22b5 mempool/dpaa2: add hardware offloaded mempool
DPAA2 Hardware Mempool handlers allow enqueue/dequeue from NXP's
QBMAN hardware block.
CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS is set to 'dpaa2', if the pool
is enabled.

This memory pool currently supports packet mbuf type blocks only.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Shreyansh Jain
1263b426ff mempool: move stack handler as a driver
Moved from lib/librte_mempool, stack mempool handler is an independent
driver.
Shared builds would now require to link in librte_mempool_stack for
"stack" mempool handler.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-03 19:45:45 +02:00
Shreyansh Jain
9a8e9b57f5 mempool: move ring handler as a driver
Moved from lib/librte_mempool, ring mempool is now an independent
driver.
Shared builds would now need to add librte_mempool_ring for:
* ring_mp_mc
* ring_sp_sc
* ring_sp_mc
* ring_mp_sc

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-03 19:45:45 +02:00