Adding support for graph specific API implementation like
Graph lookup to get graph object, retrieving graph ID
From name and graph name from ID.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding graph specific API implementations like graph create
and graph destroy. This detect loops in the graph,
check for isolated nodes and operation to verify the validity of
graph.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding support to create and populate the memory for graph reel.
This includes reserving the memory in the memzone, populating the nodes,
Allocating memory for node-specific streams to hold objects.
Once it is populated the reel memory contains the following sections.
+---------------------+
| Graph Header |
+---------------------+
| Fence |
+---------------------+
| Circular buffer |
+---------------------+
| Fence |
+---------------------+
| Node Object 0 |
+------------------- -+
| Node Object 1 |
+------------------- -+
| Node Object 2 |
+------------------- -+
| Node Object n |
+------------------- -+
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding internal graph API helpers support to check whether a graph has
isolated nodes and any node have a loop to itself and BFS
algorithm implementation etc.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding node debug API implementation support to dump
single or all the node objects to the given file.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding node-specific API implementation like cloning node, updating
edges for the node, shrinking edges of a node, retrieving edges of a
node.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Adding rte_node_register() API implementation includes allocating
memory for node object, check for duplicate node name and
add the allocated node to STAILQ node_list for future use.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Graph architecture abstracts the data processing functions as
"node" and "link" them together to create a complex "graph" to enable
reusable/modular data processing functions.
These APIs enables graph framework operations such as create, lookup,
dump and destroy on graph and node operations such as clone,
edge update, and edge shrink, etc. The API also allows creating the
stats cluster to monitor per graph and per node stats.
This patch defines the public API for graph support.
This patch also adds support for the build infrastructure and
update the MAINTAINERS file for the graph subsystem.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
return 0 instead of -EINVAL when there is not enough room to store one
object, as it can be helpful for applications to distinguish this
specific case.
As this is an ABI change, use symbol versioning to preserve old
behavior for binary applications.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Change references to ABI 20.0.1 to use ABI v21, see
https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines
"Major ABI versions are declared no more frequently than yearly.
Compatibility with the major ABI version is mandatory in subsequent
releases until a new major ABI version is declared."
Combined ABI policy and versioning in maintainers, add map files to the
filter to more closely monitor future ABI changes.
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Replace Wenzhuo Lu, Alvin Zhang and Konstantin Ananyev
with Wei Zhao and Jeff Guo.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Alvin Zhang <alvinx.zhang@intel.com>
Building OVS with dpdk, sparse complains about 64-bit constant being
passed as a normal integer that can't fit it:
error: constant 0xffffffffffffffff is so big it is unsigned long
Fixes: ecbc857013 ("ethdev: add PFCP header to flow API")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Caught by code inspection, for little endian, RTE_LEXX macros should
provide rte_leXX_t type values.
Fixes: b75667ef9f ("eal: add static endianness conversion macros")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Some popular vswitch implementation might use a gcc option that
complains about missing enums in switch statements.
Fix this by listing all possible values.
Fixes: 664ff4b172 ("ring: introduce peek style API")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Updating ARM v7 and v8 maintainer. Gavin is leaving Arm.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Currently, shutdown for l3fwd-power application is all over the place
and may or may not happen either in the signal handler or in the main()
function. Fix this so that the signal handler will only set the exit
variable, thereby allowing all of the loops to end properly and proceed
to deinitialize everything.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Currently, if power library initialization fails, only a log message is
displayed. This is suboptimal for a number of reasons, but the main one
is that telemetry mode does not depend on the power library and can
therefore run in environments where l3fwd-power would normally not run
correctly (such as inside a VM). This will lead to attempts to
deinitialize the power library on exit, with a subsequent forced unclean
shutdown of DPDK.
Fix this by only initializing the power library in modes that actually
need it, and change a log message to a failure to initialize.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Now we need to add prefix like lib. to enable the log,
also changing val 8 to "debug"" which would be more descriptive.
Fixes: ffb9fd1b08 ("log: update legacy modules dynamic logs regex")
Cc: stable@dpdk.org
Reported-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Volatile has no ordering semantics. The rte_timer structure defines
timer status as a volatile variable and uses the rte_r/wmb barrier
to guarantee inter-thread visibility.
This patch optimized the volatile operation with c11 atomic operations
and one-way barrier to save the performance penalty. According to the
timer_perf_autotest benchmarking results, this patch can uplift 10%~16%
timer appending performance, 3%~20% timer resetting performance and 45%
timer callbacks scheduling performance on aarch64 and no loss in
performance for x86.
Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Fix build errors caused by using Unix-specific functions in common code.
Hide and disable command-line options related to tracing on Windows.
Fixes: 3d26a70ae3 ("trace: add trace configuration parameter")
Fixes: 3b155d24bd ("trace: hook subsystem to Linux")
Reported-by: Pallavi Kadam <pallavi.kadam@intel.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
When having QinQ VLAN headers in the packet, parse_ethernet
is capable of parsing only the first VLAN.
Add parsing for QinQ VLAN headers in the packet.
Fixes: 51f694dd40 ("app/testpmd: rework checksum forward engine")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring
port vlan stripping. bnxt_setup_one_vnic keeps incrementing the
vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic.
Fixes: cfadfee41e ("net/bnxt: fix VLAN strip")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
During port 0 rxq 1 start ie queue start,
bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array.
Due to this we overwrite the queue with fresh mbuf allocations
causing previously allocated mbufs to leak.
Add a check before allocating mbuf to replenish only empty mbuf slots
in the RxQ.
Fixes: 2eb53b134a ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Some compilers (on RHEL7 and CentOS7) were getting this error:
error: "RTE_EXEC_ENV_FREEBSD" is not defined [-Werror=undef]
Existence of a macro must be checked with "#ifdef" or "#if defined".
Fixes: d72e4042c5 ("mem: exclude unused memory from core dump")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
For PCI devices presented through igb_uio, pcidev->mem_resource[] is
not populated when the device is initialized for secondary process.
Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
Fixes: eee16c964c ("pci: support multiple PCI regions per device")
Cc: stable@dpdk.org
Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Debian and Ubuntu switched years ago from /usr/share/hwdata to
/usr/share/misc, and the former is just a compat symlink now.
We are starting to get bug reports to nudge us into changing.
So check the new path first, and the old one as a fallback.
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The EAL options and app-specific options are separated
with double dashes.
The help of testpmd, test-acl and pdump were missing
the dashes after EAL options.
Note: testpmd was completely missing the EAL options.
Fixes: af75078fec ("first public release")
Fixes: 26c057ab6c ("acl: new test-acl application")
Fixes: b2854d5317 ("app/pdump: support multi-core capture")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
rte_timer_subsystem_initialized is a global variable that can be
accessed by multiple processes simultaneously. Hence, any access
to rte_timer_subsystem_initialized should be protected by
rte_mcfg_timer_lock.
Fixes: f9d6cd8bfe ("timer: fix resource leak in finalize")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Change hash function from jhash to crc.
Precalculate hash signatures for a bulk of keys and then
use rte_hash_lookup_with_hash_bulk_data() to speed up sad lookup
Also use rte_hash_add_key_with_hash and _del_key_with_hash with
precalculated hash signature for a key in rte_ipsec_sad_add and
rte_ipsec_sad_del
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Implement rte_hash_lookup_with_hash_bulk_data() and
rte_hash_lookup_with_hash_bulk() - bulk lookup
functions with precomputed hash signatures.
Add these two functions into performance tests.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
All recent POWER systems, Power 8 and 9 specifically, support an IOMMU
(it can't be disabled). The functionality of the IOMMU is different
depending on whether it's running on a bare metal PowerNV system or in
a virtual environment (PowerVM LPAR or KVM/QEMU). DPDK currently
supports the IOMMU found on PowerNV platforms, sPAPRv2, so IOVA=VA
mode can be enabled when the correct platform is detected.
The POWER IOMMU type can't be detected through mechanisms such as
parsing files in the /sys hierarchy like x86_64 systems so the
/proc/cpuinfo file is parsed to determine whether Linux is running
on bare metal (i.e. PowerNV) or in a virtual environment (KVM/QEMU).
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Ignore the internal version ABI check, this kind of ABI is used only
by drivers and libraries.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Add checks during build to ensure that all symbols in the INTERNAL
version map section have __internal tags on their definitions, and
enable the warnings needed to announce their use.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Introduce the __rte_internal tag to mark internal ABI function which is
used only by the drivers or other libraries.
Like for __rte_experimental, this tag must be on a separate line before
function proprotypes.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
In addition, do a formal parameter check.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Do a formal parameter check of mtu length, as well as
checking the the various inputs for validity. If any
aren't acceptable, we bail.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Currently, even though memory is mapped with PROT_NONE, this does not
cause it to be excluded from core dumps. This is counter-productive,
because in a lot of cases, this memory will go unused (e.g. when the
memory subsystem preallocates VA space but hasn't yet mapped physical
pages into it).
Use `madvise()` call with MADV_DONTDUMP/MADV_NOCORE to exclude the
unused memory from being dumped.
Signed-off-by: Li Feng <fengli@smartx.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Commit 8a4baf06c1 ("mem: mark pages as not accessed when reserving VA")
has mapped the initialized memory with PROT_NONE, and when it's unmapped,
eal_memalloc.c should remmap the anonymous memory with PROT_NONE too.
Fixes: 8a4baf06c1 ("mem: mark pages as not accessed when reserving VA")
Cc: stable@dpdk.org
Signed-off-by: Li Feng <fengli@smartx.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Fix spelling errors in comments (found with codespell).
Note that "inbetween" is not correct in English and should
either be two words or better yet, the in can be dropped.
https://www.grammarly.com/blog/in-between-or-inbetween/
Fixes: 12f45fa7e2 ("eal/arm: read timer from PMU if enabled")
Fixes: 096ffd811f ("eal/x86: use lock-prefixed instructions for SMP barrier")
Fixes: 1d406458db ("mem: make segment preallocation OS-specific")
Fixes: bb372060da ("malloc: make heap a doubly-linked list")
Fixes: 7353ee7344 ("fbarray: add API to find biggest used or free chunks")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>