Private shaper profiles are attached to nodes defined
in traffic manager hierarchy.
Since not every node must have a configured shaper
testpmd should allow setting shaper profile id to
invalid (RTE_TM_SHAPER_PROFILE_ID_NONE) easily.
This patch follows same approach as in case of setting
parent id of the root node i.e passing a negative value
sets node id to RTE_TM_NODE_ID_NULL.
In case of private shaper profile negative value will set
shaper profile id to RTE_TM_SHAPER_PROFILE_ID_NONE.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
The current code usages the default mempool ops while
creating the mempool for crypto usages. Adding the support
for best_mempool_ops to enable it for devices using
non default mempools.
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
If number of available devices are more than logical core,
there is no need to throw an error.
Just use the less number of devices instead.
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
In case of application build with shared library mode unless
option '-d' is passed, poll mode driver for devices is not
initialized. Notifying the user just after rte_eal_init is
pro active way of intimating the user.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Which per port offloads are enabled is not clear. Printing offloads
values at forwarding start.
CRC strip offload value was printed in more verbose manner, it is
removed since Rx/Tx offload values covers it and printing only CRC one
can cause confusion.
Hexadecimal offloads values are not very user friendly but preferred to
not create to much noise during forwarding start.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Unused variables will appear when setting RTE_LIBRTE_I40E_PMD
to be disabled.
The fix was to move these variables to the I40E_PMD scope,
since only I40E_PMD is using it.
Fixes: a9dbe18022 ("fix ethdev port id validation")
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
The original code replies on the private channel for primary and
secondary communication. Change to use the generic multi-process
channel.
Note with this change, dpdk-pdump will be not compatible with
old version DPDK applications.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.
In order to fix this common mistake in all external applications,
the function rte_eth_dev_count is deprecated, while introducing
the new functions rte_eth_dev_count_avail and rte_eth_dev_count_total.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application assume a valid port index is in the range [0..count[.
There are three consequences when using such wrong design:
- new ports having an index higher than the port count won't be valid
- old ports being detached (RTE_ETH_DEV_UNUSED) can be valid
Such mistake will be less common with growing hotplug awareness.
All applications and examples inside this repository - except testpmd -
must be fixed to use the function rte_eth_dev_is_valid_port.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Some DPDK applications wrongly assume these requirements:
- no hotplug, i.e. ports are never detached
- all allocated ports are available to the application
Such application iterates over ports by its own mean.
The most common pattern is to request the port count and
assume ports with index in the range [0..count[ can be used.
There are three consequences when using such wrong design:
- new ports having an index higher than the port count won't be seen
- old ports being detached (RTE_ETH_DEV_UNUSED) can be seen as ghosts
- failsafe sub-devices (RTE_ETH_DEV_DEFERRED) will be seen by the application
Such mistake will be less common with growing hotplug awareness.
All applications and examples inside this repository - except testpmd -
must be fixed to use the iterator RTE_ETH_FOREACH_DEV.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The options names in code and doc are not the same.
Fixes: 98c6292105 ("app/eventdev: add options for event timer adapter")
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
test_perf_common.c: In function ‘perf_event_timer_producer’:
test_perf_common.c:99:3: error: missing initializer for
field ‘priority’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
.ev.sched_type = t->opt->sched_type_list[0],
Fixes: d008f20bce ("app/eventdev: add event timer adapter as a producer")
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Add options to configure expiry timeout, max number of timers and number
of event timer adapters through command line parameters.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add burst mode for event timer adapter that can be selected by passing
--prod_type_timerdev_burst.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Add event timer adapter as producer option that can be selected by
passing --prod_type_timerdev.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows testpmd to make use of per-PMD tuned parameter values.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
although it is common for all ethdev in all buses.
Replacing pci specific struct with generic device struct and updating
places that are using pci device in a way to get this information from
generic device.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Use testpmd for example, to show how an application uses device event
APIs to monitor the hotplug events, including both hot removal event
and hot insertion event.
The process is that, testpmd first enable hotplug by below commands,
E.g. ./build/app/testpmd -c 0x3 --n 4 -- -i --hot-plug
then testpmd starts the device event monitor by calling the new API
(rte_dev_event_monitor_start) and register the user's callback by call
the API (rte_dev_event_callback_register), when device being hotplug
insertion or hotplug removal, the device event monitor detects the event
and call user's callbacks, user could process the event in the callback
accordingly.
This patch only shows the event monitoring, device attach/detach would
not be involved here, will add from other hotplug patch set.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
IOVA addresses should be found by calling rte_virt2iova() as
opposed to rte_virt2phy(), as physical address may not be
equal to IOVA address.
Fixes: 2eb6a1a3e5 ("app/crypto-perf: fix crypto op init")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Aligning Mellanox SPDX copyrights to a single format.
In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Since we have support for the strlcpy function in DPDK, replace all
instances where a string is copied using snprintf.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Replace strncpy with snprintf to avoid overwriting the last
NULL character.
Coverity issue: 143252
Fixes: 2deb6b5246 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Add remaining subdirectories in the app folder to the meson build.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
All other apps in the app folder use "-" rather than "_" to separate words
in the app name, so rename proc_info to be consistent.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Since most apps are built in largely the same way, generalize the logic
into a foreach loop in app/meson.build file.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
The dynamic link is broken for ARM platform because the dependencies
of the DPAA PMD are not declared.
Fixes: 83c82e15e1 ("app/testpmd: support loopback config for DPAA")
Cc: stable@dpdk.org
Reported-by: Marco Varlese <mvarlese@suse.de>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This patch fixes issue during dealing with flow
director filter.
Fixes: 6c684f579d ("app/testpmd: add or delete flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Some hardware doesn't support disabling CRC strip. In techboard it has
been decided to enable CRC strip always.
The testpmd update in commit 8b9bd0efe0, enables CRC strip only if
PMD reports CRC strip capability. Not all PMDs updated to report CRC
strip.
For the PMDs not reporting CRC strip testpmd behavior changed and
disabling CRC strip for them. And this may generate error for PMDs that
doesn't support disabling CRC strip.
Removing capability check for this release. In long term there can be
option to remove CRC strip flag completely or adding a new flag to let
PMD say disabling is not supported.
Fixes: 8b9bd0efe0 ("app/testpmd: disable Rx VLAN offloads by default")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The port_conf for the DCB configuration should
inherit the same configuration of the port.
Fixes: 0074d02fca ("app/testpmd: convert to new Rx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
A new function was added to get a Tx port index as a function of the
topology mode and the Rx port index.
Use this function to get the Tx port index of simple stream.
Signed-off-by: Matan Azrad <matan@mellanox.com>
The testpmd user can configure port topology mode to define the port
topology between the testpmd forward ports(paired, chained and loop).
When multi-queue ports are configured by the user, the testpmd
streams are created by rss_fwd_config_setup() function, this function
doesn't take into account the chained topology mode and configures the
forward streams with paired topology mode in this case.
Configure the stream Tx port by dedicated function which calculates
a valid Tx port index as a function of the topology mode and the Rx
port index.
Fixes: af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.
This function may configure to the streams either invalid Rx ports or
invalid Tx ports.
An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.
An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.
Change calculations to get valid ports.
Fixes: af75078 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Documentation and help string more clear describe meaning of
arguments for DDP add del function.
Fixes: 856ceb331b ("app/testpmd: enable DDP remove profile feature")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
The binaries and apps in DPDK all need to be linked against the
execinfo library on FreeBSD so add this as a dependency in cases
where it is found. It's available by default on BSD, but not
at all on Linux
Fixes: 16ade738fd ("app/testpmd: build with meson")
Fixes: 89f0711f9d ("examples: build some samples with meson")
Fixes: b5dc795a8a ("test: build app with meson as dpdk-test")
Fixes: 2ff67267b0 ("app/eventdev: build with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Increase the default RX/TX ring sizes to 1024/1024 to
accommodate for NICs with higher throughput (25G, 40G etc)
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Since METER action is supported by the testpmd application
suitable entry should exist in flow actions information table.
Without that testpmd will return error on adding a new flow to
the list of flows attached to a given port.
Fixes: 30ffb4e67e ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This patch moves the definition of 3 variables in testpmd.h
into the respective .c file. The idea behind this move is
to allow external applications to compile against testpmd
without throwing compilation errors related to multiple
definition of variables.
Also, an extern dcb_q_mapping in testpmd.h is removed
since it appears that this variable is not defined
elsewhere in the tree.
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
Introduced a run time command to change the
log level for a given log type. Added the
necessary documentation.
Signed-off-by: Elza Mathew <elza.mathew@intel.com>
The word size of port_id is now 16 bits, but there were parsing directives
that assumed it was still of type UINT8, resulting in incorrect commandline
parse results.
Fixes: f14a210a65 ("app: fix port id type")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
In current design, we can't enable SW checksum calculation
for the devices which don't have checksum offloading abilities
via the command "csum set ip|tcp|udp|sctp|outer-ip sw <port_id>".
But SW checksum calculation shouldn't depend on HW offloading
abilities. This patch is to fix this issue.
Fixes: 3926dd2b66 ("app/testpmd: enforce offload capabilities check")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
Removed the hardcoded preconfigured Rx VLAN offload configuration
from testpmd and changed the Rx offload command line parameters from
disable to enable.
It has been decided by the Technical Board that testers who wish to
use these offloads will now have to explicitly write them in the
command-line when running testpmd.
The agreement is to keep two exceptions enabled by default in 18.02:
Rx CRC strip and Tx fast free.
Motivation:
Some PMDs such at the mlx4 may not implement all the offloads.
After the offload API rework assuming no offload is enabled by default,
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API") trying
to enable a not supported offload is clearly an error which will cause
configuration failing.
Considering that testpmd is an application to test the PMD, it should
not fail on a configuration which was not explicitly requested.
The behavior of this test application is then turned to an opt-in
model.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Using registration to all ports includes also the ports which should not
be used by the application.
It is nice to print each port event by testpmd but in case of RMV
event, testpmd tries to detach the port and this case is problematic
when the port should not be used by the application.
Check the port validation before detach API calling.
Fixes: 4fb82244b3 ("app/testpmd: extend event printing")
Signed-off-by: Matan Azrad <matan@mellanox.com>
rte_eth_dev_is_valid_port() API validates each valid port from ethdev
point of view and may validate ports which should not be used by the
application.
Testpmd should use only the ports available through the
RTE_ETH_FOREACH_DEV iterator.
Replace rte_eth_dev_is_valid_port() usage by RTE_ETH_FOREACH_DEV
iterator usage for testpmd ports validation.
Fixes: 7d89b26103 ("app/testpmd: use ethdev iterator to list devices")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>