The "addr" param has been used since the event callbacks are enabled
for external memory. So the "__rte_unused" should be dropped.
Besides, slightly refine the coding style by consistently assuming
tabs are 8 characters.
Fixes: f32c7c9de9 ("malloc: enable event callbacks for external memory")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The RTE_FOREACH_MATCHING_DEV iterator requires that
if a break is done before the end of the loop,
the function rte_eth_iterator_cleanup() must be called.
Fixes: 55e51c9624 ("app/testpmd: add device related commands")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC
extension header.
Fixes: efc16c6214 ("net/ice: support flow director GTPU tunnel")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Pattern name of GTP-U flow with extension header should be
xxx_gtpu_eh_xxx. So it will not conflict with the pattern name of a
GTP-U flow that does not contains extension header.
Fixes: 3e4eab9c21 ("net/ice: add pattern manifest")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Flow type "IPv4 + UDP" or "IPv4 + TCP" is conflict with "IPv4 + any"
flow type. If a rule for IPv4 + any is created, we should reject any
rule for IPv4 + UDP otherwise the first rule may be impacted, same
decision should be made on a reverse order. For IPv6 and IPv4 GTPU
inner case, we have the same limitation.
Fixes: 109e8e0624 ("net/ice: configure HW flow director rule")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
The correct name for virt2memseg API is `rte_mem_virt2memseg`, not
`rte_virt2memseg`.
Fixes: 950e8fb4e1 ("mem: allow registering external memory areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
This patch adds some minor updates for the vm_power_manager and guest_cli
example applications.
Now that the virtio-serial channels between vm_power manager and
the guest_cli has bi-directional capability, there are some new commands.
Firstly, the command in vm_power_manager to enable queries for a given VM:
* set_query {vm_name} enable|disable
Then, commands to query the frequencies and capabilities of the cores
in the VM:
* query_cpu_freq {core_num}|all
* query_cpu_caps {core_num}|all
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
The header file 'rte_vfio.h' might be required by some external apps.
This patch adds it to the list of common_headers so that it's
installed by meson.
Fixes: 610beca42e ("build: remove library special cases")
Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
When searching for raw devices with the correct type, we check the driver
name using strcmp, without first checking that the call to info get
succeeded and assigned a value to that pointer.
If the call to get the device info fails, we can treat it as if the device
didn't match, and continue the loop, so the easiest fix is just to skip the
strcmp if the driver_name is null. [A non-null value from a previous failed
match is ok as it too causes the same behaviour of another loop iteration].
Coverity issue: 350353
Fixes: 2328542ed8 ("examples/ioat: add rawdev copy mode")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
To get the amount of memory needed for stats, we call the xstats_get_names
function with a NULL parameter, which can return -1 on error. This negative
value was not previously handled correctly, so we adjust things to quit the
stats printing routine if this basic call fails.
Coverity issue: 350346
Fixes: 632bcd9b5d ("examples/ioat: print statistics")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
On a failure with the ioat dequeue, -1 is returned, which was not properly
handled. This could lead to out-of-bounds reads on a later loop which
assumed a positive return value. Fix this by treating an error as though a
dequeue of 0 had been encountered.
Coverity issue: 350342
Coverity issue: 350349
Fixes: 2328542ed8 ("examples/ioat: add rawdev copy mode")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This patch fixes wrong inner memory element size when joining two
elements.
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Updates documentation to reflect the changes in the QoS scheduler
library and example.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
CCP can support varied digest sizes ranging from 1 to some max value
But the current code support only fixed max values.
This patch updates the minimum digest sizes to 1
Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
CCP driver was scheduling only one CCP in a single burst(enqueue).
Effective throughput was limited to 1 CCP performance.
Scheduling multiple ccp within one burst will increase the ccp performance.
this changes will divide the enqueue packets equally among the multiple CCP
Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
when ccp_auth_opt=1 is set and if authentication error occurred,
ccp driver crash. The enqueue referance count nb_ops miss match
with dequeue nb_ops on authentication error.
Fixes: e0d88a394e ("crypto/ccp: support run-time CPU based auth")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
CCP driver crash when running l2fwd
issue happen when changing MAX_PKT_BURST 32 to 256
increasing the CCP qp to 8 and CCP_MAX_BURST to 256
Fixes: ef4b04f87f ("crypto/ccp: support device init")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
Update the CCP doc for fixing description of some parameter,
Changing AES_CBC to aes-cbc, SHA1_HMAC to sha1-hmac.
Fixes: 4433ced9aa ("doc: add AMD CCP guide")
Cc: stable@dpdk.org
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
In AEAD decrypt (verify mode), test data should point to
cipher text instead of plain text
Fixes: 5b2b0a740f ("app/crypto-perf: overwrite mbuf when verifying")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
When HW is available but the mode mismatches, it is better
to skip the test case.
Fixes: aa026482ba ("test/event_crypto: no service core when HW support available")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Added the missed code to avail the mempool entries before
pool free.
Fixes: 24054e3640 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
The IV was not set, which was causing HW based SEC on DPAA1
to fail.
Fixes: b2196237eb ("test/event_crypto: change cipher algo")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Since TIM buckets are always aligned to 32B and our cache line size being
128B, we will always have a cache miss when reading current_chunk pointer.
Avoid the cache miss by storing the current_chunk pointer in the bucket
opposite to the current bucket.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Fix HW race condition observed when timeout resolution is low (<5us).
When HW traverses a given TIM bucket it will clear chunk_remainder,
but since SW always decreases the chunk_remainder at the start of the
arm routine it might cause a race where SW updates chunk_remainder
after HW has cleared it that lead to nasty side effects.
Fixes: 95e4e4ec74 ("event/octeontx2: add timer arm timeout burst")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Sync mail box data structures to version 1.1.3.
Add mail box version verification and defer initializing octeontx
devices if mail box version mismatches.
Update OCTEON TX limitaion with max mempool size used.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
A compiler can reuse a variable name and prefix it when instrumenting
with coverage.
Example:
$ make defconfig T=x86_64-native-linux-gcc O=master
$ make EXTRA_CFLAGS='--coverage' O=master
[...]
CC rte_flow.o
rte_flow_dynf_metadata_offs is not flagged as experimental but is listed
in version map
Please add __rte_experimental to the definition of
rte_flow_dynf_metadata_offs
$ objdump -t master/build/lib/librte_ethdev/rte_flow.o |grep _offs$
0000000000000000 l F .text.startup 000000000000000a
_GLOBAL__sub_I_65535_0_rte_flow_dynf_metadata_offs
0000000000000620 g O .data 0000000000000004
rte_flow_dynf_metadata_offs
Protect against this by adding a space character in the pattern.
Fixes: a4bcd61de8 ("buildtools: add script to check experimental API exports")
Cc: stable@dpdk.org
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The map-list-symbol.sh script displays the filename, section and symbol
names of map files.
Example:
$ buildtools/map-list-symbol.sh -S EXPERIMENTAL \
lib/librte_ethdev/rte_ethdev_version.map |grep rte_mtr_create
lib/librte_ethdev/rte_ethdev_version.map EXPERIMENTAL rte_mtr_create
The experimental symbol check should only consider the symbol name.
Fixes: 3290ac14eb ("buildtools: detect discrepancies for experimental symbols")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
It may not be immediately clear that rte_mem_virt2iova does not actually
check the internal memseg table, and will instead either return VA (in
IOVA as VA mode), or will fall back to kernel page table walk (in IOVA
as PA mode).
Add a note to API documentation indicating the above.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Should be passing errno rather than ret, which could be negative.
Coverity issue: 350362
Fixes: 9dc843eb27 ("power: extend guest channel API for reading")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Remove trailing blank lines. They serve no purpose and are just
editor leftovers.
These can cause git to complain about whitespace errors during merges.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The mp_client crashes if run on Azure or any system where ethdev
ports are owned. In that case, the tx_buffer and tx_stats for the
real port were initialized correctly, but the wrong port was used.
For example if the server has Ports 3 and 5. Then calling
rte_eth_tx_buffer_flush on any other buffer will dereference null
because the tx buffer for that port was not allocated.
Also:
- the flush code is common enough that it should not be marked
unlikely
- combine conditions to reduce indentation
- avoid unnecessary if() if sent is zero.
Fixes: e2366e74e0 ("examples: use buffered Tx")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Acked-by: Matan Azrad <matan@mellanox.com>
The mp_server incorrectly allows a port mask that included hidden
ports and which later caused either lost packets or failed initialization.
This fixes explicitly checking that each bit in portmask is a
valid port before using it.
Fixes: 5b7ba31148 ("ethdev: add port ownership")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Acked-by: Matan Azrad <matan@mellanox.com>
If the RTE_MAX_LCORE is less than 10, a compilation error is generated:
app/test/test_rcu_qsbr.c:234:10: error: comparison of integer
expressions of different signedness: ‘unsigned int’ and ‘int’
[-Werror=sign-compare]
The cause is (RTE_MAX_LCORE - 10) results in a negative value.
To fix, use rte_rand() to find a number between 0 and RTE_MAX_LCORE.
Fixes: b87089b0bb ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
This patch functionally reverts the patch in fixes line to not have any
hardcoded library path in the final binary for the security reasons, in
case this binary distributed to production environment.
RPATH only added in RTE_DEVEL_BUILD case and this binary shouldn't
distributed, but still removing it to be cautious.
Fixes: 8919f73bcb ("mk: add build directory to library search path")
Cc: stable@dpdk.org
Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
With the API and ABI freeze ahead, it will be good to reserve
some bits on the private structure for future use.
Otherwise we will potentially need to maintain two different
private structure during 2020 period.
There is already one use case for those reserved bits[1]
The reserved field should be set to 0 by the user.
[1] https://patches.dpdk.org/patch/63077/
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
While most windows apps can handle both "\" and "/" as path separators,
"more" is treating the "/" as the start of a command-line flag in this
case, causing errors.
Fixes: cba806e07d ("build: change ABI versioning to global")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
The script test-null.sh is supposed to do a quick and simple
run of testpmd with null PMD only, for sanity check.
As it is not supposed to test probing of any other PMD,
physical device probing is switched to whitelist mode
by using a fake PCI address (0:0.0).
It will also help to keep memory usage stable across platforms.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>