RTE_LIBRTE_I40E_ITR_INTERVAL is not used. So it should also be removed
in config/rte_config.h for meson+ninja build.
Fixes: 864a800d70 ("net/i40e: remove VF interrupt handler")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
By default, testpmd will create membuf pool for all NUMA nodes and
ignore EAL configuration.
Count the number of available NUMA according to EAL core mask or core
list configuration. Optimized by only creating membuf pool for those
nodes.
Fixes: c9cafcc82d ("app/testpmd: fix mempool creation by socket id")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Enable using memfd-created segments if supported by the system.
This will allow having real fd's for pages but without hugetlbfs
mounts, which will enable in-memory mode to be used with virtio.
The implementation is mostly piggy-backing on existing real-fd
code, except that we no longer need to unlink any files or track
per-page locks in single-file segments mode, because in-memory
mode does not support secondary processes anyway.
We move some checks from EAL command-line parsing code to memalloc
because it is now possible to use single-file segments mode with
in-memory mode, but only if memfd is supported.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
In a few cases, user may need to query offset into fd for a
particular memory segment (for example, to selectively map
pages). This commit adds a new API to do that.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Now that we can retrieve page fd's internally, we can expose it
as an external API. This will add two flavors of API - thread-safe
and non-thread-safe. Fix up internal API's to return values we need
without modifying rte_errno internally if called from within EAL.
We do not want calling code to accidentally close an internal fd, so
we make a duplicate of it before we return it to the user. Caller is
therefore responsible for closing this fd.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Enable setting and retrieving segment fd's internally.
For now, retrieving fd's will not be used anywhere until we
get an external API, but it will be useful for things like
virtio, where we wish to share segment fd's.
Setting segment fd's will not be available as a public API
at this time, but internally it is needed for legacy mode,
because we're not allocating our hugepages in memalloc in
legacy mode case, and we still need to store the fd.
Another user of get segment fd API is memseg info dump, to
show which pages use which fd's.
Not supported on FreeBSD.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Previously, we were only tracking lock file fd's in single-file
segments mode, but did not track fd's in non-single file mode
because we didn't need to (mmap() call still kept the lock). Now
that we are going to expose these fd's to the world, we need to
have access to them, so track them even in non-single file
segments mode.
We don't need to close fd's after mmap() because we're still
tracking them in an fd list. Also, for anonymous hugepages mode,
fd will always be -1 so exit early on error.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Previously, we were only using lock lists to store per-page lock fd's
because we cannot use modern fcntl() file description locks to lock
parts of the page in single file segments mode.
Now, we will be using this list to store either lock fd's (along with
memseg list fd) in single file segments mode, or per-page fd's (and set
memseg list fd to -1), so rename the list accordingly.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Previously, when we allocated hugepages, we closed the fd's corresponding
to them after we've done our mappings. Since we did mmap(), we didn't
actually lose the reference, but file descriptors used for mmap() do not
count against the fd limit. Since we are going to store all of our fd's,
we will hit the fd limit much more often when using smaller page sizes.
Fix this to raise the fd limit to maximum unconditionally.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
In-memory mode was never meant to support legacy mode, because we
cannot sort anonymous pages anyway.
Fixes: 72b49ff623 ("mem: support --in-memory mode")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.
Fixes: 3ee2cde248 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The strncpy function has long been deemed unsafe for use,
in favor of strlcpy or snprintf.
While snprintf is standard and strlcpy is still largely available,
they both have issues regarding error checking and performance.
Both will force reading the source buffer past the requested size
if the input is not a proper c-string, and will return the expected
number of bytes copied, meaning that error checking needs to verify
that the number of bytes copied is not superior to the destination
size.
This contributes to awkward code flow, unclear error checking and
potential issues with malformed input.
The function strscpy has been discussed for some time already and
has been made available in the linux kernel[1].
Propose this new function as a safe alternative.
[1]: http://git.kernel.org/linus/30c44659f4a3
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
__rte_mbuf_raw_free and __rte_pktmbuf_prefree_seg have been deprecated for
a long time now (early 17.05), are not part of the abi and are easily
replaced with existing api.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Note that the library built by meson will not have the _uio suffix:
librte_pmd_vmxnet3.so - as it follows the directory name, while the
legacy makefile rename it to librte_pmd_vmxnet3_uio.so.
Signed-off-by: Luca Boccassi <bluca@debian.org>
make showversion will print 18.11.0-rc0 but Meson sets 18.11-rc0,
causing among other things a difference in the generated documentation.
Fixes: 76b9d9de5c ("version: 18.11-rc0")
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This will allow the same config file to be used from Meson.
The result has been verified to be identical via diffoscope.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This will make it possible to generate the file in the same way from
Meson as well.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Versions of meson prior to 0.47 flattened the parameters to the
"set_variable" function, which meant that the function could not take
array variables as a parameter. Therefore, we need to disable driver
tracking for those older versions, in order to maintain compatibility
with the minimum supported 0.41 version, and also v0.45 shipped in
Ubuntu 18.04 release.
Fixes: 806c45dd48 ("build: add configuration summary at end of config")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
For usability, the default build type in meson is static, so that
binaries can be run from the build directory easily. However, static
builds take more space, so for build-testing purposes default to using
shared builds where possible.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
pdump library now uses generic multi process channel
and it is no more dependent on the pthreads, so remove
the dependency from the Makefile.
Fixes: 660098d61f ("pdump: use generic multi-process channel")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
After running meson to configure a DPDK build, it can be useful to know
what was automatically enabled or disabled. Therefore, print out by way of
summary a categorised list of libraries and drivers to be built.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
EAL is a standard dependency of all libraries, except for those built
before it. We can therefore simplify the logic by just checking if EAL
has been processed, and make it a standard dependency if so.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This has been only build-tested for now, on a native ppc64el POWER8E
machine running Debian sid.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Install in $kerneldir/../extra/dpdk. Usually $kerneldir should something
like: /lib/modules/$kver/build, so this directory will match the default
one used by legacy makefiles.
Fixes: a52f4574f7 ("igb_uio: build with meson")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.
Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.
Fixes: 56bb54ea1b ("raw/ifpga/base: add Intel FPGA OPAE share code")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
They are built by the legacy makefiles but not by Meson.
Fixes: 8f40ee0734 ("eal/x86: get hypervisor name")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
For meson builds, the define to enable the symbol version
macros in rte_compat.h was missing. This led to symbols being
omitted from shared objects. For example, checking rte_distributor.so
with objdump and comparing make and meson built versions:
$ objdump -T make-build/lib/librte_distributor.so | grep _flush
0000000000001b60 g DF .text 00000000000000a7 (DPDK_2.0) rte_distributor_flush
0000000000003f10 g DF .text 0000000000000434 DPDK_17.05 rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
0000000000001d50 g DF .text 00000000000000fb DPDK_2.0 rte_distributor_flush
Adding in the missing define fixes this.
Fixes: 5b9656b157 ("lib: build with meson")
Cc: stable@dpdk.org
Reported-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Omitting inputs and outputs mbuf creation for BaseBand Null Device
as inputs and outputs data do not exist for Null Device
Fixes: b2a4654f08 ("mempool: check for zero size creation")
Cc: stable@dpdk.org
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers
and with crypto_qat.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Added description of the build configuration options for QAT.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Update PMD build section.
Linked to kernel dependency section and refactored text
between those 2 sections.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Add overview of QAT doc sections and link between them.
Indent to next level all sections within
the crypto and common sections.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Add section to common QAT part of doc about
which tests can be used to exercise
QAT compress and crypto PMDS
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Comments says "no csum error report support" but there is no check
related csum offloads. Removing the comment.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>