The macro __rte_cache_aligned is better suited for aligning
a structure on a cache line (of any size).
Fixes: 15c4318640 ("app/flow-perf: add packet forwarding support")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Wisam Jaddo <wisamm@mellanox.com>
Introduce packet forwarding support to the app to do
some performance measurements.
The measurements are reported in term of packet per
second unit. The forwarding will start after the end
of insertion/deletion operations.
The support has single and multi performance measurements.
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Introduce new feature to dump memory statistics of each socket
and a total for all before and after the creation.
This will give two main advantage:
1- Check the memory consumption for large number of flows
"insertion rate scenario alone"
2- Check that no memory leackage after doing insertion then
deletion.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Add the ability to test deletion rate for flow performance
application.
This feature is disabled by default, and can be enabled by
add "--deletion-rate" in the application command line options.
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Add insertion rate calculation feature into flow
performance application.
The application now provide the ability to test
insertion rate of specific rte_flow rule, by
stressing it to the NIC, and calculate the
insertion rate.
The application offers some options in the command
line, to configure which rule to apply.
After that the application will start producing
rules with same pattern but increasing the outer IP
source address by 1 each time, thus it will give
different flow each time, and all other items will
have open masks.
The current design have single core insertion rate.
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
Caught by code review, bitops test name is incorrect.
Fixes: 7660614c11 ("test/bitops: add bit operations test case")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Phil Yang <phil.yang@arm.com>
To fill the gap with linux kernel eBPF implementation,
add support for two non-generic instructions:
(BPF_ABS | <size> | BPF_LD) and (BPF_IND | <size> | BPF_LD)
which are used to access packet data.
These instructions can only be used when BPF context is a pointer
to 'struct rte_mbuf' (i.e: RTE_BPF_ARG_PTR_MBUF type).
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Address for few small issues:
- unreachable return statement
- failed test-case can finish with 'success' status
Also use unified cmp_res() function to check return value.
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
MTU is used in testpmd to set the maximum payload size for packets.
According to testpmd, the setting influence RX only.
In rte_ethdev there's no relation between MTU setting and JUMBO offload
or rx_max_pkt_len.
The previous fix in patch referenced below was meant to update the
correlated variables of max_pkt_len and JUMBO offload, but by doing so
it assumes that MTU setting can only exist when JUMBO offload supported
in the device. For example fail-safe device does supports set MTU and
doesn't support JUMBO offload, and in this case, though set MTU
succeeds, an error message is still printed since the JUMBO packet
offload is disabled.
The fix separates the two conditions to make sure the error
triggers only in case the set_mtu action actually failed.
Fixes: 150c9ac2df ("app/testpmd: update Rx offload after setting MTU")
Cc: stable@dpdk.org
Signed-off-by: Shy Shyman <shys@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Add test cases for setting bit, clearing bit, testing
and setting bit, testing and clearing bit operation.
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
There are coverity defects related "Argument cannot be negative"
This patch fixes them by passing '-ret' to the function strerror() when
ret is negative.
Coverity issue: 349913, 358437, 358449, 358450
Fixes: da328f7f11 ("ethdev: change xstats reset function to return int")
Fixes: 9eb974221f ("app/testpmd: fix statistics after reset")
Cc: stable@dpdk.org
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Check returned value after strtok()
CID 355674 (#1 of 1): Dereference null return value (NULL_RETURNS)
4. dereference: Dereferencing a pointer that might be NULL s when
calling inet_pton
Fixes: 103809d032 ("app/test-fib: add test application for FIB")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Both bitratestats_autotest latency test initializes the metrics library.
It should be cleaned during exit.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
When set DCB in testpmd, there is a segmentation fault. It is
because the local variable rss_conf in get_eth_dcb_conf()
is not cleared, so that the pointer member variable rss_key has
a random address, which leads to an error in the following
processing. This patch initialized the local variable rss_conf
to avoid this situation.
Fixes: ac7c491c3f ("app/testpmd: fix DCB config")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Change printing of CPU cycles/packet to include fractional part for
accurateness.
Example:
Without patch:
CPU cycles/packet=14
(total cycles=4899533541 / total RX packets=343031966)
With patch:
CPU cycles/packet=14.28
(total cycles=4899533541 / total RX packets=343031966)
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
On aarch64 platforms, the cycles are counted using either a
low-resolution generic counter or a high-resolution PMU cycle counter.
Print the clock frequency along with CPU cycles/packet to identify which
cycle counter is being used.
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
The test case - test_stats is directly accessing the
cryptodev and its dev_ops which are internal to library
and should not be used directly by the application.
However, the test case is also missing to check for the
error ENOTSUP. It should skip the case if the API returns
ENOTSUP. This patch fixes these two issues.
Fixes: 202d375c60 ("app/test: add cryptodev unit and performance tests")
Cc: stable@dpdk.org
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Cryptodev doesn't limit the number of descriptors that can be supported
by the PMD.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
This is testpmd part of new line cleanup.
Fixes: 002ade70e9 ("app/test: measure cycles per packet in Rx/Tx")
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed
even after the memory allocation for "p_list" fails.
With this patch, this null pointer dereference is avoided as we
return when there is malloc failure.
Fixes: e088907bb8 ("app/testpmd: add command for getting loaded DDP profiles")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
One new cmdline option `--rx-mq-mode` is added in order to have the
possibility to check whether PMD handle the mq mode correctly or not.
The reason is some NICs need to do different settings based on different
RX mq mode, i.e RSS or not.
With this support in testpmd, the above scenario can be tested easily.
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
There is no way to report back a link speed of 200Gbps.
Adding 200G link speed.
Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Currently, when running start/clear stats&xstats/stop command many times
based on testpmd application, there are incorrect forward Rx/Tx-packets
stats as below:
---------------------- Forward statistics for port 0 --------------
RX-packets: 18446744073709544808 RX-dropped: 0 <snip>
TX-packets: 18446744073709536616 TX-dropped: 0 <snip>
--------------------------------------------------------------------
The root cause as below:
1. The struct rte_port of testpmd.h has a member variable "struct
rte_eth_stats stats" to store the last port statistics.
2. When running start command, it execute cmd_start_parsed ->
start_packet_forwarding -> fwd_stats_reset, which call
rte_eth_stats_get API function to save current port statistics.
3. When running stop command, it execute fwd_stats_display, which call
rte_eth_stats_get to get current port statistics, and then minus last
port statistics.
4. If we run clear stats or xstats after start command, then run stop,
it may display above incorrect stats because the current
Rx/Tx-packets is lower than the last saved RX/TX-packets(uint64_t
overflow).
This patch fixes it by clearing last port statistics when executing
"clear stats/xstats" command.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Currently, there is no way to check the aging event or to get the
current aged flows in testpmd, this patch include those implements, it's
included:
- Add new item "flow_aged" to the current print event command arguments.
- Add new command to list all aged flows, meanwhile, we can set
parameter to destroy it.
Signed-off-by: Dong Zhou <dongz@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
dev info is set but not used in
test_queue_pair_descriptor_setup().
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
In test_queue_pair_descriptor_setup() and
test_device_configure_invalid_queue_pair_ids a QAT specific
check is there, however the test case can be run on any PMD.
Hence removed the unnecessary check.
test_queue_pair_descriptor_setup and
test_device_configure_invalid_queue_pair_ids execution
need to be altered as the valid device values should be
configured in the end so that all other tests can be
executed.
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
dpaa_sec and dpaa2_sec PMDs can run generic
cryptodev_testsuite. Hence removing the specific
test suites.
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
cryptodevs which support rte_security PDCP protocol,
can run all PDCP cases if it sets a feature flag
RTE_CRYPTODEV_FF_SECURITY. Previously, only dpaa2_sec
and dpaa_sec test suites were running these tests.
Now it is moved to generic test suite with a check
on the feature flag and the case will be skipped if it
is not supported by the PMD.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
The session init routine rte_cryptodev_sym_session_init(),
could return -ENOTSUP when the requested algo combination
is not supported by the PMD. This should be treated as
unsupported feature.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
There were some PMD specific checks to skip the case if
it is not supported. This patch checks the feature flag
RTE_CRYPTODEV_FF_SYM_SESSIONLESS if PMD supports it or not.
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Checked the PMD feature flag list to identify if
inplace or OOP SGLs are supported or not. If not supported
the cases are skipped.
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Skipped the test cases for the PMDs which do not support
RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA and subsequently
removed the PMD specific checks for running that case.
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
The session init routine rte_cryptodev_sym_session_init(),
could return -ENOTSUP when the requested algo combination
is not supported by the PMD. This should be treated as
unsupported features. For other return values like -EINVAL
or -ENOMEM the test can be treated as failure.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
For null cipher the iv length should be set to zero.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
This patch disables displaying sample test vector contents when
executing throughput and latency tests as the sample data is not
used in those tests (not copied to input mbuf in order to achieve
better performance).
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
After re-enabling checks for non-implemented ops in non-debug mode
in librte_security set_pkt_metadata and get_userdata functions,
tests verifying proper work of tests can be enabled also.
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Add new test-case to measure performance of
IPsec data-path functions.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This commit fixes failures of the flow_classify_autotest when
ran on dual-socket servers, as the sample application does not
support more than a single socket. Increasing the NB_SOCKETS
value allows the test to run successfully.
Fixes: 9c9befea4f ("test: add flow classify unit tests")
Cc: stable@dpdk.org
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
The autotest application build was partially enabled for building with
the net/bond driver disabled, but a number of items were missed, leading
to build errors when the driver was disabled, e.g. by simply doing
"-Ddisable_drivers=net/*" when calling meson.
../app/test/test_link_bonding.c:25:10: fatal error: rte_eth_bond.h: \
No such file or directory
With this fix in place, it's possible to build DPDK with meson with all
non-bus, non-mempool drivers disabled i.e. using meson option
-Ddisable_drivers=baseband/*,compress/*,crypto/*,event/*,net/*,raw/*,vdpa/*
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
The size checking is done in the caller. The size parameter is an
unsigned (64b wide) right now, so the comparison with zero should be
enough in most cases. But it won't help in the following case.
If the allocating request input a huge number by mistake, e.g., some
overflow after the calculation (especially subtraction), the checking
in the caller will succeed since it is not zero. Indeed, there is not
enough space in the system to support such huge memory allocation.
Usually it will return failure in the following code. But if the
input size is just a little smaller than the UINT64_MAX, like -2 in
signed type.
The roundup will cause an overflow and then "reset" the size to 0,
and then only a header (128B now) with zero length will be returned.
The following will be the previous allocation header.
It should be OK in most cases if the application won't access the
memory body. Or else, some critical issue will be caused and not easy
to debug. So this issue should be prevented at the beginning, like
other big size failure, NULL pointer should be returned also.
Fixes: fdf20fa7be ("add prefix to cache line macros")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit adds a basic test to check the cycle cost
of related to calling into a service.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
The functions added in this patch will make it easier for telemetry
to convert data to correct JSON responses to telemetry requests.
Tests are also added for these json utility functions.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
Invert the current trace point headers logic by making
rte_trace_point_register.h include rte_trace_point.h.
There is no more need for a RTE_TRACE_POINT_REGISTER_SELECT special macro
since including rte_trace_point_register.h itself means we want to
register trace points.
The unexplained "provider" notion is removed from the documentation and
rte_trace_point_provider.h is merged into rte_trace_point.h.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>