Add pktmbuf pool creation used when configuring ethernet device as event
producer.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Modify app setup to accommodate event port and queue setup based on the
number of ethernet ports.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add command line option --prod_type_ethdev to specify that the events
are generated by ethernet device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
The octeontx event device doesn't store the queues to port mapping as a
result it cannot return the exact number of queues unlinked from a port
when application wants to unlink all the queues mapped (supplies queues
param as NULL).
Using links_map we can determine the exact queues mapped to a specific
port and unlink them.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
This commit modifies the sw PMD credit scheme such that credits are
consumed when enqueueing a NEW event and released when an event is
released -- typically, the beginning and end of a pipeline. Workers that
simply forward events do not interact with the credit pool.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit introduces a capability for disabling the "implicit" release
functionality for a port, which prevents the eventdev PMD from issuing
outstanding releases for previously dequeued events when dequeuing a new
batch of events.
If a PMD does not support this capability, the application will receive an
error if it attempts to setup a port with implicit releases disabled.
Otherwise, if the port is configured with implicit releases disabled, the
application must release each dequeued event by invoking
rte_event_enqueue_burst() with RTE_EVENT_OP_RELEASE or
RTE_EVENT_OP_FORWARD.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit introduces dynamically-sized IQs, by switching the underlying
data structure from a fixed-size ring to a linked list of queue 'chunks.'
This has a number of benefits:
- Certain corner cases were observed in which all of a pipeline's flows
could be pinned to one port for extended periods, effectively turning a
multi-core pipeline into single-core one. This was caused by an event
producer having a larger new_event_threshold than the IQ depth, and
injecting large numbers of packets that are ultimately backpressured in a
worker's rx_ring, causing those packets' flows to be scheduled to that
port.
The dynamically sized IQ does not have this problem because each IQ can
grow large enough to store all the system's events, such that
backpressure will not reach the worker_ring.
- Slight performance improvement (~1-2%) in high throughput scenarios,
tested with eventdev_pipeline_sw_pmd.
This implementation has a small increase in the queue storage memory
footprint (~70KB). This commit also removes the iq_size xstat, which no
longer applies to this implementation.
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit reinitializes a queue before it is reconfigured, such that
reorder buffer memory is not leaked.
This bug masked a few other problems, which this commit corrects as well:
- sw_port_link() allowed a port to link to a queue twice, such that the
port could then successfully unlink the queue twice. Now the link
function checks whether a port is already linked to the queue, and if so
returns success but doesn't assign the a port a second slot in the
queue's cq map.
- test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice
from the same port, and expecting the second unlink to succeed. Now the
test unlinks, links, then unlinks again.
- test_eventdev.c's test_eventdev_link_get() was linking a single queue but
expecting the unlink function to return nb_queues (where nb_queues > 1).
The test now checks for a return value of 1.
Fixes: 5ffb2f142d ("event/sw: support event queues")
Fixes: 371a688fc1 ("event/sw: support linking queues to ports")
Fixes: f8f9d233ea ("test/eventdev: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
octeontx test application was using non RTE_EVENT_TYPE_CPU
event type to generate the event from CPU. Upon the introduction
of ethdev Rx adapter, RTE_EVENT_TYPE_ETHDEV has special
meaning. So avoid using non RTE_EVENT_TYPE_CPU event types
to inject events from CPU.
Fixes: d0d6549860 ("net/octeontx: support event Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
The return value for rte_event_port_{link, unlink}() is defined as the
"number of {links, unlinks} actually established." However, the eventdev
layer's error checking returns negative error values. This commit aligns
the eventdev code with the API definition by having it set rte_errno and
return 0 if it detects an error.
Fixes: 4f0804bbdf ("eventdev: implement the northbound APIs")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
- sample application performing a loop-back over ethernet using
a bbbdev device
- 'turbo_sw' PMD must be enabled for the app to be functional
- a packet is received on an ethdev port -> enqueued for baseband
encode operation -> dequeued -> enqueued for baseband decode
operation-> dequeued -> compared with original signal -> looped-back
to the ethdev port
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
- full test suite for bbdev
- test App works seamlessly on all PMDs registered with bbdev
framework
- a python script is provided to make our life easier
- supports execution of tests by parsing Test Vector files
- test Vectors can be added/deleted/modified with no need for
re-compilation
- various tests can be executed:
(a) Throughput test
(b) Offload latency test
(c) Operation latency test
(d) Validation test
(c) Sanity checks
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
- bbdev 'turbo_sw' is the software accelerated version of 3GPP L1
Turbo coding operation using the optimized Intel FlexRAN SDK libraries.
- 'turbo_sw' pmd is disabled by default
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
- 'bbdev_null' is a basic pmd that performs a minimalistic
bbdev operation
- useful for bbdev smoke testing and in measuring the overhead
introduced by the bbdev library
- 'bbdev_null' pmd is enabled by default
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
- wireless baseband device (bbdev) library files
- bbdev is tagged as EXPERIMENTAL
- Makefiles and configuration macros definition
- bbdev library is enabled by default
- release notes of the initial version
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
rte_member may have allocated a tailq entry or setum before failure,
so free them.
Fixes: 857ed6c68c ("member: implement main API")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.
Fixes: aecb8e093b ("event/octeontx: introduce specialized mbox message copy")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference
counter uses an atomic operation. This is not necessary and impacts
the performance (seen with TRex traffic generator).
We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update()
because it would add an additional check.
Solves this by introducing __rte_mbuf_refcnt_update(), which
updates the reference counter without doing anything else.
Fixes: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")
Cc: stable@dpdk.org
Suggested-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Move all static variables defined in header file to c file.
error log: /usr/bin/ld: Warning: size of symbol 'count' changed
from 8 in test_pmd_perf.o to 24 in test_flow_classify.o
Fixes: 50bdac5916 ("flow_classify: remove table id parameter from API")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Remove the requirement to have a port bound to igb_uio in
order to run this test suite.
Fixes: 9c9befea4f ("test: add flow classify unit tests")
Cc: stable@dpdk.org
Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the
counter's memory and lead to mz[] memory cannot be freed.
Fixd by extend to mz[RTE_MAX_MEMZONE + 1].
Fixes: ff909fe21f ("mem: introduce memzone freeing")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
No need to free a NULL memzone. It will cause test
termination.
Fixes: 71330483a1 ("test/memzone: fix memory leak")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
When reserving memzones in autotest, it makes no sense to expect a
failed memzone reserve when we specify both size flags - instead,
we should expect a memzone reserved with one of the two sizes.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
delete_bulk() copies metadata to pointers provided by the entries
parameter, but in the unit test, they are uninitialized, leading
to rte_table attempting to memcpy into random garbage pointers.
Memsetting pointer table to zero will prevent that from happening.
Fixes: 48f2543cf0 ("app/test: add bulk adding and deleting")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
If test set up couldn't be completed, the test was previously
shown as succeeding, even though setup failed. Fix this to report
test as failed, and count all tests that should've been executed,
as failed as well.
Fixes: ffac67b1f7 ("app/test: new assert macros and test suite runner")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
The cryptodev tests are updated to return SKIPPED instead
of failing if the PMD is not enabled, allowing test
infrastructure to identify that the test was not able to run.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit allows a test to return "skipped", indicating
that it cannot be run. This is useful for PMDs which have
not been compiled due to the unavailability of dependencies,
or their explicit disabling in the build configuration.
The result printing is updated to correctly indicate if a
test has been skipped.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
With this patch the test binary checks the DPDK_TEST
environment variable and if set, the contents of the var
are inserted on the test app command line, and run.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
As discussed on the mailing list, the alignment constraint of
the ring structure can be relaxed.
Link: http://dpdk.org/dev/patchwork/patch/25039
Link: http://dpdk.org/dev/patchwork/patch/26103
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Unlike every other DPDK application's compilation, proc_info's
compilation cannot be turned off on Linux. Fix it by adding a
config option to base linuxapp config.
Fixes: 22561383ea ("app: replace dump_cfg by proc_info")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
If an invalid number of TX queues is configured from testpmd run-time
command like "port config all txq number" or from --txq in the command
to start testpmd, the global variable nb_txq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid txq setting and keeps its last correct value.
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
If an invalid number of RX queues is configured from testpmd run-time
command like "port config all rxq number" or from --rxq in the command
to start testpmd, the global variable nb_rxq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid rxq setting and keeps its last correct value.
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
On error, pthread_create() returns a positive number (an errno)
but does not set the errno variable.
Fixes: 278f945402 ("pdump: add new library for packet capture")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
This patch fixes the following compilation errors in bsdapp
lib/librte_eal/bsdapp/eal/eal.c:782:5:
error: no previous prototype for function 'rte_vfio_clear_group'
int rte_vfio_clear_group(int vfio_group_fd)
^
lib/librte_eal/bsdapp/eal/eal.c:782:30:
error: unused parameter 'vfio_group_fd'
int rte_vfio_clear_group(int vfio_group_fd)
^
Fixes: c564a2a200 ("vfio: expose clear group function for internal usages")
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Remove RTE_LOG_LEVEL config option, use existing RTE_LOG_DP_LEVEL config
option for controlling datapath log level.
RTE_LOG_LEVEL is no longer needed as dynamic logging can be used to
control global and module specific log levels.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Use global default loglevel to DEBUG(8) and dynamic default loglevel
to INFO(7).
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Update the logs test to also validate the dynamic log framework.
For now, also keep the old way using the static USER type.
Validated with:
# build/app/test --no-huge
...
RTE>>logs_autotest
== dynamic log types
error message
critical message
critical message
error message
== static log types
TESTAPP1: error message
TESTAPP1: critical message
TESTAPP2: critical message
TESTAPP1: error message
Test OK
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Instead of relying on a compile-time option, use the global log-level
to decide if the hexdumps should be displayed in the tests.
Valitation:
# build/app/test --no-huge
RTE>>crc_autotest
Test OK
# build/app/test --no-huge --log-level=8
RTE>>crc_autotest
[many hexdumps...]
Test OK
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Make max vfio groups compile-time configurable so that platforms can
choose vfio group limit.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>