When building DPDK with musl, there is need not to disable
backtrace to remove some references to execinfo.h which is
not supported by musl now.
This also applies to some other libc implementation which
doesn't support backtrace() and backtrace_symbols().
musl is an implementation of the userspace portion
of the standard library functionality described in
the ISO C and POSIX standards, plus common extensions.
Got more details about musl from http://www.musl-libc.org .
Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
There is no function to refer any part of execinfo.h, so remove the
reference to it.
And there is no this file in musl. So need to remove it to support musl.
Signed-off-by: Wei Dai <wei.dai@intel.com>
The VDEV code will move to the bus drivers directory.
Rename functions from rte_eal_vdev_ to rte_vdev_
to prepare the move of the driver out of EAL.
The prefix rte_eal_vdrv_ is also renamed to rte_vdev_.
It was used for registration of vdev drivers.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
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>
These lists were unused and useless because they are maintained per bus:
struct rte_driver_list dev_driver_list
struct rte_device_list dev_device_list
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
These differences in Python 3 were causing errors:
- xrange is replaced by range
- dict values are a view (instead of list)
- has_key is removed
Fixes: deb87e6777 ("usertools: use sysfs for CPU layout")
Fixes: 63985c5f10 ("usertools: fix CPU layout for more than 2 threads")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
The existing code used to search for module files via modinfo has
several corner cases which can result in it failing where it should be
successful.
The call to lower() would cause results returned by 'modinfo' to be
forced to lowercase, results which were subsequently passed to
exists() which is case sensitive. This was most likely done to capture
all variants of failure strings modinfo might return
(ie. ERROR/Error/error/...) without thought negative effect to the
later call to exists(). For many this is a nonissue but if the module
path included non-lowercase alpha characters, something which is
easily possible with a non-lowercase kernel-extraversion string, this
would cause an issue.
We could move the call to lower() to the check for "error" but this
still leaves possible corner cases, for modules or module paths with
'error' in them.
Instead we will prevent modinfo's stderr from being used as a "good
value" for path, meaning we either get a valid path from modinfo, or
nothing at all. This removes all corner cases.
Ultimately these preliminary checks are unnecessary as exists() will
only return True if it is passed a valid path, passing it modinfo's
stderr would fail. In keeping with the original code, however, we do
some preliminary checks, but we are now free of corner cases.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
ixgbe_dev_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and ixgbe_dev_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
eth_igb_xstats_get_by_id() which retrieve
values of statistics specified by ids array
and eth_igb_xstats_get_names_by_id() which retrieve
names of statistics specified by ids array.
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
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>
Extended xstats API in ethdev library to allow grouping of stats
logically so they can be retrieved per logical grouping managed
by the application.
Added new functions rte_eth_xstats_get_names_by_id and
rte_eth_xstats_get_by_id using additional arguments (in compare
to rte_eth_xstats_get_names and rte_eth_xstats_get) - array of ids
and array of values.
doc: add description for modified xstats API
Documentation change for new 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: 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>
Stop port before enabling QinQ.
Add commands to set inner and outer TPID's and start port.
Remove TPID's from flow validate and and flow create commands.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Rx queues configured with more than 1023 descriptors cause readv() calls to
fail due to more iovec entries than permitted by the kernel. As a result,
no packets can be received.
Quietly limit internal Rx queue size to the maximum number of iovec entries
to fix this issue.
Fixes: 0781f5762c ("net/tap: support segmented mbufs")
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
RBDR buffers are refilled when SW consumes the buffers from CQ.
This creates deadlock case when CQ buffers exhausted due to lack
of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh
meet, irrespective of the number of CQ buffers consumed.
Fixes: e2d7fc9f0a ("net/thunderx: add single and multi-segment Rx")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
When RTE_DEVEL_BUILD is unset, -rpath is unset.
So the ethtool app cannot link with ixgbe shared library
which is required by ethtool lib:
warning: librte_pmd_ixgbe.so.1, needed by
examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/librte_ethtool.so,
not found (try using -rpath or -rpath-link)
It is fixed by adding the library in the application link.
The library link is also improved to specify that this explicit link
to ixgbe is needed only in the shared lib mode.
Fixes: 077d223e25 ("examples/ethtool: use ixgbe public function")
Signed-off-by: Markos Chandras <mchandras@suse.de>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Port ID is not an index from 0 to n_nic_ports, but rather a value
of nic_ports array.
Fixes: af75078fec ("first public release")
Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
L3fwd power app monitors the RX queues to see if the polling frequency
should be adjusted (the busier the queue, the higher the frequency).
The app uses several thresholds in the ring to determine the frequency,
being 96 the highest one, when frequency should be highest.
The problem is that the difference between this value and the ring size
is not big enough (128 - 96 = 32 descriptors), which means that
if the descriptors are not replenished quick enough, queue might
not be busy, but the app would think that it is, because 96th descriptor
is set.
Therefore, by increasing this gap (increasing the RX ring size),
we make sure that this false measurement will not happen.
Fixes: b451aa39db ("examples/l3fwd-power: use DD bit rather than RX queue count")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
If the number of rx queues is zero, it is meaningless to enable
rx interrupt. This patch fixes it.
Fixes: aee3bc79cc ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
This patch adds the unlinking/unmapping of shared host memory
on termination of l2fwd-keepalive. Previously it was only
cleaned on re-running of the example application.
Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
The l2fwd-keepalive example has infinite processing loops and as a
result the only way to exit it is via SIGINT/SIGTERM (e.g. Control-C).
The resulting shutdown is unclean, which is fixed by adding a signal
handler that causes the processing loops to break.
Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
To miss updating the variable prev_tsc in function l2fwd_main_loop()
The patch fixes it.
Fixes: e2366e74e0 ("examples: use buffered Tx")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
While later releases in the FreeBSD 10 series have a CPU_COUNT macro
defined, FreeBSD 10.0 and 10.1 do not have this macro. Therefore we provide
a basic fallback implementation of the macro for platforms where it is not
defined.
Fixes: 433ba6228f ("examples/performance-thread: add pthread_shim app")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@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>
Fixes: c0f87eb525 ("cryptodev: change burst API to be crypto op oriented")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fix aad capabilities for AES-GCM authtentication, aad is changed from
range 8-12 to 0-65535
Fixes: 8a9867a635 ("crypto/openssl: rename libcrypto to openssl")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit fixs segment fault when rte_eth_dev_close() is called on
a virtio dev more than once. Assigning zero after free to avoids
freed memory to be accessed again.
Fixes: 69c80d4ef8 ("net/virtio: allocate queue at init stage")
Cc: stable@dpdk.org
Signed-off-by: Huanle Han <hanxueluo@gmail.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Segfault happens when using virtio-user after commit 7f0a669e7b
("ethdev: add allocation helper for virtual drivers").
It's due to we use ethdev->device to recognize physical devices,
but after above commit, this field is also filled for virtual
devices. Then we obtain the wrong pci_dev pointer and accessing
its field when copying pci info results in segfault.
To fix it, we use hw->virtio_user_dev to differentiate physical
devices from virtual devices.
Fixes: 6a7c0dfcdf ("net/virtio: do not depend on PCI device of ethdev")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
The virtio port link status will always be DOWN:
The commit aa9f060617 ("net/virtio: fix link status always being up")
introduces a flag to help checking the status. If this flag is not set,
status will be always down. However, in dev start, this flag is set
after link status update, then we miss the chance to change the status
to UP in dev start.
To fix this bug, we simply move the link status update after the flag
setting so that the status can be correctly updated.
Fixes: aa9f060617 ("net/virtio: fix link status always being up")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
As we already change to use capability list to detect MSI-X, remove
the redundant MSI-X detection in legacy devices.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
LSC flag is set in several places, but only the last one takes effect;
so we remove the redundant ones and just keep the last one.
This also fixes the bug that dev_flags being overwritten by
rte_eth_copy_pci_info(), which resets it to 0 unconditionally.
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
The field, use_msix, in struct virtio_hw is not updated for modern
device, and is always zero. And now we depend on the status feature
and MSI-X to report LSC support (which is also not a correct
behavior). As a result, LSC is always disabled for modern devices.
To fix this, we just recognize MSI-X capability when going through
capability list, and update the info in virtio.
Fixes: 6ba1f63b5a ("virtio: support specification 1.0")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
vhost since dpdk17.02 + qemu2.7 and above will cause failures of
new connection when negotiating to set MQ. (one queue pair works
well).
Because there exist some bugs in qemu code when introducing
VHOST_USER_PROTOCOL_F_REPLY_ACK to qemu. when dealing with the vhost
message VHOST_USER_SET_MEM_TABLE for the second time, qemu indeed
doesn't send the messge (The message needs to be sent only once)but
still will be waiting for dpdk's reply ack, then, qemu is always
freezing. DPDK code indeed works in the right way.
The feature VHOST_USER_PROTOCOL_F_REPLY_ACK has to be disabled
by default at the dpdk side in order to avoid the feature support of
DPDK + qemu at the same time. if doing like that, MQ can works well.
Cc: stable@dpdk.org
Reported-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Add the support of RTE_FLOW_ITEM_TYPE_SCTP type packet for
ixgbe ntuple filter.
Fixes: 672be56d76 ("net/ixgbe: parse n-tuple filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>