Move all bypass functions to ixgbe pmd and remove function
pointers from the eth_dev_ops struct.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit adds TCP flags support in flow API as
some drivers have SYN filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Application fails to create NVGRE and E-Tag flows with
current configuration, this commit fixes the issue by
adding flow items for E_TAG and NVGRE.
Fixes: e4840ef268 ("ethdev: fix incomplete items in flow API")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Coverity reported that an argument for sizeof was used improperly.
We should allocate memory for value size that pointer points to,
instead of pointer size itself.
Coverity issue: 144523, 144521
Fixes: 7ac16a3660 ("app/proc-info: support xstats by ID and by name")
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>