Commit Graph

868 Commits

Author SHA1 Message Date
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