Commit Graph

16658 Commits

Author SHA1 Message Date
Chas Williams
d5555fc900 build: add option to override max ethdev ports
Allow users and packagers to override the default RTE_MAX_ETHPORTS.
This adds a new meson option, max_ethports which defaults to the
current value.

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 21:21:27 +01:00
Bruce Richardson
d23e141ffa build: set RTE_ARCH_64 based on pointer size
Rather than relying on the target machine architecture, use the
size of a pointer from the compiler to determine if we are 64-bits
or not. This allows correct behaviour when you pass -m32 as a compile
option. It also allows us to use this value repeatedly throughout the
repo rather than continually testing for the sizeof(void*).

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-02-26 18:34:28 +01:00
Bruce Richardson
3655096fb1 devtools: fix build test on FreeBSD
readlink option "-m" is not supported on FreeBSD (checked on BSD 11),
so change to the largely-equivalent "-f" flag.

Fixes: a55277a788 ("devtools: add test script for meson builds")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 17:43:36 +01:00
Bruce Richardson
27a559cfe1 examples/vhost_crypto: fix dependency on vhost library
The vhost_crypto example app can't be used without the DPDK vhost
library, so disable the build of the example if the lib hasn't been
built.

Fixes: f5188211c7 ("examples/vhost_crypto: add sample application")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-26 16:22:56 +01:00
Bruce Richardson
0c56257a61 examples/ip_pipeline: disable build when no epoll
The ip_pipeline example requires the epoll.h header from linux, so
disable building the example if the header cannot be found.

Fixes: 4bbf8e30aa ("examples/ip_pipeline: add CLI interface")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 16:22:49 +01:00
Bruce Richardson
1fd0fa258b test/compress: fix missing header include
usleep() is defined in unistd.h, which is missing from include list
in test_compressdev.c, causing compiler errors on FreeBSD.

Fixes: b06aa643ca ("test/compress: add initial unit tests")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 16:22:41 +01:00
Bruce Richardson
a9de470cc7 test: move to app directory
Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
  folder.
* It eliminates the separate build task necessary for building the
  autotests using make "make test-build" which means that developers are
  less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
  building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:29:27 +01:00
Bruce Richardson
25d11a86c5 examples/bpf: move from test directory
The bpf folder didn't actual contain a test application, but instead
basic examples of BPF code for use with testpmd. Therefore we can
move it to the `examples` folder. Being different, it also needs
a README with it, explaining what it is and how to use it. References
to the code from the testpmd docs are suitably updated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-02-26 15:29:07 +01:00
Bruce Richardson
474572d2ae app/pipeline: move from test directory
Move to the app directory, and add to meson build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:28:46 +01:00
Bruce Richardson
75795fabd2 app/acl: move from test directory
Move to "app" directory and enable with meson build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-02-26 15:28:10 +01:00
Bruce Richardson
0c36081db2 app/cmdline: move from test directory
Move app to "app" directory and enable with meson build. For consistency of
naming, the subdirectory is also renamed from cmdline_test to test-cmdline.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26 15:24:11 +01:00
Bruce Richardson
b543d1a715 compat: merge compat library into EAL
Since compat library is only a single header, we can easily move it into
the EAL common headers instead of tracking it separately. The downside of
this is that it becomes a little more difficult to have any libs that are
built before EAL depend on it. Thankfully, this is not a major problem as
the only library which uses rte_compat.h and is built before EAL (kvargs)
already has the path to the compat.h header file explicitly called out as
an include path.

However, to ensure that we don't hit problems later with this, we can add
EAL common headers folder to the global include list in the meson build
which means that all common headers can be safely used by all libraries, no
matter what their build order.

As a side-effect, this patch also fixes an issue with building on BSD using
meson, due to compat lib no longer needing to be listed as a dependency.

Fixes: a8499f65a1 ("log: add missing experimental tag")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-25 16:03:31 +01:00
Liron Himi
d84c070aeb maintainers: update Marvell PMDs
Natalie and Dmitri are no longer involved in PMDs maintenance hence
update the list.
Also append new active maintainers to the list.

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
2019-02-25 10:47:48 +01:00
Ferruh Yigit
9c3650aa10 devtools: add git log checks for DCB, TOS and TTL
Add case check to DCB, TOS and TTL abbreviations.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-25 00:07:17 +01:00
Thomas Monjalon
8fdac86abd devtools: fix test of some build options
CONFIG_RTE_LIBRTE_PMD_ISAL was not tested because of a typo.

CONFIG_RTE_LIBRTE_PMD_QAT_SYM was not tested since it has been
introduced and made CONFIG_RTE_LIBRTE_PMD_QAT enabled by default.

While at it, DPDK_DEP_JSON is now checked for "y",
as other DPDK_DEP_* variables, instead of non-empty.

Fixes: 3c32e89f68 ("compress/isal: add skeleton ISA-L compression PMD")
Fixes: 7a34c21557 ("compress/qat: add empty driver")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-02-24 23:24:18 +01:00
Thomas Monjalon
fbe7134234 devtools: test build of zlib PMD
The PMD zlib was not enabled in devtools/test-build.sh.
It is fixed by using the environment variable DPDK_DEP_ZLIB.

Fixes: 0c4e4c16b0 ("compress/zlib: introduce zlib PMD")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24 23:24:11 +01:00
Thomas Monjalon
814ad2a9bc devtools: add libelf dependency to build test
The option CONFIG_RTE_LIBRTE_BPF_ELF was never enabled
with test-build.sh.
It is fixed with the environment variable DPDK_DEP_ELF.

Fixes: 5dba93ae5f ("bpf: add ability to load eBPF program from ELF object file")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24 23:24:02 +01:00
Thomas Monjalon
fdb3798d6f mk: fix build of shared library with libbsd
When building DPDK with "make" and options
	CONFIG_RTE_USE_LIBBSD=y
and
	CONFIG_RTE_BUILD_SHARED_LIB=y
libbsd was not linked, resulting in compilation errors:
	undefined reference to `strlcpy'

The link option -lbsd is added in a common place for both
Linux apps and libs.
It is used in app linkage via EXECENV_LDLIBS,
and in lib linkage via the added variable EXECENV_LDLIBS-y.

Fixes: 5364de644a ("eal: support strlcpy function")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-02-24 23:23:57 +01:00
Pallantla Poornima
7c7b756225 vhost: fix sprintf with snprintf
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.

Fixes: d7280c9fff ("vhost: support selective datapath")
Cc: stable@dpdk.org

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
2019-02-22 14:39:49 +01:00
Wenjie Sun
054617fd82 vhost: fix deadlock in driver unregister
In rte_vhost_driver_unregister(), the connection fd is
removed from the fdset using fdset_try_del(). Call to
this function may fail if the corresponding fd is in
busy state, indicating that event dispatcher is
executing the read or write callback on this fd.
When it happens, rte_vhost_driver_unregister() keeps
trying to remove the fd from the set until it is no
more busy.

This situation is causing a deadlock, because
rte_vhost_driver_unregister() keeps trying to remove
the fd from the set with vhost_user.mutex held, while
the callback executed by the dispatcher,
vhost_user_read_cb(), also takes this mutex at
numerous places.

The fix consists in releasing vhost_user.mutex between
each retry in vhost_driver_unregister().

Fixes: 8b4b949144 ("vhost: fix dead lock on closing in server mode")
Cc: stable@dpdk.org

Signed-off-by: Wenjie Sun <findtheonlyway@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Tiwei Bie
4905ed3a52 net/virtio: optimize Tx enqueue for packed ring
This patch introduces an optimized enqueue function in packed
ring for the case that virtio net header can be prepended to
the unchained mbuf.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Tiwei Bie
b92f1429a6 net/virtio: introduce helper for clearing net header
This patch introduces a helper for clearing the virtio net header
to avoid the code duplication. Macro is used as it shows slightly
better performance.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Tiwei Bie
5c75a8efcd net/virtio: fix in-order Tx path for packed ring
When IN_ORDER feature is negotiated, device may just write out a
single used descriptor for a batch of buffers:

"""
Some devices always use descriptors in the same order in which they
have been made available. These devices can offer the VIRTIO_F_IN_ORDER
feature. If negotiated, this knowledge allows devices to notify the
use of a batch of buffers to the driver by only writing out a single
used descriptor with the Buffer ID corresponding to the last descriptor
in the batch.

The device then skips forward in the ring according to the size of the
batch. The driver needs to look up the used Buffer ID and calculate the
batch size to be able to advance to where the next used descriptor will
be written by the device.
"""

But the Tx path of packed ring can't handle this. With this patch,
when IN_ORDER is negotiated, driver will manage the IDs linearly,
look up the used buffer ID and advance to the next used descriptor
that will be written by the device.

Fixes: 892dc798fa ("net/virtio: implement Tx path for packed queues")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Tiwei Bie
e788032aac net/virtio: fix in-order Tx path for split ring
When IN_ORDER feature is negotiated, device may just write out a
single used ring entry for a batch of buffers:

"""
Some devices always use descriptors in the same order in which they
have been made available. These devices can offer the VIRTIO_F_IN_ORDER
feature. If negotiated, this knowledge allows devices to notify the
use of a batch of buffers to the driver by only writing out a single
used ring entry with the id corresponding to the head entry of the
descriptor chain describing the last buffer in the batch.

The device then skips forward in the ring according to the size of
the batch. Accordingly, it increments the used idx by the size of
the batch.

The driver needs to look up the used id and calculate the batch size
to be able to advance to where the next used ring entry will be written
by the device.
"""

Currently, the in-order Tx path in split ring can't handle this.
With this patch, driver will allocate desc_extra[] based on the
index in avail/used ring instead of the index in descriptor table.
And driver can just relay on the used->idx written by device to
reclaim the descriptors and Tx buffers.

Fixes: e5f456a98d ("net/virtio: support in-order Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Tiwei Bie
91397bdc76 net/virtio: fix Tx desc cleanup for packed ring
We should try to cleanup at least the 'need' number of descs.

Fixes: 892dc798fa ("net/virtio: implement Tx path for packed queues")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-22 14:39:49 +01:00
Julien Meunier
4c3cd4c294 test/pmd_perf: fix the way to drain the port
If the port has received less than ``pkt_per_port`` packets (for
example, the port has missed some packets), the test is in an infinite
loop.

Instead of expecting a number of packet to receive, let the port to be
drained by itself. If no more packets are received, the test can
continue.

Fixes: 002ade70e9 ("app/test: measure cycles per packet in Rx/Tx")
Cc: stable@dpdk.org

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-22 14:39:49 +01:00
Hari Kumar Vemula
7f949ae391 net/bonding: fix reset active slave
test_alb_reply_from_client test fails due to incorrect active slave
array's index. This was due to invalid active slave count.

Count of internals->active_slave is not updated even when active slave
is deactivated.
Hence active slave count always keeps incrementing beyond the actual
active slaves.

Fix is to set the internals->active_slave to starting index 0 whenever
it exceeds the number of slaves in active slave list and also update
the active slave count during slave de-activation.

Fixes: e1110e9776 ("net/bonding: fix Rx slave fairness")
Cc: stable@dpdk.org

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
2019-02-22 14:39:49 +01:00
Hyong Youb Kim
90d2eb059e net/bonding: avoid warning for invalid port
For active-backup, tlb, and alb mode,
bond_ethdev_promiscuous_{enable,disable} tries to set promisc mode on
the primary port, even when there are no slaves. It is harmless, as
rte_eth_promiscuous_{enable,disable} does nothing if the port number
is invalid. But, it does print a warning message. Here is an example
from testpmd.

testpmd> create bonded device 5 0
Created new bonded device net_bonding_testpmd_0 on (port 4).
Invalid port_id=33
testpmd> set promisc 4 off
Invalid port_id=33

33 in this case is RTE_MAX_ETHPORTS + 1, the invalid primary port
number used within the bonding driver. This warning message is
harmless but can be confusing to the user. So do not try to set
promisc on a primary port when we know it does not exist (i.e. no
slaves).

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Acked-by: Chas Williams <chas3@att.com>
2019-02-21 14:32:44 +01:00
Shahed Shaikh
60f9a63457 net/qede: fix Tx packet prepare for tunnel packets
This patch fixes a regression introduced by
commit 49d3978d57 ("net/qede: fix Tx tunnel offload support mask")
in which qede_xmit_prep_pkts() breaks the loop for successful
check of Tunneling offload flags instead of continuing, resulting
in tx_pkt_prepare return a failure.

Fixes: 49d3978d57 ("net/qede: fix Tx tunnel offload support mask")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-02-20 16:41:43 +01:00
Thomas Monjalon
a3a4aba4b5 ethdev: remove unused variable
When removing the old attach function, the racy variable for getting
the last port id became unused.

Fixes: c9cce42876 ("ethdev: remove deprecated attach/detach functions")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-20 16:41:43 +01:00
Rami Rosen
56dd3ae195 doc: fix a minor typo in testpmd guide
This patch fixes a minor typo in testpmd guide.

Fixes: 3c272b280a ("app/testpmd: add commands for RSS queue region")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2019-02-20 16:41:43 +01:00
Michal Krawczyk
117ba4a604 net/ena: get device info statically
Whenever the app is calling rte_eth_dev_info_get(), it shouldn't use the
admin command. It was causing problems, if it was called from the
secondary process - the main process was crashing, and the secondary app
wasn't getting any result, as the admin request couldn't be processed by
the process which was requesting the data.

To fix that, the data is being written to the adapter structure during
device initialization routine.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2019-02-20 16:41:43 +01:00
Chas Williams
d7bce0058a net/bonding: fix link status
Copying the link properties of the first slave added may copy an
invalid link status. The speed and duplex of the slave may not
be known at this time. Delay setting the properties until the
first slave reports as link up. Note that we are still ignoring
an error from link_properties_valid. For some bonding modes,
802.3ad, we should not activate the slave if it does not have
matching link properties.

Fixes: a45b288ef2 ("bond: support link status polling")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
2019-02-20 16:41:43 +01:00
Chas Williams
af91947cd2 net/bonding: fix slave Tx burst for mode 4
The Tx burst routine always needs to check for pending LACPDUs
and send them if available. Do this first to prioritize the
control traffic.  We can still early exit, before calculating
the distribution slaves, if there isn't any data packets.

Fixes: 09150784a7 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org

Reported-by: Hui Zhao <zhaohui8@huawei.com>
Signed-off-by: Chas Williams <chas3@att.com>
2019-02-20 16:41:43 +01:00
Wei Zhao
cb05494d29 net/ice: enable VLAN filter offloads support
VLAN filter is required to be configured during dev_start according to
dev_conf.rxmod.offloads setting, so ice_vlan_offload_set is called to
handle this.

Fixes: 690175ee51 ("net/ice: support getting device information")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-02-19 10:35:00 +01:00
Wei Zhao
f9fa1bb464 net/avf: fix admin queue interrupt for ICE
Enable CLEARPBA bit is required by ice NIC of A0/A1 version to
enable admin queue interrupt.
Also enable CLEARPBA bit does no impact on AVF behaviour when be
hosted by other devices, so we can make it as default.

Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-02-19 10:34:41 +01:00
Davide Caratti
8fe6beed2f net/bnxt: support IOVA VA mode
Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags: this allows initializing bnxt
PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be
accessed without CAP_SYS_ADMIN privileges.

Cc: stable@dpdk.org

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-02-13 14:24:51 +01:00
Chas Williams
bddcc1228c net/bonding: fix Tx in 802.3ad mode
We can transmit if there is at least one distributing slave.

Fixes: 09150784a7 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
2019-02-13 14:07:34 +01:00
Qi Zhang
a8562b09c1 net/ice: fix crash on device detach
Fix segment fault when detach a device due to some redundant function
call in ice_dev_uninit.

Fixes: f9cf4f8641 ("net/ice: support device initialization")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-02-13 13:13:44 +01:00
Thomas Monjalon
714bf46ebb net/mlx: support firmware version query
The API function rte_eth_dev_fw_version_get() is querying drivers
via the operation callback fw_version_get().
The implementation of this operation is added for mlx4 and mlx5.
Both functions are copying the same ibverbs field fw_ver
which is retrieved when calling ibv_query_device[_ex]()
during the port probing.

It is tested with command "drvinfo" of examples/ethtool/.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-02-13 12:55:38 +01:00
Dekel Peled
7f4019d370 net/mlx5: fix Tx metadata for multi-segment packet
Original patch implemented the use of match_metadata offload in the
different burst functions.
The concurrent use of match_metadata and multi_segs offloads was
not handled.

This patch updates function txq_scatter_v(), to pass metadata value
from mbuf to wqe, when indicated by offload flags.

Fixes: 6bd7fbd03c ("net/mlx5: support metadata as flow rule criteria")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-02-13 12:55:38 +01:00
Rami Rosen
b13baac8d5 mbuf: fix a typo
This trivial patch fixes a typo in rte_mbuf.h.

Fixes: f20b50b946 ("mbuf: optimize refcnt update")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
2019-02-12 14:32:01 +01:00
Rami Rosen
c652031bf4 test: fix autotest list
This patch fixes a broken build; when running
make test
we get the following error:
...
Traceback (most recent call last):
  File "test/test/autotest.py", line 49, in <module>
    num_fails = runner.run_all_tests()
  File "test/test/autotest_runner.py", line 345, in run_all_tests
    self.parallel_tests)
  File "test/test/autotest_runner.py", line 264, in __filter_test
    test_cmd = test["Command"]
KeyError: 'Command'
...
The reason is that the pdump autotest entry uses "Comamnd"
instead of "Command"; this patch fixes it.

Bugzilla ID: 205
Fixes: 086eb64db3 ("test/pdump: add unit test for pdump library")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-12 12:26:48 +01:00
Bruce Richardson
146e57627f eal: support strlcat function
Add the strlcat function to DPDK to exist alongside the strlcpy one.
While strncat is generally safe for use for concatenation, the API for the
strlcat function is perhaps a little nicer to use, and supports truncation
detection.

See commit 5364de644a ("eal: support strlcpy function") for more
details on the function selection logic, since we only should be using the
DPDK-provided version when no system-provided version is present.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-02-12 10:04:28 +01:00
Darek Stojaczyk
0b8572a0c1 vhost: add external message handling to the API
External message callbacks are used e.g. by vhost crypto
to parse crypto-specific vhost-user messages.

We are now publishing the API to register those callbacks,
so that other backends outside of DPDK can use them as well.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00
Rami Rosen
e17697abd3 net/virtio: remove forward declaration
This minor cleanup patch removes an unnecessary forward
declaration of virtio_intr_enable() in net/virtio PMD.

Fixes: fe19d49cb5 ("net/virtio: fix Rx interrupt with VFIO")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00
Xiao Wang
b172129583 vhost: remove vDPA available ring relay helper
We don't need to relay available ring and check the desc, vdpa device
can access the available ring in the guest directly. With this patch,
we can achieve better throughput and lower CPU usage.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00
Jens Freimann
8b90e43581 net/virtio: set offload flag for jumbo frames
Port configuration fails because offload flags don't match the expected
value when max-pkt-len is set to a value that should enable receive port
offloading but doesn't.

The .dev_infos_get callback can be called before the configure callback.
At that time we don't know the maximum packet size yet because it is
only set up when ports are started. So in virtio_dev_info_get() just
always set the jumbo packet offload flag.

Check the maximum packet length at device configure time, because then we
have access to the max-pkt-len value provided by the user. If the
max-pkt-len exceeds the maximum MTU supported by the device we remove
the VIRTIO_NET_F_MTU flag from requested features.

Fixes: a4996bd89c ("ethdev: new Rx/Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00
Ilya Maximets
4b058fdd27 net/virtio: add missing read barrier for packed dequeue
Read barrier is required between reading the flags (desc_is_used)
and the content of descriptor to ensure the ordering.
Otherwise, speculative read of desc.id could be reordered with
reading of the desc.flags.

Fixes: a76290c8f1 ("net/virtio: implement Rx path for packed queues")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00
Ilya Maximets
23d25f1a40 net/virtio: add barriers for extra descriptors on Rx split
There should be read barrier between checking VIRTQUEUE_NUSED (reading
the used->idx) and reading these descriptors. It's done for the first
checks at the beginning of these functions but missed while checking
for extra required descriptors.

Fixes: e5f456a98d ("net/virtio: support in-order Rx and Tx")
Fixes: 13ce5e7eb9 ("virtio: mergeable buffers")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-02-08 19:27:07 +01:00