Commit Graph

1017 Commits

Author SHA1 Message Date
Gaetan Rivet
b6b63dfd0f app/testpmd: print all or no events
Adds the "all" option to the print-event and mask-event parameters. This
option will enable or disable all event notifications from being
displayed.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-10 18:44:55 +02:00
Shahaf Shuler
c9cafcc82d app/testpmd: fix mempool creation by socket id
The test assumes the socket ids are contiguous. This
is not necessarily the case on all servers and may cause
mempool creation to fail.

Fixing it by detecting the list of valid socket ids and
use it for the mempool creation.

Fixes: 7acf894d07 ("app/testpmd: detect numa socket count")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-10 18:39:50 +02:00
Gaetan Rivet
3af72783d1 app/testpmd: configure event display
Add two parameters to testpmd:

  --print-event <event name>
  --mask-event <event name>

To enable or disable to printing of events. This display is configured
on a per-event basis. By default, all except VF_MBOX are displayed.

Fixes: 76ad4a2d82 ("app/testpmd: add generic event handler")

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-06 10:39:31 +02:00
Yulong Pei
487f9a592a app/testpmd: fix NUMA structures initialization
Previous numa_support = 0 by default, it need to add --numa to testpmd
command line to enable numa, so port_numa and ring_numa were initialized
at function launch_args_parse(), now testpmd change numa_support = 1 as
default, so port_numa and ring_numa also need to initialize by default,
otherwise port->socket_id will be probed to wrong value.

Fixes: 999b2ee0fe ("app/testpmd: enable NUMA support by default")

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-06 10:22:58 +02:00
Adrien Mazarguil
09a670e871 app/testpmd: fix MAC endian in flow command
MAC addresses are implicitly handled in network order since they are
actually byte strings, however this is not properly enforced with MAC masks
provided as prefix lengths, which end up inverted on little endian
systems.

Fixes: 6df81b325f ("app/testpmd: add items eth/vlan to flow command")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-05-06 10:16:10 +02:00
Adrien Mazarguil
138ae2481e app/testpmd: fix stack overwriting by flow command
The parameter type parser function stores a stack-local address in the
global parser context when parsing a "prefix" keyword.

This usually translates to "Bad arguments" errors even for correct flow
rules as stack gets overwritten by subsequent function calls.

Fixes: d3f61b7bad ("app/testpmd: add flow item spec prefix length")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-05-06 10:00:44 +02:00
Pablo de Lara
65eb1e544d app/testpmd: disable latency stats by default
Disable latency stats gathering by default,
so there is not performance degradation if user
is not interested in them.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-06 10:00:41 +02:00
Pablo de Lara
30bcc68cc8 app/testpmd: fix build without bitrate lib
Fixes: e25e6c70fb ("app/testpmd: add --bitrate-stats option")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-06 10:00:38 +02:00
Bruce Richardson
0f5e6759fd app/testpmd: add switch fall-through comments
This fixes compiler warnings with GCC 7.

Fixes: 28d62131a1 ("app/testpmd: extend flow director input set commands")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-05-05 18:36:55 +02:00
Thomas Monjalon
3dcfe0390c pci: remove eal prefix
The PCI code will move to the bus drivers directory.
Rename functions from rte_eal_pci_ to rte_pci_
to prepare the move of the driver out of EAL.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-05-05 14:38:17 +02:00
Kuba Kozak
7ac16a3660 app/proc-info: support xstats by ID and by name
There are new arguments --xstats-ids and --xstats-name
in proc_info command line to retrieve statistics given by ids
and by name.
E.g. --xstats-ids="1,3,5,7,8"
E.g. --xstats-name rx_errors

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
2017-05-01 23:48:39 +02:00
Kuba Kozak
0a5beecf46 ethdev: revert xstats by ID
Revert patches to provide clear view for
upcoming changes. Reverted patches are listed below:
commit ea85e7d711 ("ethdev: retrieve xstats by ID")
commit a954495245 ("ethdev: get xstats ID by name")
commit 1223608adb ("app/proc-info: support xstats by ID")
commit 25e38f09af ("net/e1000: support xstats by ID")
commit 923419333f ("net/ixgbe: support xstats by ID")

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
2017-05-01 23:38:00 +02:00
Allain Legacy
a8c6a1ae12 app/testpmd: load commands from file at runtime
Adds support to testpmd to load a set of cmdline CLI commands at runtime.
This can be helpful when needing to cut-n-paste many commands where
cut-n-paste may not be practical.

   testpmd> load /home/ubuntu/somefile.txt

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 16:05:23 +02:00
Allain Legacy
81ef862b51 app/testpmd: load commands from file at startup
Adds support to testpmd to load a set of cmdline CLI commands at startup.
This can be helpful when needing to cut-n-paste many commands each time
testpmd is restarted.  This option will work in both interactive and
non-interactive modes.

   ./testpmd -n4 -c3 ... -- --cmdline-file=/home/ubuntu/somefile.txt

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 16:00:37 +02:00
Remy Horton
e25e6c70fb app/testpmd: add --bitrate-stats option
Bit-rate collation should only be done by one core. This patch adds
an option to select which core performs the bit-rate calculation,
which is also disabled by default.

Fixes: 7e4441c8ef ("app/testpmd: add bitrate statistics calculation")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-05-01 15:49:58 +02:00
Jiayu Hu
0de738cfc1 app/testpmd: fix exit without freeing resources
When testpmd exits, it frees the acquired resources (e.g. stop ports).
However, when we terminate it by Ctrl-d, testpmd exits directly without
releasing the resources. In this patch, we fix this exit issue.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-05-01 15:40:08 +02:00
Olivier Matz
3ab64341da app/testpmd: fix number of mbufs in pool
The number of mbufs in pools is not consistent depending on the
options passed by the user and the number of ports, especially
in numa mode, when the number of mbuf is specified by the user.

When the user specifies the number of mbuf (per pool), it should
overrides the default value.

- before the patch

./build/app/testpmd -- -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0
  <mbuf_pool_socket_1>: n=331456, size=2176, socket=1

./build/app/testpmd -- --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=256000, size=2176, socket=0
  <mbuf_pool_socket_1>: n=256000, size=2176, socket=1
  # BAD, should be n=8000 for each socket

./build/app/testpmd -- --no-numa -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0

./build/app/testpmd -- --no-numa --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0
  <mbuf_pool_socket_1>: n=331456, size=2176, socket=1

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- \
     --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=128000, size=2176, socket=0
  <mbuf_pool_socket_1>: n=128000, size=2176, socket=1
  # BAD, should be n=8000 for each socket

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- --no-numa -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- --no-numa \
     --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0

- after the patch

./build/app/testpmd -- -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0
  <mbuf_pool_socket_1>: n=331456, size=2176, socket=1

./build/app/testpmd -- --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0
  <mbuf_pool_socket_1>: n=8000, size=2176, socket=1

./build/app/testpmd -- --no-numa -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0

./build/app/testpmd -- --no-numa --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0
  <mbuf_pool_socket_1>: n=331456, size=2176, socket=1

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- \
     --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0
  <mbuf_pool_socket_1>: n=8000, size=2176, socket=1

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- --no-numa -i
  <mbuf_pool_socket_0>: n=331456, size=2176, socket=0

./build/app/testpmd --vdev=eth_null0 --vdev=eth_null1 -- --no-numa \
     --total-num-mbufs=8000 -i
  <mbuf_pool_socket_0>: n=8000, size=2176, socket=0

Fixes: b6ea6408fb ("ethdev: store numa_node per device")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 15:14:42 +02:00
Olivier Matz
3c1a5444d4 app/testpmd: fix crash at mbuf pool creation
Since
commit 999b2ee0fe ("app/testpmd: enable NUMA support by default"),
testpmd is started with numa enabled by default. This highlights a
floating point exception when started with --total-num-mbufs without any
port (division by 0). This bug was already triggered before this commit
if the --no-numa option was given.

This commit adds a check of the nb_ports value before doing the
division. By looking at this code, it appears that the creation of the
mbuf pool is not consistent for the number of mbufs depending on the
configuration. This is fixed in the next commit.

Fixes: b6ea6408fb ("ethdev: store numa_node per device")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 15:14:31 +02:00
Adrien Mazarguil
e4840ef268 ethdev: fix incomplete items in flow API
E-Tag and NVGRE pattern items have been added hastily without updating
documentation nor testpmd.

This commit also adds default masks for these items based on the ixgbe
implementation.

Fixes: 99e7003831 ("net/ixgbe: parse L2 tunnel filter")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-05-01 00:13:15 +02:00
Michal Jastrzebski
a11595045e app/procinfo: fix description of --xstats-name option
fix proc-info xstats-name description string

Fixes: 1223608adb ("app/proc-info: support xstats by ID")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-21 15:13:02 +02:00
Bruce Richardson
999b2ee0fe app/testpmd: enable NUMA support by default
There is little reason for NUMA support in testpmd to be off by default, so
enable it, and add in a new commandline parameter to disable it, if that is
wanted by users.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-21 01:19:56 +02:00
Rami Rosen
0f58f01393 app/testpmd: consolidate duplicate ifdefs into one
Cnsolidate the duplicate #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
into one #ifdef.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2017-04-21 01:19:14 +02:00
Pascal Mazon
2eaef2b915 app/testpmd: fix duplicated metrics header include
Fixes: 62d3216d61 ("app/testpmd: add latency statistics calculation")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-21 01:11:21 +02:00
Gaetan Rivet
284c908cc5 app/testpmd: request device removal interrupt
Enable device removal event for PMD supporting it.
Add the --no-rmv-interrupt parameter to explicitly disable it.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
2017-04-21 01:02:16 +02:00
Gaetan Rivet
8ea656f8c3 app/testpmd: request link status interrupt
For drivers supporting the LSC event, enable it.
This allows to test LSC event support.

Add the --no-lsc-interrupt parameter to explicitly disable the link status
change interrupt.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-21 01:02:11 +02:00
Gaetan Rivet
76ad4a2d82 app/testpmd: add generic event handler
This is a rather simple handler that prints a message with the name of
the current event. It can be used to check PMD callback registration and
triggers.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-21 01:01:59 +02:00
Kuba Kozak
1223608adb app/proc-info: support xstats by ID
There is a new argument --xstats-ids and --xstats-name
in proc_info command line to retrieve statistics given by ids
and by name.
E.g. --xstats-ids="1,3,5,7,8"
E.g. --xstats-name rx_errors

ethdev: mark functions as deprecated

Functions rte_eth_xstats_get_all and rte_eth_xstats_get_names_all
are marked as deprecated

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-20 22:30:26 +02:00
Jacek Piasecki
ea85e7d711 ethdev: retrieve xstats by ID
Extended xstats API in ethdev library to allow grouping of stats
logically so they can be retrieved per logical grouping  managed
by the application.
Changed existing functions rte_eth_xstats_get_names and
rte_eth_xstats_get to use a new list of arguments: array of ids
and array of values. ABI versioning mechanism was used to
support backward compatibility.
Introduced two new functions rte_eth_xstats_get_all and
rte_eth_xstats_get_names_all which keeps functionality of the
previous ones (respectively rte_eth_xstats_get and
rte_eth_xstats_get_names) but use new API inside.

test-pmd: add support for new xstats API retrieving by id in
testpmd application: xstats_get() and
xstats_get_names() call with modified parameters.

doc: add description for modified xstats API
Documentation change for modified extended statistics API functions.
The old API only allows retrieval of *all* of the NIC statistics
at once. Given this requires a MMIO read PCI transaction per statistic
it is an inefficient way of retrieving just a few key statistics.
Often a monitoring agent only has an interest in a few key statistics,
and the old API forces wasting CPU time and PCIe bandwidth in retrieving
*all* statistics; even those that the application didn't explicitly
show an interest in.
The new, more flexible API allow retrieval of statistics per ID.
If a PMD wishes, it can be implemented to read just the required
NIC registers. As a result, the monitoring application no longer wastes
PCIe bandwidth and CPU time.

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-20 22:29:22 +02:00
Pablo de Lara
ad674b4d4a app/crypto-perf: fix AEAD tests when AAD is zero
For AEAD algorithms, additional authenticated data (AAD)
can be passed, but it is optional, so its size can be zero.
Therefore, test can be run if no memory is allocated.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-20 11:32:45 +02:00
Pablo de Lara
0091576132 app/crypto-perf: fix length for wireless algos
When SNOW3G/KASUMI/ZUC algorithms are used, ciphering
and authentication lengths have to be passed as bits
and not as bytes.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-20 11:32:45 +02:00
Fan Zhang
44e2980b70 app/crypto-perf: fix crypto operation resubmission
This patch fixes the crypto operation resubmission problem in crypto
perferformance test. Originally, when needed crypto ops amount is
smaller than the enqueued crypto ops in the last round, one or more
processed crypto operations will be re-enqueued.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-20 11:32:45 +02:00
Pablo de Lara
1e1d4fb791 app/crypto-perf: fix possible overflow
In the latency test, when number of enqueued operations
is less than the burst size, the timestamp value of the
non-enqueued operations was being stored, even though
those operations were being freed.

This could cause an array overflow, since it could store
more values than the total number of operations.

Fixes: 5d75fb09d3 ("app/crypto-perf: fix invalid latency for QAT")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-20 11:32:45 +02:00
Qi Zhang
156a31b5ee app/testpmd: add commands for packet type mapping
Add below command line to configure ptype mapping.
ptype mapping get <port_id> <valid_only>.
ptype mapping replace <port_id> <target> <mask> <pkt_type>.
ptype mapping reset <port_id>.
ptype mapping update <port_id> <hw_ptype> <sw_ptype>.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-04-19 15:37:37 +02:00
Jeff Guo
3c32113a1a app/testpmd: fix IPv6 tunnel checksum
When ipv6 packet is tunnel packet, "PKT_TX_OUTER_IPV6" flag must
be set, to let prepare the correct mbuf meta data for tx forward.

Fixes: 2b76648872 ("net/e1000: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
2017-04-10 22:50:01 +02:00
Jeff Guo
79dd163fca app: enable HW CRC strip by default
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers,
and kernel driver almost default enable that feature, if disable it in
app's rxmode, VF driver will report the VF launch failure. So this
patch default to enable HW CRC strip to let VF launch successful.

Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-10 22:35:48 +02:00
Ilya Maximets
5ae1274fb0 app: do not build test-crypto-perf if cryptodev disabled
This fixes build in following configuration:

	CONFIG_RTE_LIBRTE_CRYPTODEV=n
	CONFIG_RTE_APP_CRYPTO_PERF=y

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-10 12:00:06 +02:00
Pablo de Lara
a8eb964020 app/crypto-perf: reorg options structure
Reorganize options structure, to have all the parameters
used in a single run in the first bytes of the structure,
so all fit in a single cache line.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
fc4600fb25 app/crypto-perf: add extra option checks
When using the verify test, test name is necessary
to be passed when digest is needed.

Also, when using an block cipher algorithm (CBC, ECB),
the buffer size has to be aligned to the block size.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
f6cefe253c app/crypto-perf: add range/list of sizes
So far, the crypto performance application was only able to
test one buffer size and one burst size.

With this commit, multiple sizes can be passed, either as a range
of values or as a list of values.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
da40ebd6d3 app/crypto-perf: display results in test runner
Instead of printing the test results in the destructor
function, print them just after each run.
This will be useful for after the commit that allows
a range of buffer and burst sizes.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
b2085cce60 app/crypto-perf: do not append digest if not used
When testing cipher only operations, there is no need to append digest
at the end of the buffer.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Sergio Gonzalez Monroy
df52cb3b6e app/crypto-perf: move verify as single test type
In order to simplify throughput and latency tests,
verify option has been removed from these and moved
as a separate test.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
8612836d6f app/crypto-perf: fix AES CBC 128 test vectors
Ciphertext and digests for different buffer sizes
were incorrect.

Fixes: 5f1d85c5a8 ("app/crypto-perf: add test vectors files")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
e40de34d6f app/crypto-perf: remove unused file
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
9f3ea3e4b9 app/crypto-perf: remove cyclecount test type
Cyclecount test was not implemented, so it is removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +02:00
Tomasz Kulasek
884ed3ff8e app/crypto-perf: fix uninitialized values for null ops
Some values are uninitialized for "cipher null" and "auth null"
operations. It may cause unpredictable results for some crypto pmd
drivers, or even segmentation fault.

This patch sets values for null operations to zero.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-06 00:17:44 +02:00
Daniel Mrzyglod
5e66937631 app/crypto-perf: avoid wrong operation type for AEAD algos
When somebody use bad --optype with aead algorithms
segmentation fault could happen.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-06 00:17:44 +02:00
Slawomir Mrozowicz
5d75fb09d3 app/crypto-perf: fix invalid latency for QAT
Fixes invalid latency result when using the performance application and
hardware QAT PMD. It occurred when the number of processed packets was
higher then the size of the internal QAT PMD ring buffer and the buffer
was overflowed.
Fixed by correcting the registration of the enqueued packets and freeing
memory space for not enqueued packets.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
66be27121c app/crypto-perf: use cryptodev algorithm parser
Instead of going through the array of supported algorithms
in the app, to get the algorithm enum, use the new API in
cryptodev to parse this string, so it is not necessary to add
a new supported algorithm in the cryptodev library and this app.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-06 00:17:44 +02:00
Gaetan Rivet
7d89b26103 app/testpmd: use ethdev iterator to list devices
This commit replaces redundant code with public ethdev layer calls.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-04-05 22:47:57 +02:00
Reshma Pattan
62d3216d61 app/testpmd: add latency statistics calculation
This patch adds latency stats commandline argument to testpmd,
allowing to specify the lcore to use for latencystats updates.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
2017-04-05 18:00:44 +02:00
Remy Horton
7e4441c8ef app/testpmd: add bitrate statistics calculation
Calculate bitrate statistics using the bitrate stats library. The
resulting statistics can be viewed via proc_info.

Signed-off-by: Remy Horton <remy.horton@intel.com>
2017-04-05 17:59:52 +02:00
Reshma Pattan
077c546704 app/proc_info: add metrics displaying
Modify the dpdk-procinfo process to display the newly added metrics.
Added new command line option "--metrics" to display metrics.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
2017-04-05 17:58:54 +02:00
Qi Zhang
8c32c192b9 app/testpmd: add command to show/clear VF stats
Add two commands to show/clear VF stats
show vf stats <port_id> <vf_id>
clear vf stats <port_id> <vf_id>

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 19:03:03 +02:00
Olivier Matz
caf05a1b86 app/testpmd: new command to dump log types
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 13:48:45 +02:00
Olivier Matz
97cb466d65 mbuf: use 2 bytes for port and nb segments
Change the size of m->port and m->nb_segs to 16 bits. It is now possible
to reference a port identifier larger than 256 and have a mbuf chain
larger than 256 segments.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 11:30:29 +02:00
Maxime Coquelin
999d976958 app/testpmd: print MTU in port info
This patch adds MTU display to "show port info" command.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-01 10:36:17 +02:00
Bernard Iremonger
9fd6c4df90 app/testpmd: add CLI to set TC min bandwidth
Add a CLI in testpmd to test the TC min bandwidth
setting.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 19:03:03 +02:00
Yongseok Koh
6f60ca5e5e ethdev: remove requirement of aligned RETA size
In rte_eth_check_reta_mask(), it is required to align the size of the RETA
table to RTE_RETA_GROUP_SIZE but as the size can be less than the limit,
this should be removed. The change is also applied to a command of testpmd.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 19:03:02 +02:00
Beilei Xing
1315219a22 app/testpmd: add MPLS and GRE fields to flow command
This patch exposes the following item fields through the flow command:

- MPLS label
- GRE protocol

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 19:02:58 +02:00
Beilei Xing
e088907bb8 app/testpmd: add command for getting loaded DDP profiles
This patch is to add testpmd CLI for getting all loaded DDP profiles.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:57 +02:00
Beilei Xing
a92a5a2cbb app/testpmd: add command for loading DDP
This patch is to add testpmd CLI for loading dynamic
device personalization (DDP).

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Wenzhuo Lu
22e6545fd0 app/testpmd: set TC strict link priority mode
Add a CLI to set some TCs' strict link priority mode
on a physical port.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:51 +02:00
Wenzhuo Lu
909fd9ac45 app/testpmd: set VF TC Tx max bandwidth
Add CLI to set a specific TC's max bandwidth
on a specific VF from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
42d0baaea5 app/testpmd: set VF TC Tx min bandwidth
Add CLI to set TCs' min bandwidth on a specific VF
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
cac4821929 app/testpmd: set VF Tx max bandwidth
Add CLI to set a specific VF's TX max bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Jingjing Wu
bcd0e43266 app/testpmd: fix TC mapping in DCB init config
Fix the UP and TC mapping to divide multiple UPs to TCs instead of mapping
the UPs who are lager than num_tcs to TC0.

Fixes: 1a572499be ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 15:52:51 +02:00
Jingjing Wu
5f592039ad app/testpmd: fix init config for multi-queue mode
In SRIOV mode, the mq_mode of rte_eth_rxmode should not carry VMDQ info
without rx_adv_conf setting.

Fixes: a30979f6ad ("app/testpmd: set Rx VMDq RSS mode")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 15:52:51 +02:00
Bruce Richardson
ecaed092b6 ring: return remaining entry count when dequeuing
Add an extra parameter to the ring dequeue burst/bulk functions so that
those functions can optionally return the amount of remaining objs in the
ring. This information can be used by applications in a number of ways,
for instance, with single-consumer queues, it provides a max
dequeue size which is guaranteed to work.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:32:20 +02:00
Olivier Matz
feb9f680cd mk: optimize directory dependencies
Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-03-27 23:28:43 +02:00
Pascal Mazon
5852bf6ae1 app/testpmd: add default MAC set command
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-03-15 18:21:49 +01:00
Roman Korynkevych
2deb6b5246 app/procinfo: add collectd format and host id
Extended proc-info application to send DPDK port statistics to
STDOUT in the format expected by collectd exec plugin. Added
HOST ID option to identify the host DPDK process is running on
when multiple instance of DPDK are running in parallel. This is
needed for the barometer project in OPNFV.

Signed-off-by: Roman Korynkevych <romanx.korynkevych@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-03-10 15:29:32 +01:00
Nirmoy Das
547d946c8c app/testpmd: fix typos
Signed-off-by: Nirmoy Das <ndas@suse.de>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-03-10 14:11:56 +01:00
Bruce Richardson
40f1806e23 app/pdump: fix duplicate macro definition
RTE_RING_SZ_MASK is redefined here with the original definition in
rte_ring.h. Since rte_ring.h is already included, just remove the
duplicate definition here.

Fixes: caa7028276 ("app/pdump: add tool for packet capturing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-03-08 16:05:09 +01:00
Ferruh Yigit
7d3b1ec47f test: move unit tests to separate directory
This is to logically group unit tests into their own folder,
separating them from "app" folder.

Hopefully this will make the unit test in DPDK more visible.

Following binaries moved to "test" folder:
cmdline-test
test-acl
test-pipeline
test            <-- various DPDK unit tests

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-02-28 16:04:18 +01:00
Slawomir Mrozowicz
559ef9201a app/crypto-perf: fix null dereference
Dereferencing a pointer that might be null key_token when calling strstr.
Check if the pointer is null before.

Coverity issue: 141071
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:06:04 +01:00
Jacek Piasecki
7fb95c3602 app/crypto-perf: fix size of expression
This commit fixes problem of passing a pointer to sizeof() function.
Now the size of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS.

Coverity issue: 141068
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:06:04 +01:00
Slawomir Mrozowicz
0620ebfa23 app/crypto-perf: fix crash for wireless algorithms
This commit fixes segmentation fault that happens when
using KASUMI, SNOW3G or ZUC authentication algorithms,
as they need authentication keys and was not being set.
It also set value of authentication key to cipher key
when using GMAC algorithm.

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:05:35 +01:00
Aleksander Gajewski
48ae81144f app/crypto-perf: fix uninitialized variable
This commit ixes problem with uninitialized nb_cryptodevs variable by
initialize it with 0 value. Program could jump to err label
without running cperf_initialize_cryptodev() function. Also assign 0
value to nb_cryptodevs after cperf_initialize_cryptodev() when value is
negative.

Coverity issue: 141073
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Aleksander Gajewski <aleksanderx.gajewski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:05:22 +01:00
Jacek Piasecki
0ef3f0e04c app/crypto-perf: fix big parameter passed by value
Structure opts and structure test_vec are now passed by  pointer to
the cperf_check_test_vector.

Coverity issue: 141072
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:04:26 +01:00
Kuba Kozak
d27befd0b6 app/crypto-perf: add options parsing check
Added total_ops value validation in parse_total_ops() function.

Coverity issue: 141070
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:02:50 +01:00
Aleksander Gajewski
8ecd4048ba app/crypto-perf: fix string not null terminated
This commit fixes the case where the string buffer may not have
a null terminator if the source string's length is equal to the
buffer size.

Coverity issue: 141069
Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Aleksander Gajewski <aleksanderx.gajewski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-02-10 16:02:30 +01:00
Ferruh Yigit
ab12f71b31 mk: move PMD libraries linking to applications
Some PMDs provide device specific APIs. Bond and xenvirt are existing
samples for this.

And since these are PMD libraries, there are two options on how to link
them for shared library build:

1- They can be linked to all applications by default, using common
rte.app.mk file.

2- They can be explicitly linked to applications that use device
specific API.

Currently option one is in use, this patch switches to the option two.

Moves library linking to the Makefile of application Makefile that uses
device specific API.

This prevent these PMD libraries to be a dependency to applications
that don't use these device specific APIs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-10 11:03:27 +01:00
Ferruh Yigit
04bdcb3255 app/testpmd: use LDLIBS in makefile
_LDLIBS is for internal usage, convert to LDLIBS usage.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-09 23:12:55 +01:00
Daniel Mrzyglod
42537ad1b9 app/crypto-perf: fix FreeBSD build
This patch fixes error: implicit declaration of function 'getline'

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
2017-02-09 16:42:12 +01:00
Slawomir Mrozowicz
5f1d85c5a8 app/crypto-perf: add test vectors files
Add test vectors example files to the performance test application.

Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
2017-01-30 17:46:36 +01:00
Slawomir Mrozowicz
f8be1786b1 app/crypto-perf: introduce performance test application
This patchset introduce new application which allows measuring
performance parameters of PMDs available in crypto tree. The goal of
this application is to replace existing performance tests in app/test.
Parameters available are: throughput (--ptest throughput) and latency
(--ptest latency). User can use multiply cores to run tests on but only
one type of crypto PMD can be measured during single application
execution. Cipher parameters, type of device, type of operation and
chain mode have to be specified in the command line as application
parameters. These parameters are checked using device capabilities
structure.
Couple of new library functions in librte_cryptodev are introduced for
application use.
To build the application a CONFIG_RTE_APP_CRYPTO_PERF flag has to be set
(it is set by default).
Example of usage: -c 0xc0 --vdev crypto_aesni_mb_pmd -w 0000:00:00.0 --
--ptest throughput --devtype crypto_aesni_mb --optype cipher-then-auth
--cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --auth-algo
sha1-hmac --auth-op generate --auth-key-sz 64 --auth-digest-sz 12
--total-ops 10000000 --burst-sz 32 --buffer-sz 64

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
2017-01-30 17:46:36 +01:00
Fan Zhang
c8e69fce70 crypto/scheduler: add unit test
Same as other cryptodev PMDs, it is necessary to carry out the unit
test for scheduler PMD. Currently the test is designed to attach 2
AESNI-MB cryptodev PMDs as slaves, sets the scheduling mode as round-
robin, and runs almost all AESNI-MB test items (except for sessionless
tests). In the end, the slaves are detached.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-01-30 17:46:36 +01:00
Pablo de Lara
a085723ac8 app/test: fix build with overflowed EFD value
When RTE_EFD_VALUE_NUM_BITS is 32, there was a compilation issue
because of an overflow:

app/test/test_efd.c:157:55: error: overflow in expression;
result is 2147483647 with type 'int' [-Werror,-Winteger-overflow]
        data[0] = mrand48() & ((1 << RTE_EFD_VALUE_NUM_BITS) - 1);

This commit fixes the issue by using a setting a different
macro VALUE_BITMASK with a conditional

Fixes: 0e925aef27 ("app/test: add EFD functional and perf tests")

Reported-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-01-30 17:17:15 +01:00
Ferruh Yigit
dd10203ba3 app/test: make PCI device id struct const
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 17:07:00 +01:00
Qiming Yang
d28645c741 app/testpmd: add offload capabilities query
Add two new commands "show port cap <port>" and "show
port cap all" to display what offload capabilities supported
in ports. It will not only display all the capabilities of
the port, but also the enabling condition for each capability
in the running time.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-01-30 16:59:14 +01:00
Michał Mirosław
c6c7a8d7e6 acl: allow zero verdict
This enables ACL matches to return 0 where the distinction
from no-match case is not needed.

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-01-30 11:08:47 +01:00
Michał Mirosław
7601d32ed3 acl: remove invalid test
rte_acl_add_rules() has no way of checking rule size.

This was hidden because the test effectively checked that
adding a rule with userdata == 0 failed.

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-01-30 11:08:30 +01:00
Zbigniew Bodek
ead51dc017 app/test: add ARMv8 crypto tests and test vectors
Introduce unit tests for ARMv8 crypto PMD.
Add test vectors for short cases such as 160 bytes.
These test cases are ARMv8 specific since the code provides
different processing paths for different input data sizes.

User can validate correctness of algorithms' implementation using:
* cryptodev_sw_armv8_autotest
For performance test one can use:
* cryptodev_sw_armv8_perftest

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-01-19 01:00:55 +01:00
Piotr Azarewicz
d5beebf85a crypto/aesni_gcm: test new features
Added new unit tests for AES-NI GCM PMD to verify new functionalities.

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-01-18 21:49:54 +01:00
Arek Kusztal
e4006b30ee app/test: fix symmetric session free in crypto perf tests
This commit fixes problem with deallocation of symmetric
session entries in cryptodev performance tests.

Fixes: 390919829f ("app/test: update AES SHA performance test")
Fixes: 79521c4383 ("app/test: add AES GCM performance test")
Fixes: ffbe3be0d4 ("app/test: add libcrypto")
Fixes: 97fe6461c7 ("app/test: add SNOW 3G performance test")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2017-01-18 21:48:56 +01:00
Tomasz Kulasek
c9c9c4ed87 app/test: check scatter-gather for crypto drivers
This patch provides unit tests for set of cipher/hash combinations covering
currently implemented crypto PMD's and allowing to verify scatter gather
support.

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-01-18 21:48:56 +01:00
Fiona Trahe
e2a7fdce6d app/test: add integrity check for crypto mbuf data
In block cipher test cases, add checks that the source
and destination mbufs are not modified except where expected.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2017-01-18 21:48:56 +01:00
Pablo de Lara
8772c3f713 crypto/aesni_mb: add single operation functionality
Update driver to use new AESNI Multibuffer IPSec library single
operation functionality (cipher only and authentication only).
This patch also adds tests for this new feature.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-01-18 21:48:56 +01:00
Arek Kusztal
f3dbf94be6 app/test: check SGL on QAT
This commit adds GCM tests to use within scatter-gather list.
Test use direct chained mbufs created based on the input parameter
for max size for in place operations and out of place operations.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-01-18 21:47:04 +01:00
Arek Kusztal
16e7dce6e1 app/test: check DES on QAT
This commit adds tests of Data Encryption Standard (DES)
algorithm to Intel QuickAssist technology crypto test suites

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-01-18 21:46:08 +01:00
Fiona Trahe
aa8128b1d8 app/test: check AES cipher-only on QAT
Extended functional AES-CBC and AES-CTR cipher-only
tests to run on QAT PMD.
Added AES_CBC cipher-only performance tests on QAT PMD.
No driver changes, but as now tested, QAT documentation
is updated to remove constraint.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2017-01-18 21:45:15 +01:00
Pablo de Lara
0e925aef27 app/test: add EFD functional and perf tests
Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Karla Saur <karla.saur@intel.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
2017-01-18 20:54:04 +01:00
Bernard Iremonger
f1b2e0ef61 app/testpmd: handle i40e in VF VLAN filter command
modify set_vf_rx_vlan function to handle the i40e PMD.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Bernard Iremonger
ff1c07a0e6 app/testpmd: add command for VF VLAN tag on i40e
command is: set vf vlan tag port_id vf_id on|off

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Bernard Iremonger
675783e064 app/testpmd: add command for VF broadcast mode on i40e
Add command to call rte_pmd_i40e_set_vf_broadcast.
Add set vf broadcast in testpmd_funcs.rst file.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Wenzhuo Lu
982a897071 app/testpmd: use multicast promiscuous mode on i40e
Add testpmd CLI to set VF multicast promiscuous mode on i40e.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Wenzhuo Lu
1aa94d0536 app/testpmd: use unicast promiscuous mode on i40e
Add testpmd CLI to set VF unicast promiscuous mode on i40e.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:25 +01:00
Wenzhuo Lu
ecc11d60b9 app/testpmd: use VFD APIs on i40e
The new VF Daemon (VFD) APIs is implemented on i40e. Change
testpmd code to use them, including VF MAC anti-spoofing,
VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN
insert.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-01-17 19:46:24 +01:00
Bernard Iremonger
5c55283ef8 app/testpmd: cleanup parameter checking
Parameter checking is done in the rte_pmd_ixgbe_* functions.
Remove parameter checking from before calls to the rte_pmd_ixgbe_*
functions.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-01-17 19:39:28 +01:00
Bernard Iremonger
35c54af3f5 app/testpmd: use ixgbe public functions
Use the the following ixgbe public functions:

rte_pmd_ixgbe_set_vf_rate_limit
rte_pmd_ixgbe_set_vf_rx
rte_pmd_ixgbe_set_vf_rxmode
rte_pmd_ixgbe_set_vf_tx
rte_pmd_ixgbe_set_vf_vlan_filter

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-01-17 19:39:28 +01:00
Wenzhuo Lu
dc0537e6d6 app/testpmd: fix check for invalid ports
Some CLIs don't check the input port ID, it
may cause segmentation fault (core dumped).

Fixes: 425781ff5a ("app/testpmd: add ixgbe VF management")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 16:40:05 +01:00
Tomasz Kulasek
1feda4d8fc mbuf: add a function to linearize a packet
This patch adds function rte_pktmbuf_linearize to let crypto PMD coalesce
chained mbuf before crypto operation and extend their capabilities to
support segmented mbufs when device cannot handle them natively.

Included unit tests for rte_pktmbuf_linearize functionality:

 1) Creates banch of segmented mbufs with different size and number of
    segments.
 2) Fills noncontigouos mbuf with sequential values.
 3) Uses rte_pktmbuf_linearize to coalesce segmented buffer into one
    contiguous.
 4) Verifies data in linearized buffer.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-01-15 19:30:00 +01:00
Tiwei Bie
bb98856f24 app/testpmd: add MACsec commands
Below MACsec offload commands are added:

- set macsec offload <port_id> on encrypt on|off replay-protect on|off
- set macsec offload <port_id> off
- set macsec sc tx|rx <port_id> <mac> <pi>
- set macsec sa tx|rx <port_id> <idx> <an> <pn> <key>

Also update the testpmd user guide.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-15 19:16:48 +01:00
Jerin Jacob
d74cbeca75 app/testpmd: fix static build link ordering
By introducing explicit -lrte_pmd_ixgbe link request in
testpmd Makefile,"-Wl,-lrte_pmd_ixgbe" provided twice, and linker
removes the duplication by keeping only first occurrence.
This moves "-Wl,-lrte_pmd_ixgbe" out of "-Wl,--whole-archive" flag
and makes symbol generation totally different than previous version
in case of static build.
This patch fixes the static build linking order by introducing
-lrte_pmd_ixgbe under the shared library config
(CONFIG_RTE_BUILD_SHARED_LIB).

Fixes: 425781ff5a ("app/testpmd: add ixgbe VF management")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-01-13 17:31:16 +01:00
Adrien Mazarguil
f4e7c8bc84 ethdev: clarify RSS action in flow API
Contrary to the current description, mbuf RSS hash result storage does not
overlap with the returned MARK value (hash.fdir.lo vs. hash.fdir.hi), and
both may be combined.

Reflect this change by allowing testpmd to display both values
simultaneously.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-11 16:54:47 +01:00
Adrien Mazarguil
bd9e3bc20f app/testpmd: fix array bounds checks
This commit addresses several obvious issues reported by Coverity
with array bounds checks in functions related to the flow API.

Coverity issue: 139596, 139597, 139598, 139599
Fixes: 938a184a18 ("app/testpmd: implement basic support for flow API")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-11 16:52:20 +01:00
John McNamara
54ca545dce make python scripts python2/3 compliant
Make all the DPDK Python apps work with Python 2 or 3 to
allow them to work with whatever is the system default.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2017-01-04 21:13:44 +01:00
John McNamara
be05eb445c make python scripts PEP8 compliant
Make all DPDK python application compliant with the PEP8 standard
to allow for consistency checking of patches and to allow further
refactoring.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2017-01-04 21:12:58 +01:00
Tomasz Kulasek
6b520d54eb app/testpmd: use Tx preparation in checksum engine
Since all current drivers supports Tx preparation API, it is used
in csum forwarding engine by default for all drivers.

Adding additional step to the csum engine costs about 3-4% of performance
drop, on my setup with ixgbe driver. It's caused mostly by the need
of reaccessing and modification of packet data.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-01-04 20:40:28 +01:00
Jan Blunck
eac901ce29 ethdev: decouple from PCI device
This makes struct rte_eth_dev independent of struct rte_pci_device by
replacing it with a pointer to the generic struct rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2016-12-25 23:30:19 +01:00
Stephen Hemminger
74343fa77d drivers: remove useless reset of PCI device pointer
Since rte_eth_dev_info_get does memset() on dev_info before
calling device specific code, the explicit assignment of NULL
in all these virtual drivers has no effect.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jan Blunck <jblunck@infradead.org>
2016-12-24 18:47:19 +01:00
Adrien Mazarguil
47a20b73e2 app/testpmd: fix flow command build on FreeBSD
A missing include causes the following compilation errors:

 error: use of undeclared identifier 'AF_INET'
 error: use of undeclared identifier 'AF_INET6'

Fixes: ef6e38550f ("app/testpmd: add items ipv4/ipv6 to flow command")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-12-23 16:55:36 +01:00
Adrien Mazarguil
1419fd5a6c app/testpmd: add protocol fields to flow command
This commit exposes the following item fields through the flow command:

- VLAN priority code point, drop eligible indicator and VLAN identifier
  (all part of TCI).
- IPv4 type of service, time to live and protocol.
- IPv6 traffic class, flow label, next header and hop limit.
- SCTP tag and checksum.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-12-23 10:27:32 +01:00
Adrien Mazarguil
05d34c6e9d app/testpmd: add queue actions to flow command
- QUEUE: assign packets to a given queue index.
- DUP: duplicate packets to a given queue index.
- RSS: spread packets among several queues.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:49 +01:00
Adrien Mazarguil
7a91969ad3 app/testpmd: add various actions to flow command
- MARK: attach 32 bit value to packets.
- FLAG: flag packets.
- DROP: drop packets.
- COUNT: enable counters for a rule.
- PF: redirect packets to physical device function.
- VF: redirect packets to virtual device function.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:39 +01:00
Adrien Mazarguil
638c4ad56d app/testpmd: add L4 items to flow command
Add the ability to match a few properties of common L4[.5] protocol
headers:

- ICMP: type and code.
- UDP: source and destination ports.
- TCP: source and destination ports.
- SCTP: source and destination ports.
- VXLAN: network identifier.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:22 +01:00
Adrien Mazarguil
ef6e38550f app/testpmd: add items ipv4/ipv6 to flow command
Add the ability to match basic fields from IPv4 and IPv6 headers (source
and destination addresses only).

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:20 +01:00
Adrien Mazarguil
6df81b325f app/testpmd: add items eth/vlan to flow command
These pattern items match basic Ethernet headers (source, destination and
type) and related 802.1Q/ad VLAN headers.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:14 +01:00
Adrien Mazarguil
abc3d81aca app/testpmd: add item raw to flow command
Matches arbitrary byte strings with properties:

- relative: look for pattern after the previous item.
- search: search pattern from offset (see also limit).
- offset: absolute or relative offset for pattern.
- limit: search area limit for start of pattern.
- length: pattern length.
- pattern: byte string to look for.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:13 +01:00
Adrien Mazarguil
02ef65f82c app/testpmd: add various items to flow command
- PF: match packets addressed to the physical function.
- VF: match packets addressed to a virtual function ID.
- PORT: device-specific physical port index to use.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:10 +01:00
Adrien Mazarguil
47bfa6adea app/testpmd: add item any to flow command
This pattern item matches any protocol in place of the current layer and
has two properties:

- min: minimum number of layers covered (0 or more).
- max: maximum number of layers covered (0 means infinity).

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:26:02 +01:00
Adrien Mazarguil
00d78f550f app/testpmd: support flow bit-field
Several rte_flow structures expose bit-fields that cannot be set in a
generic fashion at byte level. Add bit-mask support to handle them.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:25:50 +01:00
Adrien Mazarguil
d3f61b7bad app/testpmd: add flow item spec prefix length
Generating bit-masks from prefix lengths is often more convenient than
providing them entirely (e.g. to define IPv4 and IPv6 subnets).

This commit adds the "prefix" operator that assigns generated bit-masks to
any pattern item specification field.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:25:35 +01:00
Adrien Mazarguil
95f51cab43 app/testpmd: add flow item spec handler
Add parser code to fully set individual fields of pattern item
specification structures, using the following operators:

- fix: sets field and applies full bit-mask for perfect matching.
- spec: sets field without modifying its bit-mask.
- last: sets upper value of the spec => last range.
- mask: sets bit-mask affecting both spec and last from arbitrary value.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:30 +01:00
Adrien Mazarguil
5ac3502ed1 app/testpmd: add flow query command
Syntax:

 flow query {port_id} {rule_id} {action}

Query a specific action of an existing flow rule.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:28 +01:00
Adrien Mazarguil
fbe0e73e1d app/testpmd: add flow validate/create commands
Syntax:

 flow (validate|create) {port_id}
    [group {group_id}] [priority {level}] [ingress] [egress]
    pattern {item} [/ {item} [...]] / end
    actions {action} [/ {action} [...]] / end

Either check the validity of a flow rule or create it. Any number of
pattern items and actions can be provided in any order. Completion is
available for convenience.

This commit only adds support for the most basic item and action types,
namely:

- END: terminates pattern items and actions lists.
- VOID: item/action filler, no operation.
- INVERT: inverted pattern matching, process packets that do not match.
- PASSTHRU: action that leaves packets up for additional processing by
  subsequent flow rules.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:15 +01:00
Adrien Mazarguil
e0bbe277ce app/testpmd: add flow destroy command
Syntax:

 flow destroy {port_id} rule {rule_id} [...]

Destroy a given set of flow rules associated with a port.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:13 +01:00
Adrien Mazarguil
6ae4abac55 app/testpmd: add flow flush command
Syntax:

 flow flush {port_id}

Destroy all flow rules on a port.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:12 +01:00
Adrien Mazarguil
311569ab1b app/testpmd: add flow list command
Syntax:

 flow list {port_id} [group {group_id}] [...]

List configured flow rules on a port. Output can optionally be limited to a
given set of group identifiers.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:24:07 +01:00
Adrien Mazarguil
8a03ab58cc app/testpmd: support flow integer
Parse all integer types and handle conversion to network byte order in a
single function.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:20:54 +01:00
Adrien Mazarguil
19c90af628 app/testpmd: add flow command
Managing generic flow API functions from command line requires the use of
dynamic tokens for convenience as flow rules are not fixed and cannot be
defined statically.

This commit adds specific flexible parser code and object for a new "flow"
command in separate file.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:20:47 +01:00
Adrien Mazarguil
938a184a18 app/testpmd: implement basic support for flow API
Add basic management functions for the generic flow API (validate, create,
destroy, flush, query and list). Flow rule objects and properties are
arranged in lists associated with each port.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2016-12-23 10:19:15 +01:00
Jan Blunck
75aca7997e ethdev: initialize more fields on allocation
This moves the non-PCI related initialization of the link state interrupt
callback list and the setting of the default MTU to rte_eth_dev_allocate()
so that drivers only need to set non-default values.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-12-21 17:32:17 +01:00
David Marchand
ac7cd715d4 app/testpmd: display port driver name
This makes it easier to check which driver name is reported through ethdev
rte_eth_dev_info_get().

Example:

./build/app/testpmd -c 0x6 --vdev net_af_packet0,iface=mgmt0 --
	-i  --total-num-mbufs 2049
[snip]
testpmd> show port info all

********************* Infos for port 0  *********************
MAC address: DE:AD:DE:01:02:03
Driver name: net_af_packet
Connect to socket: 0
memory allocation on the socket: 0

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-12-06 14:34:12 +01:00
Ferruh Yigit
26faac8032 app/testpmd: unify help strings
Formatted as:
cmd fixed_string fixed|string|options <variable>: Description

If there is no description, final colon emitted.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-12-06 14:33:39 +01:00
Olivier Matz
dd030a0ee8 app/test: fix crash of LPM test
The test recently added accesses to lpm->tbl8[ip >> 8] with is much
larger than the size of the table, causing a crash of the test
application.

Fix this typo by replacing tbl8 by tbl24.

Fixes: 231fa88ed5 ("app/test: verify LPM tbl8 recycle")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2016-11-12 22:27:09 +01:00
Bernard Iremonger
86ef65ee58 app/testpmd: fix DCB configuration
Data Centre Bridge (DCB) configuration fails when SRIOV is
enabled if nb_rxq or nb_txq are greater than nb_q_per_pool.

The failure occurs during configuration of the ixgbe PMD when
it is started, in the ixgbe_check_mq_mode function.

Fixes: 2a977b891f ("app/testpmd: fix DCB configuration")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2016-11-07 16:55:59 +01:00
Arek Kusztal
7e70f8a608 app/test: fix hanging in SNOW 3G performance test
This commit fixes problem with device hanging because of
wrong pointer values in snow3g performance test

Fixes: 97fe6461c7 ("app/test: add SNOW 3G performance test")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2016-11-07 00:23:04 +01:00
Nikita Kozlov
b2212274c8 app/test: fix crash when checking LPM performance twice
num_route_entries needs to be resetted.

Fixes: 17d60f5b5e ("app/test: remove large IPv4 LPM data file")

Signed-off-by: Nikita Kozlov <nikita@elyzion.net>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2016-11-06 23:55:15 +01:00