Commit Graph

1211 Commits

Author SHA1 Message Date
Tomasz Duszynski
54fbcfc6e0 app/testpmd: allow none shaper profile
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>
2018-04-23 21:42:31 +02:00
Anoob Joseph
badb87c157 app/testpmd: support IPsec event
Adding support for IPsec event

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-04-23 18:20:10 +01:00
Hemant Agrawal
ededba93fe app/crypto-perf: add missing SPDX identifier
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-23 18:20:09 +01:00
Hemant Agrawal
5449a68883 app/crypto-perf: support non default mempools
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>
2018-04-23 18:20:09 +01:00
Hemant Agrawal
dc476f122d app/crypto-perf: fix excess crypto device error
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>
2018-04-23 18:20:09 +01:00
Vipin Varghese
4dbfce0583 app/pdump: check for ports
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>
2018-04-23 01:12:15 +02:00
Ferruh Yigit
7687735442 app/testpmd: print Rx/Tx offload values on start
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>
2018-04-23 01:10:58 +02:00
Wisam Jaddo
e62f3a8a04 app/testpmd: fix build without i40e
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>
2018-04-18 18:04:18 +02:00
Jianfeng Tan
660098d61f pdump: use generic multi-process channel
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>
2018-04-18 01:26:21 +02:00
Thomas Monjalon
d9a42a69fe ethdev: deprecate port count function
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>
2018-04-18 00:48:41 +02:00
Thomas Monjalon
a9dbe18022 fix ethdev port id validation
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>
2018-04-18 00:37:05 +02:00
Thomas Monjalon
8728ccf376 fix ethdev ports enumeration
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>
2018-04-18 00:25:27 +02:00
Pavan Nikhilesh
9e596d880f app/eventdev: fix typos in timer adapter options
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>
2018-04-16 18:06:27 +02:00
Pavan Nikhilesh
5255326348 app/eventdev: fix build with gcc 4.8
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>
2018-04-16 16:59:51 +02:00
Pavan Nikhilesh
98c6292105 app/eventdev: add options for event timer adapter
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>
2018-04-16 11:11:06 +02:00
Pavan Nikhilesh
17b22d0bfa app/eventdev: add burst mode for event timer adapter
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>
2018-04-16 11:11:06 +02:00
Pavan Nikhilesh
d008f20bce app/eventdev: add event timer adapter as a producer
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>
2018-04-16 11:11:06 +02:00
Remy Horton
8599ed31f2 app/testpmd: make use of per-PMD Tx/Rx parameters
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>
2018-04-14 00:43:30 +02:00
Ferruh Yigit
cd8c7c7ce2 ethdev: replace bus specific struct with generic dev
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>
2018-04-14 00:41:44 +02:00
Andrew Rybchenko
e4031ced5a app/testpmd: add commands to set loopback mode
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-14 00:41:44 +02:00
Jeff Guo
fb73e09611 app/testpmd: enable device hotplug monitoring
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>
2018-04-13 12:01:19 +02:00
Anatoly Burakov
72b75134b8 app/crypto-perf: fix IOVA translation
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>
2018-04-11 02:12:16 +02:00
Shahaf Shuler
5feecc57d9 align SPDX Mellanox copyrights
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>
2018-04-11 01:47:47 +02:00
Bruce Richardson
c022cb400e convert snprintf to strlcpy
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>
2018-04-04 17:33:08 +02:00
Radu Nicolau
f0b9479497 app/procinfo: fix strncpy usage in args parsing
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>
2018-03-28 00:35:37 +02:00
Hemant Agrawal
6ec78c2463 build: add meson support for dpaaX platforms
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-03-15 17:50:02 +01:00
Bruce Richardson
996ef11761 app: add all remaining apps to meson build
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>
2018-03-12 16:29:27 +01:00
Bruce Richardson
1a0accaddb app/procinfo: rename folder to remove underscore
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>
2018-03-12 16:29:27 +01:00
Bruce Richardson
fa036e70d7 app: generalize meson build
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>
2018-03-12 16:29:27 +01:00
Hemant Agrawal
3fcdd12546 app/testpmd: fix DPAA shared library dependency
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>
2018-03-14 00:25:37 +01:00
Beilei Xing
0abd847be0 app/testpmd: fix flow director filter
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>
2018-02-08 22:27:50 +01:00
Ferruh Yigit
788e7ff29c app/testpmd: enable CRC strip without capability check
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>
2018-02-08 18:42:14 +01:00
Yanglong Wu
d5354e89e5 app/testpmd: fix port DCB configuration
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>
2018-02-06 19:08:13 +01:00
Matan Azrad
41fc015197 app/testpmd: rework simple forward config
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>
2018-02-06 18:05:08 +01:00
Matan Azrad
4deefb6f71 app/testpmd: fix port topology in RSS forward config
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>
2018-02-06 18:05:01 +01:00
Matan Azrad
13cb6fae79 app/testpmd: fix port index in RSS forward config
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>
2018-02-06 18:04:51 +01:00
Kirill Rybalchenko
e0e45bdc1e doc: fix DDP usage in testpmd
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>
2018-02-05 13:42:25 +01:00
Bruce Richardson
9065b1fac6 build: fix dependency on execinfo for BSD meson builds
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>
2018-02-02 11:31:36 +01:00
Olivier Matz
7faa7292cd app/testpmd: use SPDX tags in 6WIND copyrighted files
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-02-01 02:33:20 +01:00
Kevin Laatz
bd8f10f6d6 app/testpmd: increase default ring sizes to 1024
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>
2018-02-01 00:10:42 +01:00
Tomasz Duszynski
b8acbd654c app/testpmd: add meter to flow actions table
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>
2018-01-31 23:49:17 +01:00
Jasvinder Singh
9e70fce2e1 app/testpmd: fix allocation check in TM config
Calloc() function might returns NULL due to insufficient space. Therefore,
check for handling memory allocation failure is added.

Coverity issue: 257030
Fixes: 5b590fbe09 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-01-31 23:34:47 +01:00
Jasvinder Singh
0c36b7c490 app/testpmd: fix allocation check in MTR parsing
Malloc() function might return NULL due to insufficient space. Therefore,
check for handling memory allocation failure is added.

Coverity issue: 257039
Fixes: e63b50162a ("app/testpmd: clean metering and policing commands")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-01-31 23:34:47 +01:00
Georgios Katsikas
63531389d5 app/testpmd: move variables definition in source
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>
2018-01-31 23:34:47 +01:00
Elza Mathew
c7217b9dd8 app/testpmd: change log level at run time
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>
2018-01-31 23:34:47 +01:00
Remy Horton
4c492ebb21 app/testpmd: fix port id size
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>
2018-01-31 23:34:47 +01:00
Jiayu Hu
7132ca8fa8 app/testpmd: fix SW checksum calculation enabling
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>
2018-01-31 23:34:47 +01:00
Moti Haimovsky
8b9bd0efe0 app/testpmd: disable Rx VLAN offloads by default
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>
2018-01-31 21:45:33 +01:00
Matan Azrad
0e45c64d27 app/testpmd: fix invalid port detach
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>
2018-01-31 21:04:21 +01:00
Matan Azrad
1ae1b8c72d app/testpmd: fix port validation
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>
2018-01-31 20:58:29 +01:00