When adding a VF MAC address, rte_eth_dev_mac_addr_add is called.
It's not right, because this API is used to add a MAC address for
a VMDq pool not a VF. Although it can work on ixgbe as VMDq pool
and VF mean the same thing on ixgbe.
Fixes: 7741e4cf16 ("app/testpmd: VMDq and DCB updates")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
When PF is reset, a message will show it and all its
VF need to be reset.
User can run the command "port reset port_id"
to reset the VF port and to keep same port id without
any configuration. Then user can run "port stop port_id"
and "port start port_id" to reconfigure its forwarding
mode and parameters as previous ones.
To avoid crash, current forwarding should be stopped
before running "port reset port_id".
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
In crypto latency test, when some crypto operations cannot be
enqueued, they are returned to its mempool.
However, instead of freeing the operations in the array passed
to the enqueue function, the app was freeing the operations
in the array passed to the dequeue function, leading to incorrect
results.
Fixes: 15b55dd751 ("app/crypto-perf: return crypto ops to mempool in bulk")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Memory is reserved after each crypto operation
for the necessary IV(s), which could be for cipher,
authentication or AEAD algorithms.
However, for AEAD algorithms (such as AES-GCM), this
memory was not being reserved, leading to potential
memory overflow.
Fixes: 8a5b494a7f ("app/test-crypto-perf: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The lsc_interrupt flag is enabled by default, and when the --tx-first is
used as a command line parameter, the 32 packets can be sent out before
the link state is up, resulting in the loss of the packets, and no further
forwarding will take place.
E.g. ./build/app/testpmd -c f0 -- --tx-first --stats-period 1
When the --tx-first is used, the lsc_interrupt flag needs to be disabled,
ensuring the links are up before forwarding traffic. Therefore, during the
parameter checking at startup, if --tx-first is used, we now warn the user,
and set lsc_interrupt to 0.
Fixes: 99cabef088 ("app/testpmd: add parameter to start forwarding Tx first")
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In testpmd, GRO is supported by csum forwarding engine, but the cmdline
message shows GRO is supported by io forwarding engine. This patch is
to fix this issue.
Fixes: b40f8d782b ("app/testpmd: enable TCP/IPv4 GRO")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
pkts == 0 will result in divide by zero case.
Added a check to fix it.
Coverity issue: 158652
Fixes: 9d3aeb185e ("app/testeventdev: launch perf lcores")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The corrupted code checks only RAW flow item type special case for
returning its size but doesn't deal with any other flow item type
and returns 0 for all the others.
This bug leaves the flow descriptor empty for non RAW types.
The fix takes the correct size to any regular types from appropriate
array.
The same issue, with a similar fix, is in flow action size method which
deals only with RSS special type.
Fixes: 938a184a18 ("app/testpmd: implement basic support for flow API")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The device state should be handled by the ethdev layer when possible.
Applications should not have to do it.
Not setting the state to UNUSED will make the port_id of the device
valid for all ethdev API functions, usually resulting in segfault.
Fixes: 284c908cc5 ("app/testpmd: request device removal interrupt")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Tested-by: Shachar Beiser <shacharbe@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When using CSV, the output of the throughput performance numbers
was not correct, representing decimal numbers incorrectly.
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
If the crypto operation pool size is too small,
the pool might run out of operations, if all the crypto operations
are still being used and have not been freed.
To inform the user about this, the application should display
an error message, asking the user to increase the pool size
through the app parameters.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
when creating a bond device in testpmd, a name for a device must meet
the correct convention described in the documentation:
The device name must start with the net_bonding prefix
followed by numbers or letters.
Change for ALB mempool allocation - mem_name was too long.
Fixes: 9bf4901d1a ("bus/vdev: remove probe with driver name option")
Cc: stable@dpdk.org
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
While matching user input against a token name or any other fixed string,
comparison stops at the end of user input if shorter (e.g. "foo" matches
token name "foobar").
Although the unintended consequence of this behavior allows users to
abbreviate command names and various parameters yet generate valid
commands, the parser was not designed to support this and does not prevent
ambiguous tokens.
For instance, entering "i" for a pattern item matches "ipv4", "ipv6" and
"icmp" then defaults to one of them in an unspecified manner.
Prevent this behavior by taking the length of fixed strings into account.
Fixes: 19c90af628 ("app/testpmd: add flow command")
Fixes: 5ac3502ed1 ("app/testpmd: add flow query command")
Fixes: abc3d81aca ("app/testpmd: add item raw to flow command")
Fixes: 05d34c6e9d ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Support for dynamic tokens was added in order to implement the flow command
in testpmd, for which static tokens were not versatile enough due to the
large number of possible parameter combinations.
However, due to its reliance on a temporary array to store dynamic tokens,
this interface suffers from various limitations that need to be addressed
in order to implement more commands in the future:
- The maximum number of dynamic tokens is determined at compilation time
(CMDLINE_PARSE_DYNAMIC_TOKENS). The larger this value, the more stack
space is wasted (one pointer per potential token, i.e. 1kB of stack space
on 64-bit architectures with the default value).
- This temporary array is actually a cache in which entries already present
are not regenerated. This behavior is not documented, which makes dynamic
tokens practically unusable by applications as they do not know which
token is current.
- The cache does not really reduce the number of function calls needed to
retrieve tokens, it was mainly deemed useful to provide context about
other tokens to the generator callback.
- Like testpmd, most users will likely use repeated pointers to a fixed
token header structure (cmdline_token_hdr_t), with internal context-aware
callbacks that do not need to look at other entries; knowing the index of
the current token is enough.
Getting rid of the temporary array and properly documenting usage of the
token generator callback greatly simplifies this interface.
Fixes: 4fffc05a2b ("cmdline: support dynamic tokens")
Fixes: 19c90af628 ("app/testpmd: add flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Call of rte_cryptodev_stop() function from test destructors
is added.
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Additional Authenticated Data (AAD) is called "aad" in most
places of cryptodev, but it was called "add_auth_data"
in the AEAD transform transform (aead_xform).
This field is renamed to "aad_length" in order to keep
consistency.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Additional Authenticated Data (AAD) was removed from the
authentication parameters, but still the supported size
was part of the authentication capabilities of a PMD.
Fixes: 4428eda8bb ("cryptodev: remove AAD from authentication structure")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch add support for different aggregator modes in similar manner
that is provided in linux kernel.
testpmd> set bonding agg_mode <port_id> <agg_name>
testpmd> show bonding config <port_id>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Providing this parameter requests flow API isolated mode on all ports at
initialization time. It ensures all traffic is received through the
configured flow rules only (see flow command).
Ports that do not support this mode are automatically discarded.
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This patch enables TCP/IPv4 GRO library in csum forwarding engine.
By default, GRO is turned off. Users can use command "gro (on|off)
(port_id)" to enable or disable GRO for a given port. If a port is
enabled GRO, all TCP/IPv4 packets received from the port are performed
GRO. Besides, users can set max flow number and packets number per-flow
by command "gro set (max_flow_num) (max_item_num_per_flow) (port_id)".
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Remove the dependency of this subsystem upon bus specific device
representation.
Devargs only validates that a device declaration is correct and handled
by a bus. The device interpretation is done afterward within the bus.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Replace the incorrect reference to "Cavium Networks", "Cavium Ltd"
company name with correct the "Cavium, Inc" company name in
copyright headers.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This is a performance test case that aims at testing the following:
1. Measure the number of events can be processed in a second.
2. Measure the latency to forward an event.
The atq queue test functions as same as "perf_queue" test.
The difference is, it uses, "all type queue" scheme instead of separate
queues for each stage and thus reduces the number of queues required to
realize the use case and enables flow pinning as the event does not
move to the next queue.
Example command to run perf "all types queue" test:
sudo build/app/dpdk-test-eventdev --vdev=event_octeontx --\
--test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=1000000000
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This is a performance test case that aims at testing the following:
1. Measure the number of events can be processed in a second.
2. Measure the latency to forward an event.
The perf queue test configures the eventdev with Q queues and P ports,
where Q is nb_producers * nb_stages and P is nb_workers + nb_producers.
The user can choose the number of workers, the number of producers and
number of stages through the --wlcores , --plcores and the --stlist
application command line arguments respectively.
The producer(s) injects the events to eventdev based the
first stage sched type list requested by the user through --stlist
the command line argument.
Based on the number of stages to process(selected through --stlist),
the application forwards the event to next upstream queue and
terminates when it reaches the last stage in the pipeline.
On event termination, application increments the number events
processed and print periodically in one second to get the
number of events processed in one second.
When --fwd_latency command line option selected, the application
inserts the timestamp in the event on the first stage and then
on termination, it updates the number of cycles to forward
a packet. The application uses this value to compute the average
latency to a forward packet.
Example command to run perf queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- --test=perf_queue\
--slcore=1 --plcores=2 --wlcore=3 --stlist=p --nb_pkts=1000000000
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The event producer and master lcore's test termination and
the logic to print the mpps and latency are common for the
queue and all types queue test.
Move them as the common function.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Setup one port per worker and link to all queues and setup
N producer ports to inject the events.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
add functions to create mempool, destroy mempool and print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
perf test has the queue and all types queue variants.
Introduce test_perf_common* to share the common code between those tests.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This test verifies the same aspects of order_queue test,
The difference is the number of queues used, this test
operates on a single "all types queue"(atq) instead of two
different queues for ordered and atomic.
Example command to run order all types queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_octeontx --\
--test=order_atq --plcores 1 --wlcores 2,3
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The order queue test configures the eventdev with two queues
and an event producer to inject the events to q0(ordered) queue.
Both q0(ordered) and q1(atomic) are linked to all the workers.
The event producer maintains a sequence number per flow and
injects the events to the ordered queue.
The worker receives the events from ordered queue and
forwards to atomic queue. Since the events from an ordered queue can
be processed in parallel on the different workers, the
ingress order of events might have changed on the downsteam
atomic queue enqueue. On enqueue to the atomic queue, the eventdev PMD
driver reorders the event to the original ingress order
i.e producer ingress order).
When the event is dequeued from the atomic queue by the worker,
this test verifies the expected
sequence number of associated event per flow by comparing
the free running expected sequence number per flow.
Example command to run order queue test:
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 --\
--test=order_queue --plcores 1 --wlcores 2,3
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The event producer and master lcore's test end and
failure detection logic are common for the queue and
all types queue test.Move them as the common function.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Setup one port per worker and link to all queues and setup
one producer port to inject the events.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
add functions to create mempool, destroy mempool,
dump the options, check the options and print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
order test has the queue and all types queue variants. Introduce
test_order_common* to share the common code between those tests.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This patch retrieves the test ops from the given test case name and
invokes the registered test ops callbacks in order and
print the test result.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Add an infrastructure for updating the options through
application specific command line arguments.
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Define the test options that used across all test cases and
fill the default values for the same.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>