Commit Graph

2058 Commits

Author SHA1 Message Date
Thomas Monjalon
f7a4996c04 app/flow-perf: use macro for cache alignment
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>
2020-06-30 11:57:46 +02:00
Wisam Jaddo
15c4318640 app/flow-perf: add packet forwarding support
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>
2020-06-29 15:47:36 +02:00
Wisam Jaddo
662a72342a app/flow-perf: add memory dump to app
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>
2020-06-29 15:47:36 +02:00
Wisam Jaddo
c12f4f217d app/flow-perf: add deletion rate calculation
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>
2020-06-29 15:47:36 +02:00
Wisam Jaddo
bf3688f1e8 app/flow-perf: add insertion rate calculation
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>
2020-06-29 15:47:36 +02:00
Wisam Jaddo
3344cf2e30 app/flow-perf: add flow performance skeleton
Add flow performance application skeleton.

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
2020-06-29 15:47:36 +02:00
David Marchand
7506edbc1c test/bitops: fix command name
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>
2020-06-25 01:26:26 +02:00
Konstantin Ananyev
b901d92836 bpf: support packet data load instructions
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>
2020-06-24 23:42:04 +02:00
Konstantin Ananyev
83633ba230 test/bpf: fix few small issues
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>
2020-06-24 17:50:36 +02:00
Shy Shyman
3b931ddb5e app/testpmd: fix error detection in MTU command
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>
2020-06-16 19:21:07 +02:00
Joyce Kong
7660614c11 test/bitops: add bit operations test case
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>
2020-06-16 14:34:39 +02:00
Xiaolong Ye
72ea8d4050 test/mbuf: fix a dynamic flag log
Fixes: 4958ca3a44 ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-06-11 09:49:43 +02:00
Wei Hu (Xavier)
5fd722308e app/testpmd: fix stats error message
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>
2020-06-08 16:46:10 +02:00
Yunjian Wang
eb577e575d app/testpmd: fix memory leak on error path
This patch fixes the resource leak issue.

Fixes: e63b50162a ("app/testpmd: clean metering and policing commands")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-05-28 17:57:07 +02:00
Vladimir Medvedkin
5876077aba app/fib: fix parsing of invalid line
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>
2020-05-19 19:25:30 +02:00
Hemant Agrawal
d3f7095baf test: cleanup when leaving bitrate and latency tests
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>
2020-05-19 14:13:19 +02:00
Ting Xu
5139bc12b0 app/testpmd: fix DCB set
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>
2020-05-18 20:35:57 +02:00
Dharmik Thakkar
1920832a79 app/testpmd: print fractional part in CPU cycles
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>
2020-05-18 20:35:57 +02:00
Dharmik Thakkar
4c0497b1dd app/testpmd: print clock with CPU cycles per packet
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>
2020-05-18 20:35:57 +02:00
Apeksha Gupta
29fdc5bf45 test/crypto: fix statistics case
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>
2020-05-17 16:10:29 +02:00
Anoob Joseph
c140299940 test/crypto: remove tests for unsupported descriptors
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>
2020-05-15 19:43:17 +02:00
Pavan Nikhilesh
40984bf253 app/eventdev: check Tx adapter service ID
Fix unchecked return values reported by coverity.

Coverity issue: 357755
Fixes: 032a965a8f ("app/eventdev: support Tx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-05-14 15:16:37 +02:00
Pavan Nikhilesh
2e90885566 test/graph: fix memory leaks in performance tests
Fix memory leaks reported by Coverity.

Fixes: 61d77071ab ("test/graph: add performance tests")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-05-15 11:00:55 +02:00
Kiran Kumar K
c5a56c5897 test/graph: fix memory leaks in functional tests
Fix memory leaks reported by Coverity.

Fixes: 6b89650418 ("test/graph: add functional tests")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-05-15 11:00:18 +02:00
Kiran Kumar K
9330521cb8 test/graph: use better randomness
Fix weak crypto issues reported by Coverity.

Fixes: 6b89650418 ("test/graph: add functional tests")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-05-15 10:59:46 +02:00
Ivan Dyukov
a357d09d54 app: remove extra new line after link duplex
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>
2020-05-12 04:07:22 +02:00
Kalesh AP
489bdbbfc2 app/testpmd: fix memory failure handling for i40e DDP
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>
2020-05-11 22:27:39 +02:00
Xiaoyu Min
f9295aa220 app/testpmd: add option for Rx multi-queue mode
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>
2020-05-11 22:27:39 +02:00
Asaf Penso
f6eb393849 ethdev: add 200G link speed
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>
2020-05-11 22:27:39 +02:00
Wei Hu (Xavier)
9eb974221f app/testpmd: fix statistics after reset
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>
2020-05-11 22:27:39 +02:00
Dong Zhou
0e459ffa08 app/testpmd: support flow aging
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>
2020-05-11 22:27:39 +02:00
Akhil Goyal
03db7a513b test/crypto: remove unused variable
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
5bf52c656e test/crypto: remove QAT specific check
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
33c9e904fb test/crypto: remove dpaaX_sec specific test suites
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
e8c54147a7 test/crypto: run PDCP cases if supported
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
e9703a54e4 test/crypto: skip unsupported session
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
554bb73c25 test/crypto: skip unsupported session-less cases
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
c87ba0f079 test/crypto: skip unsupported scatter/gather cases
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>
2020-05-11 13:17:43 +02:00
Akhil Goyal
30563510a5 test/crypto: skip unsupported non-byte aligned cases
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>
2020-05-11 13:17:43 +02:00
Ankur Dwivedi
439d222ba0 test/crypto: handle unsupported error on session init
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>
2020-05-11 13:17:43 +02:00
Ankur Dwivedi
d954825a24 test/crypto: set null cipher IV length to zero
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>
2020-05-11 13:17:43 +02:00
Adam Dybkowski
16f25ee0bf app/crypto-perf: fix display of sample test vector
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>
2020-05-11 13:17:43 +02:00
Lukasz Wojciechowski
34e0ec71e4 test/security: enable tests for non-implemented ops
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>
2020-05-11 13:17:43 +02:00
Savinay Dharmappa
f7f3ac6dcb test/ipsec: add performance cases
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>
2020-05-11 13:17:43 +02:00
Harry van Haaren
8978ab3b03 test/flow_classify: enable multi-sockets system
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>
2020-05-11 23:51:22 +02:00
Bruce Richardson
7f6ef16640 test/bonding: allow disabling driver
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>
2020-05-11 21:40:12 +02:00
Bing Zhao
b341a09c1d mem: fix overflow on allocation
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>
2020-05-11 17:44:13 +02:00
Harry van Haaren
9ec8f11369 test/service: add perf test for service on app lcore
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>
2020-05-11 09:33:45 +02:00
Bruce Richardson
52af6ccb2b telemetry: add utility functions for creating JSON
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>
2020-05-10 23:52:41 +02:00
David Marchand
ebaee64097 trace: simplify trace point headers
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>
2020-05-06 13:50:32 +02:00