Tiwei Bie [Fri, 22 Feb 2019 02:42:07 +0000 (10:42 +0800)]
vhost: fix potential use-after-free for zero copy mbuf
Don't free the zero copy mbufs before they have been consumed,
otherwise there could be use-after-free.
Fixes:
b0a985d1f340 ("vhost: add dequeue zero copy")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Fri, 22 Feb 2019 02:42:06 +0000 (10:42 +0800)]
vhost: restore mbuf first when freeing zmbuf
The mbufs should also be restored in free_zmbufs().
Fixes:
b0a985d1f340 ("vhost: add dequeue zero copy")
Fixes:
3ebd930588b7 ("vhost: fix mbuf free")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Sunil Kumar Kori [Fri, 22 Feb 2019 11:16:05 +0000 (11:16 +0000)]
net/dpaa2: support generic flow
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 22 Feb 2019 11:16:04 +0000 (11:16 +0000)]
net/dpaa2: support low level loopback tester
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Ashish Jain [Fri, 22 Feb 2019 11:16:02 +0000 (11:16 +0000)]
net/dpaa2: support 16 Rx queues per traffic class
Adding support for 16 queues per TC per DPNI port
which is required for LX2 platform.
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Nipun Gupta [Fri, 22 Feb 2019 11:16:01 +0000 (11:16 +0000)]
bus/fslmc: add enqueue response read in qbman
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Hemant Agrawal [Fri, 22 Feb 2019 11:15:59 +0000 (11:15 +0000)]
mempool/dpaa2: fix continuous print on empty pool
Changing the print to DP_DEBUG to avoid continuous prints when
buffer pools runs out of buffers
Fixes:
3646ccf0b036 ("mempool/dpaa2: support dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 22 Feb 2019 11:15:58 +0000 (11:15 +0000)]
net/dpaa2: support VLAN TPID config
This patch add support to config custom tpid in dpni.
i.e. value other than 0x8100 and 0x88A8
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Raslan Darawsheh [Tue, 26 Feb 2019 09:50:56 +0000 (09:50 +0000)]
net/tap: fix multi-process request
The structure was not initialized.
Fixes:
c9aa56edec8e ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Thomas Monjalon [Sun, 24 Feb 2019 22:42:01 +0000 (23:42 +0100)]
app/compress-perf: call generic strlcpy
The call to strlcpy uses either libc, libbsd or internal rte_strlcpy.
No need to call the DPDK flavor explicitly.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Shahed Shaikh [Thu, 21 Feb 2019 19:24:44 +0000 (11:24 -0800)]
net/bnx2x: fix segfaults due to stale interrupt status
Previous ungraceful exit may leave behind un-acked stale
interrupts for slowpath and fastpath.
Interrupt status polling function is started before FLR is
initiated, so we don't have a real way to protect this polling
function invoking an interrupt handler caused due to stale
interrupt status from previous ungraceful exit.
So, check uninitialized status block variables in interrupt
handling path which may lead to segfault.
Fixes:
540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Thomas Monjalon [Thu, 21 Feb 2019 09:29:14 +0000 (10:29 +0100)]
net/mlx: prefix private structure
The private structure stored in rte_eth_dev->data->dev_private
was named "struct priv".
In order to ease code browsing, the structure is renamed
"struct mlx[45]_priv".
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Leyi Rong [Mon, 25 Feb 2019 17:18:52 +0000 (01:18 +0800)]
net/iavf: rename remaining avf strings
This is the main patch which renames the macros, functions,
structs and any remaining strings in the iavf code.
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Leyi Rong [Mon, 25 Feb 2019 17:18:51 +0000 (01:18 +0800)]
net/iavf: rename avf to iavf
Rename Intel Ethernet Adaptive Virtual Function driver avf to iavf.
This is the first patch which will only renames the directory name,
lib name, filenames and updates the new name in makefile and meson
files. Also updates the #include files in source files.
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Tue, 26 Feb 2019 14:15:33 +0000 (14:15 +0000)]
devtools: add verbose option to meson build test
When running ninja, the commands are, by default, always printed on top of
each other. For those who want more detail in the output, two levels of
verbose output has been added to the test-meson-builds script. When "-v" is
passed, or the "TEST_MESON_BUILD_VERBOSE" flag is set in the environment,
then the output of ninja is passed through "cat" to prevent each line
overwriting the next. If "-vv" is passed, or
"TEST_MESON_BUILD_VERY_VERBOSE" is set in the environment, then ninja is
called with the "-v" flag to print out each command in full as it is
executing.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Phil Yang [Thu, 31 Jan 2019 10:11:52 +0000 (18:11 +0800)]
build: support Cortex a55 and a76 platforms
Enable native/cross compiling for Cortex-A55 and Cortex-A76 on meson.
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:37 +0000 (17:46 +0000)]
build: improve pcap dependency handling
pcap has historically shipped a custom pcap-config binary tool which
does the job of pkg-config. It was never compatible with cross
compilation.
Meson uses it when using dependency(), which then means cross
compilation fails.
Set pcap-config to empty in the meson cross compilation files so
that Meson will not use it, and add a fallback in case
dependency() fails.
libpcap 1.9.0 finally ships a pkg-config file so everything will
work out of the box in the future.
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Remy Horton [Fri, 1 Mar 2019 07:15:17 +0000 (07:15 +0000)]
maintainers: resign from keepalive, metrics and ethtool
After today I will no longer be with Intel, so I am
removing my name from all related maintainer roles.
Signed-off-by: Remy Horton <remy.horton@intel.com>
Aaron Conole [Thu, 7 Feb 2019 22:01:13 +0000 (17:01 -0500)]
examples/vhost_scsi: disable build if missing dependency
The vhost_scsi example code is set to build, even if the requisite header
file virtio_scsi.h isn't available. This happens on some Ubuntu systems
when some versions of the libc-dev package aren't available.
Check whether the virtio_scsi.h file exists, and if not, set the build
flag to false.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Vipin Varghese [Wed, 13 Feb 2019 05:41:06 +0000 (11:11 +0530)]
doc: add meson build to contributing guide
Patches has to be validated for meson devtool script for
code and document changes. Updating documentation for meson
build steps in checking Compilation category.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Tested-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:36 +0000 (17:46 +0000)]
build: use integers for numerical options
Now that the minimum Meson version has been bumped past 0.45 we can use
integer as an option type directly.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:35 +0000 (17:46 +0000)]
build: improve libbsd dependency handling
Use dependency() instead of manual append to ldflags.
Move libbsd inclusion to librte_eal, so that all other libraries and
PMDs will inherit it.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:34 +0000 (17:46 +0000)]
build: reorder cmdline library after EAL
Most libraries and PMDs depend on eal, and eal depends only on kvargs,
so reorder the list in Meson to reflect this and take advantage of this
dependency chain.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:33 +0000 (17:46 +0000)]
build: improve dependency handling
Whenever possible (if the library ships a pkg-config file) use meson's
dependency() function to look for it, as it will automatically add it
to the Requires.private list if needed, to allow for static builds to
succeed for reverse dependencies of DPDK. Otherwise the recursive
dependencies are not parsed, and users doing static builds have to
resolve them manually by themselves.
When using this API avoid additional checks that are superfluous and
take extra time, and avoid adding the linker flag manually which causes
it to be duplicated.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Luca Boccassi [Tue, 26 Feb 2019 17:46:32 +0000 (17:46 +0000)]
build: bump minimum Meson version to 0.47.1
Meson 0.47.1 fixed a bug that is difficult to work around, which causes
the linker flag of dependencies to be repeated dozens of times, which
causes issues especially when using the built-in dependency() API.
Bump the minimum version and remove obsolete version checks.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Chas Williams [Thu, 7 Feb 2019 15:53:18 +0000 (10:53 -0500)]
build: fix options ordering
Sort the options alphabetically and make a note of the preferred
order at the top of the file.
Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Chas Williams [Thu, 7 Feb 2019 15:53:17 +0000 (10:53 -0500)]
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>
Bruce Richardson [Wed, 26 Sep 2018 09:15:36 +0000 (10:15 +0100)]
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>
Bruce Richardson [Mon, 25 Feb 2019 15:40:01 +0000 (15:40 +0000)]
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:
a55277a788df ("devtools: add test script for meson builds")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Mon, 25 Feb 2019 15:23:04 +0000 (15:23 +0000)]
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:
f5188211c721 ("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>
Bruce Richardson [Mon, 25 Feb 2019 15:23:03 +0000 (15:23 +0000)]
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:
4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Mon, 25 Feb 2019 15:23:02 +0000 (15:23 +0000)]
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:
b06aa643cac4 ("test/compress: add initial unit tests")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Tue, 26 Feb 2019 12:19:03 +0000 (12:19 +0000)]
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>
Bruce Richardson [Tue, 26 Feb 2019 12:19:02 +0000 (12:19 +0000)]
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>
Bruce Richardson [Tue, 26 Feb 2019 12:19:01 +0000 (12:19 +0000)]
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>
Bruce Richardson [Tue, 26 Feb 2019 12:19:00 +0000 (12:19 +0000)]
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>
Bruce Richardson [Tue, 26 Feb 2019 12:18:59 +0000 (12:18 +0000)]
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>
Bruce Richardson [Wed, 6 Feb 2019 11:01:30 +0000 (11:01 +0000)]
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:
a8499f65a1d1 ("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>
Liron Himi [Wed, 20 Feb 2019 15:01:59 +0000 (17:01 +0200)]
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>
Ferruh Yigit [Tue, 29 Jan 2019 13:55:33 +0000 (13:55 +0000)]
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>
Thomas Monjalon [Tue, 12 Feb 2019 22:20:37 +0000 (23:20 +0100)]
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:
3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Fixes:
7a34c2155716 ("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>
Thomas Monjalon [Tue, 12 Feb 2019 22:18:54 +0000 (23:18 +0100)]
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:
0c4e4c16b004 ("compress/zlib: introduce zlib PMD")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Tue, 12 Feb 2019 22:10:39 +0000 (23:10 +0100)]
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:
5dba93ae5f2d ("bpf: add ability to load eBPF program from ELF object file")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Tue, 12 Feb 2019 22:07:05 +0000 (23:07 +0100)]
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:
5364de644a4b ("eal: support strlcpy function")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Pallantla Poornima [Mon, 4 Feb 2019 07:28:06 +0000 (07:28 +0000)]
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:
d7280c9fffcb ("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>
Wenjie Sun [Mon, 28 Jan 2019 06:55:49 +0000 (14:55 +0800)]
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:
8b4b949144b8 ("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>
Tiwei Bie [Tue, 19 Feb 2019 10:59:51 +0000 (18:59 +0800)]
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>
Tiwei Bie [Tue, 19 Feb 2019 10:59:50 +0000 (18:59 +0800)]
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>
Tiwei Bie [Tue, 19 Feb 2019 10:59:49 +0000 (18:59 +0800)]
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:
892dc798fa9c ("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>
Tiwei Bie [Tue, 19 Feb 2019 10:59:48 +0000 (18:59 +0800)]
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:
e5f456a98d3c ("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>
Tiwei Bie [Tue, 19 Feb 2019 10:59:47 +0000 (18:59 +0800)]
net/virtio: fix Tx desc cleanup for packed ring
We should try to cleanup at least the 'need' number of descs.
Fixes:
892dc798fa9c ("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>
Julien Meunier [Wed, 20 Feb 2019 21:06:08 +0000 (23:06 +0200)]
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:
002ade70e933 ("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>
Hari Kumar Vemula [Mon, 18 Feb 2019 11:59:23 +0000 (11:59 +0000)]
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:
e1110e977648 ("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>
Hyong Youb Kim [Thu, 10 Jan 2019 10:22:34 +0000 (02:22 -0800)]
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:
2efb58cbab6e ("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>
Shahed Shaikh [Wed, 13 Feb 2019 17:53:33 +0000 (09:53 -0800)]
net/qede: fix Tx packet prepare for tunnel packets
This patch fixes a regression introduced by
commit
49d3978d5723 ("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:
49d3978d5723 ("net/qede: fix Tx tunnel offload support mask")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Thomas Monjalon [Thu, 14 Feb 2019 16:29:20 +0000 (17:29 +0100)]
ethdev: remove unused variable
When removing the old attach function, the racy variable for getting
the last port id became unused.
Fixes:
c9cce42876f5 ("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>
Rami Rosen [Sat, 16 Feb 2019 11:13:23 +0000 (13:13 +0200)]
doc: fix a minor typo in testpmd guide
This patch fixes a minor typo in testpmd guide.
Fixes:
3c272b280a50 ("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>
Michal Krawczyk [Fri, 15 Feb 2019 08:36:39 +0000 (09:36 +0100)]
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>
Chas Williams [Thu, 14 Feb 2019 19:11:12 +0000 (14:11 -0500)]
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:
a45b288ef21a ("bond: support link status polling")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Chas Williams [Thu, 14 Feb 2019 19:09:58 +0000 (14:09 -0500)]
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:
09150784a776 ("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>
Wei Zhao [Wed, 13 Feb 2019 03:49:48 +0000 (11:49 +0800)]
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:
690175ee51bf ("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>
Wei Zhao [Wed, 13 Feb 2019 08:54:13 +0000 (16:54 +0800)]
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>
Davide Caratti [Tue, 12 Feb 2019 18:30:19 +0000 (19:30 +0100)]
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>
Chas Williams [Mon, 11 Feb 2019 16:34:36 +0000 (11:34 -0500)]
net/bonding: fix Tx in 802.3ad mode
We can transmit if there is at least one distributing slave.
Fixes:
09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Qi Zhang [Wed, 30 Jan 2019 08:23:46 +0000 (16:23 +0800)]
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:
f9cf4f864150 ("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>
Thomas Monjalon [Wed, 6 Feb 2019 22:25:19 +0000 (23:25 +0100)]
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>
Dekel Peled [Wed, 30 Jan 2019 06:43:29 +0000 (08:43 +0200)]
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:
6bd7fbd03c62 ("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>
Rami Rosen [Mon, 11 Feb 2019 18:52:18 +0000 (20:52 +0200)]
mbuf: fix a typo
This trivial patch fixes a typo in rte_mbuf.h.
Fixes:
f20b50b946da ("mbuf: optimize refcnt update")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Rami Rosen [Mon, 11 Feb 2019 18:38:59 +0000 (20:38 +0200)]
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:
086eb64db39e ("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>
Bruce Richardson [Thu, 17 Jan 2019 17:30:32 +0000 (17:30 +0000)]
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
5364de644a4b ("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>
Darek Stojaczyk [Thu, 17 Jan 2019 15:32:26 +0000 (16:32 +0100)]
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>
Rami Rosen [Wed, 23 Jan 2019 17:29:48 +0000 (19:29 +0200)]
net/virtio: remove forward declaration
This minor cleanup patch removes an unnecessary forward
declaration of virtio_intr_enable() in net/virtio PMD.
Fixes:
fe19d49cb525 ("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>
Xiao Wang [Wed, 23 Jan 2019 13:02:59 +0000 (21:02 +0800)]
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>
Jens Freimann [Tue, 5 Feb 2019 11:17:02 +0000 (12:17 +0100)]
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:
a4996bd89c42 ("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>
Ilya Maximets [Thu, 24 Jan 2019 16:59:02 +0000 (19:59 +0300)]
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:
a76290c8f1cf ("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>
Ilya Maximets [Thu, 24 Jan 2019 16:59:01 +0000 (19:59 +0300)]
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:
e5f456a98d3c ("net/virtio: support in-order Rx and Tx")
Fixes:
13ce5e7eb94f ("virtio: mergeable buffers")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ilya Maximets [Thu, 24 Jan 2019 16:59:00 +0000 (19:59 +0300)]
net/virtio: fix read barriers on packed Tx cleanup
Read barrier must be implied between reading descriptor flags
and descriptor id. Otherwise, in case of reordering, we could
read wrong descriptor id.
For the reference, similar barrier for split rings is the read
barrier between VIRTQUEUE_NUSED (reading the used->idx) and
the call to the virtio_xmit_cleanup().
Additionally removed double update of 'used_idx'. It's enough
to set it in the end of the loop.
Fixes:
892dc798fa9c ("net/virtio: implement Tx 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>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:43 +0000 (16:29 +0000)]
net/sfc/base: share macro to increment per-event type stats
Move duplicate macro to increment per-event type stats to
internal header. These stats are NIC family independent and
stored in generic event queue structure.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:42 +0000 (16:29 +0000)]
net/sfc/base: improve MCDI interface header inclusion
Include efx_mcdi.h from main internal header efx_impl.h directly
instead of indirect inclusion via family-specific header.
It avoids duplication and fixes Medford and Medford2 cases where
the header inclusion is lost.
Correctness is still guaranteed by checks in efx_check.h which
require EFSYS_OPT_MCDI for corresponding families and do not
allow to enable the option if no family requires it.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:41 +0000 (16:29 +0000)]
net/sfc/base: avoid division by 0 if no event queue timers
If event queue timers are not supported, enc_evq_timer_quantum_ns and
enc_evq_timer_max_us should be set to 0. Make sure that division by 0
does not happen in libefx, if public function efx_ev_usecs_to_ticks()
is used in this case.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:40 +0000 (16:29 +0000)]
net/sfc/base: simplify EF10 family run-time checks
Add EFX_FAMILY_IS_EF10() which may be used as synonym of any EF10-based
NIC family (i.e. Huntigton, Medford or Medford2 at the time of addition).
Suggested-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:39 +0000 (16:29 +0000)]
net/sfc/base: simplify EF10 family conditional code checks
Add EFX_OPTS_EF10() which may be used as synonym of any EF10-based
NIC (i.e. Huntigton, Medford or Medford2 at the time of addition).
Suggested-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:38 +0000 (16:29 +0000)]
net/sfc/base: pass Rx buffer size to RxQ init if supported
Riverhead requires Rx buffer size to be specified in INIT_RXQ.
If the parameter is not supported (e.g. on EF10 family adapters),
zero must be used on INIT_RXQ.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:37 +0000 (16:29 +0000)]
net/sfc/base: allow to specify Rx buffer size on queue setup
Rx buffer size must be specified on Rx queue creation on
Riverhead.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Richard Houldsworth [Thu, 7 Feb 2019 16:29:36 +0000 (16:29 +0000)]
net/sfc/base: make bundle partition type available for X2
Supports the firmware update mechanism described in SF-121352-AN.
Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Lee [Thu, 7 Feb 2019 16:29:35 +0000 (16:29 +0000)]
net/sfc/base: add Rx parse incomplete event queue statistic
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:34 +0000 (16:29 +0000)]
net/sfc/base: rename header with MCDI strings
The header was incorrectly named on addition since it did not
match naming conventions.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 7 Feb 2019 16:29:33 +0000 (16:29 +0000)]
net/sfc/base: support the Rx event mode w/o continue
The recently added NO_CONT_EV mode is recommended for when looking for
maximum throughput on 100G links as it allows the firmware to operate
more efficiently. The biggest benefit is when using scatter and jumbo
frames, but it is also necessary to achieve line rate in other cases.
Support for NO_CONT_EV when scatter is disabled is simple - the main
datapath change is to always read the packet length from the prefix,
not the event. This requires storing a flag with the event queue so
the event handler knows NO_CONT_EV mode is in use.
Supporting NO_CONT_EV with scatter would require an API change.
(Now the ee_flags field in efx_evq_t is used on the datapath, move it
next to other fields which are also read on the datapath to try to avoid
reading an additional cache line.)
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 7 Feb 2019 16:29:32 +0000 (16:29 +0000)]
net/sfc/base: update auto-generated MCDI definition headers
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:31 +0000 (16:29 +0000)]
net/sfc/base: remove deprecated macros that get queue sizes
The macros are deprecated and are not used anymore, so they can
be deleted.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:30 +0000 (16:29 +0000)]
net/sfc/base: remove deprecated min/max desc defines
Symbols for maximum and minimum number of Tx, Rx and event descriptors
are deprecated. They are not used anymore, so they can be deleted.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:29 +0000 (16:29 +0000)]
net/sfc: use NIC event descriptor size instead of common
Use of the macro for calculating a Rx queue size is deprecated. Replace
it with a call to a function that uses descriptor size specified for
every NIC.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:28 +0000 (16:29 +0000)]
net/sfc: use NIC Rx descriptor size instead of common
Use of the macro for calculating a Rx queue size is deprecated. Replace
it with a call to a function that uses descriptor size specified for
every NIC.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:27 +0000 (16:29 +0000)]
net/sfc: use NIC Tx descriptor size instead of common
Use of the macro for calculating a Tx queue size is deprecated. Replace
it with a call to a function that uses descriptor size specified for
every NIC.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:26 +0000 (16:29 +0000)]
net/sfc/base: round number of queue buffers up
Functions efx_*q_nbufs return the number of a queue buffers by dividing
the queue size by page size. If minimum size of a queue is smaller than
one page, we still need the page and number of buffers should not be 0.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:25 +0000 (16:29 +0000)]
net/sfc/base: support different event descriptor sizes
For consistency with the size of Tx descriptors, the size of event
descriptors should be a part of NIC config, not a macro that is
common for all NIC families. Also, add a max number of EvQ buffers
define which is needed to initialize an MCDI buffer at compile time.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:24 +0000 (16:29 +0000)]
net/sfc/base: support different Rx descriptor sizes
For consistency with the size of Tx descriptors, the size of Rx
descriptors should be a part of NIC config, not a macro that is
common for all NIC families.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:23 +0000 (16:29 +0000)]
net/sfc/base: support different Tx descriptor sizes
Size of Tx descriptor is different on Riverhead. So, the size
should be a part of NIC config, not a macro that is common for
all NIC families.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:22 +0000 (16:29 +0000)]
net/sfc/base: make NIC pointer const in NIC config get
The change is needed for the functions that accept const efx_nic_t
pointer and have to get efx_nic_cfg_t.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Igor Romanov [Thu, 7 Feb 2019 16:29:21 +0000 (16:29 +0000)]
net/sfc/base: make max number of TxQ bufs EF10-specific
The define EFX_TXQ_MAX_BUFS is used only by EF10 family implementation.
Since the macro is not used by any drivers, it does not require
exposed libefx interface.
Make the define EF10-specific.
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>