This fixes the cases in which operation was Digest verify.
Fixes: e25200fbb4 ("qat: add cipher/auth only")
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
KASUMI PMD only supports bit-level cipher operations
when destination buffer is different from the source
(out of place operations). This commit adds a check
in the code to prevent the user from trying to perform
in-place bit-level ciphering.
Fixes: 2773c86d06 ("crypto/kasumi: add driver for KASUMI library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Additional authenticated data (AAD) in KASUMI F9 (UIA1) is 8 bytes
and not 9 bytes, since direction bit is obtained just after the
end of the message, and it is separated from the AAD.
Fixes: 2773c86d06 ("crypto/kasumi: add driver for KASUMI library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
The range of the supported bonding modes is 0-6, instead of 0-4.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Virtio and Xenvirt are two virtual device drivers that admit
arguments, so DRIVER_REGISTER_PARAM_STRING should be used
in them.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Driver arguments shown with DRIVER_REGISTER_PARAM_STRING
have been separated in multiple lines and indented to
ease their readability.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Since now the PMD_REGISTER_DRIVER macro sets the driver names,
there is no need to have the rte_driver structure setting it
statically, as it will get overridden.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
In order to avoid API breakage, the driver names of the virtual devices
have been renamed to their original name, before the modification
of the PMD_REGISTER_DRIVER macro, which sets now the driver names.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
There were a couple of issues which prevented pmdinfo.py from running on
FreeBSD, both of which are fixed by this patch.
* The path to python is not /usr/bin/python as on Linux, so use
/usr/bin/env to find it on both OS's.
* The path to the pci ids DB is in a different location on FreeBSD,
so use the platform python library to look in different default
locations depending on the underlying OS. [There are two possible
locations to look on FreeBSD, as defined by pciconf manpage, so
check in both in order of better to worse]
Fixes: c67c9a5c64 ("tools: query binaries for HW and other support information")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
error on compilation caused by missing include for libgen.h.
buildtools/pmdinfogen/pmdinfogen.c:402:4: error:
implicit declaration of function 'basename' is invalid in C99
basename(argv[0]));
Fixes: 840e5dfea3 ("pmdinfogen: fix usage message")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
New cryptodev type for the new KASUMI PMD was added
in the cryptodev type enum, but not at the end of it,
causing an ABI breakage.
Fixes: 2773c86d06 ("crypto/kasumi: add driver for KASUMI library")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Recently reported, the introduction of pmd information exports led to a
breakage of cryptodev unit tests because the test infrastructure relies on the
cryptodev names being available in macros. This patch fixes the pmd naming to
use the macro names. Note that the macro names were already pre-stringified,
which won't work as the PMD_REGISTER_DRIVER macro requires the name in both a
processing token and stringified form. As such the names are defined now as
tokens, and converted where needed to stringified form on demand using RTE_STR.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sphynx reports this error:
doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
Pygments lexer name u'C' is not known
Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")
Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Remove include of rte_pci.h in the generic header rte_dev.h.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The name of the tool is pmdinfogen.
Fixes: 98b0fdb0ff ("pmdinfogen: add buildtools and pmdinfogen utility")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
When compiled with a standard clang, pmdinfogen can raise a warning:
buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
control reaches end of non-void function
Actually there can be more warnings with stricter compilers.
In order to catch them early and fix most of them, the DPDK standard flags
WERROR_FLAGS are used.
The warnings fixed are:
no previous prototype for ...
no return statement in function returning non-void
variable ‘secstrings’ set but not used
‘sec_name’ defined but not used
‘get_symbol_index’ defined but not used
pointer of type ‘void *’ used in arithmetic
Fixes: 98b0fdb0ff ("pmdinfogen: add buildtools and pmdinfogen utility")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
When building with "make V=1" it is expected to see the output of each
compiler command in order to debug them.
Unfortunately the pmdinfogen related commands were always quiet.
It is fixed by defining the commands in some Makefile variables.
They are printed if the verbose mode is enabled.
The other benefit of this rework is to stop compilation after a
failure with pmdinfogen.
The command readlink is removed in this rework because it seems useless.
Fixes: 3d781ca328 ("mk: do post processing on objects that register a driver")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The tool pmdinfogen was called from RTE_OUTPUT/app/ which does not exist
if building a driver outside of the SDK build.
When building DPDK, RTE_SDK_BIN is RTE_OUTPUT. When building an external
driver, RTE_SDK_BIN must point to the installed DPDK directory containing
includes, libs, etc.
That's why pmdinfogen must be installed in the SDK directory and be part
of the SDK installation.
Fixes: 3d781ca328 ("mk: do post processing on objects that register a driver")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
The recipe rte.hostapp.mk does not build in hostapp/ anymore.
Fixes: 98b0fdb0ff ("pmdinfogen: add buildtools and pmdinfogen utility")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
When compiling the drivers, some code is generated with pmdinfogen.
A fresh parallel build can fail if a driver is compiled before pmdinfogen:
build/buildtools/dpdk-pmdinfogen: Permission denied
There was a dependency declared in drivers/Makefile but it cannot work
because this file is based on mk/rte.subdir.mk which do not handle
dependencies.
It is fixed by declaring the whole buildtools as (order only) prerequisite
of drivers.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Compilation fails because of some typos.
Fixes: cb6696d220 ("drivers: update registration macro usage")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Information on pmdinfogen may be useful to 3rd party driver developers.
Include documentation on what it does
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary,
and, if found parses the remainder of the string as a json encoded string,
outputting the results in either a human readable or raw, script parseable
format
Note that, in the case of dynamically linked applications, pmdinfo.py will
scan for implicitly linked PMDs by searching the specified binaries
.dynamic section for DT_NEEDED entries that contain the substring
librte_pmd. The DT_RUNPATH, LD_LIBRARY_PATH, /usr/lib and /lib are
searched for these libraries, in that order
If a file is specified with no path, it is assumed to be a PMD DSO, and the
LD_LIBRARY_PATH, /usr/lib[64]/ and /lib[64] is searched for it
Currently the tool can output data in 3 formats:
a) raw, suitable for scripting, where the raw JSON strings are dumped out
b) table format (default) where hex pci ids are dumped in a table format
c) pretty, where a user supplied pci.ids file is used to print out vendor
and device strings
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Modify the compilation makefile to identify C files that export PMD
information, and use that to trigger execution of the pmdinfo binary. If
the execution of pmdinfo is successful, compile the output C file to an
object, and use the linker to do relocatable linking on the resultant
object file into the parent object that it came from. This effectively
just adds the json string into the string table of the object that defines
the PMD to the outside world.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Export a symbol containing the string:
DPDK_PLUGIN_PATH="$(CONFIG_RTE_EAL_PMD_PATH)"
Where the latter half of the string is set at build time to a location from
which autoloaded DSO's will be found. This string is used by pmdinfo in
'plugin' mode, whereby a user can specify a dpdk installation directory (or
static binary), and scan the associated path (if found) for pmd DSO's and
report on their hardware support.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Modify the PMD_REGISTER_DRIVER macro, adding a name argument to it. The
addition of a name argument creates a token that can be used for subsequent
macros in the creation of unique symbol names to export additional bits of
information for use by the pmdinfogen tool. For example:
PMD_REGISTER_DRIVER(ena_driver, ena);
registers the ena_driver struct as it always did, and creates a symbol
const char this_pmd_name0[] __attribute__((used)) = "ena";
which pmdinfogen can search for and extract. The subsequent macro
DRIVER_REGISTER_PCI_TABLE(ena, ena_pci_id_map);
creates a symbol const char ena_pci_tbl_export[] __attribute__((used)) =
"ena_pci_id_map";
Which allows pmdinfogen to find the pci table of this driver
Using this pattern, we can export arbitrary bits of information.
pmdinfo uses this information to extract hardware support from an object
file and create a json string to make hardware support info discoverable
later.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
pmdinfogen is a tool used to parse object files and build json strings for
use in later determining hardware support in a dso or application binary.
pmdinfo looks for the non-exported symbol names this_pmd_name<n> and
this_pmd_tbl<n> (where n is a integer counter). It records the name of
each of these tuples, using the later to find the symbolic name of the
pci_table for physical devices that the object supports. With this
information, it outputs a C file with a single line of the form:
static char *<pmd_name>_driver_info[] __attribute__((used)) = " \
PMD_DRIVER_INFO=<json string>";
Where <pmd_name> is the arbitrary name of the pmd, and <json_string> is the
json encoded string that hold relevant pmd information, including the pmd
name, type and optional array of pci device/vendor ids that the driver
supports.
This c file is suitable for compiling to object code, then relocatably
linking into the parent file from which the C was generated. This creates
an entry in the string table of the object that can inform a later tool
about hardware support.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Implicit int to enum conversion is not allowed when icc is used as
the compiler. It raises the compiling error like,
drivers/net/virtio/virtio_user/vhost_user.c(257):
error #188: enumerated type mixed with another type
msg.request = req;
^
The fix is simple, change the type of parameter req to enum
vhost_user_request.
Fixes: 6a84c37e39 ("net/virtio-user: add vhost-user adapter layer")
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
According to 'rte_eth_stats' structure comments, 'imissed'
should represent RX error counting, but currently 'imissed' is
used to count TX error.
The patch replaces 'imissed' by 'oerrors'.
Fixes: ee584e9710 ("vhost: add driver on top of the library")
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Commit 550c9d27d1 ("vhost: set/reset device flags internally") moves
the VIRTIO_DEV_RUNNING set/reset to vhost lib. But I missed one reset
on stop; here fixes it.
Fixes: 550c9d27d1 ("vhost: set/reset device flags internally")
Reported-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
Mainly on updating vhost-user part: we now support client mode.
Also refine some words, and add a bit more explanation.
And made an emphatic statement that you are suggested to use vhost-user
instead of vhost-cuse, because we have enhanced vhost-user a lot since
v2.2 (Actually, I doubt there are any people still using vhost-cuse)
[John McNamara: rewords, better formats]
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
struct rte_mempool changed its "ring" field to "pool_data"
"ring" field is accessed by ivshmem library, and updated to "pool_data"
This patch fixes the compile error:
lib/librte_ivshmem/rte_ivshmem.c:
In function 'add_mempool_to_metadata':
lib/librte_ivshmem/rte_ivshmem.c:584:32:
error: 'const struct rte_mempool' has no member named 'ring'
return add_ring_to_metadata(mp->ring, config);
^~
Fixes: 449c49b93a ("mempool: support handler operations")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Since below commit, ACL library is outside the scope of --whole-archive
and ACL autotest fails.
RTE>>acl_autotest
ACL: allocation of 25166728 bytes on socket 9 for ACL_acl_ctx failed
ACL: rte_acl_add_rules(acl_ctx): rule #1 is invalid
Line 1584: SSE classify with zero categories failed!
Test Failed
This is the result of the linker picking weak over non-weak functions.
Fixes: 95dc3c3cf3 ("mk: reduce scope of whole-archive static linking")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Since [1] duplicates in LDLIBS are removed. The side effect is that it
does not distinguish between libraries or linker flags.
This patch allows multiple linker flags in LDLIBS, such as
--whole-archive.
[1] Commit: edf4d331dc ("mk: eliminate duplicates from libraries list")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
For all drivers that currently implement xstats, the id field in the
rte_eth_stats_name structure equals the entry's array index. This
patch eliminates the redundant id field as a direct index lookup is
faster than a search for the matching id field.
Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Remy Horton <remy.horton@intel.com>
The old structure rte_eth_xstats contained names and values.
The new structure rte_eth_xstat contains ids and values.
Fixes: bd6aa172cf ("ethdev: fetch extended statistics with integer ids")
Fixes: e2aae1c1ce ("ethdev: remove name from extended statistic fetch")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
If there is a change in the config directory the build test
will refresh the tested build config to take into account new options.
The git working directory and the last git commit are checked for a
change in config/.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
The commit id of a fixed commit must be in the current branch.
It avoids referencing a local branch or a next-* branch when
pushing in the master.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
After introducing the stack handler in the previous commit,
we now have very similar code to the custom handler in test_mempool.c,
which creates a custom mempool based on simple mallocs.
The stack handler is a cleaner example of adding a new mempool handler,
so this commit replaces the custom handler test with a stack
handler test, and removes the custom handler code.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This is a mempool handler that is useful for pipelining apps, where
the mempool cache doesn't really work - example, where we have one
core doing rx (and alloc), and another core doing Tx (and return).
In such a case, the mempool ring simply cycles through all the mbufs,
resulting in a LLC miss on every mbuf allocated when the number of
mbufs is large. A stack (LIFO) recycles buffers more effectively in
this case.
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
The mempool_count and mempool_free_count behaved contrary to what their
names suggested. The free_count function actually returned the number of
elements that were allocated from the pool, not the number unallocated as
the name implied.
Fix this by introducing two new functions to replace the old ones,
* rte_mempool_avail_count to replace rte_mempool_count
* rte_mempool_in_use_count to replace rte_mempool_free_count
In this patch, the new functions are added, and the old ones are marked
as deprecated. All apps and examples that use the old functions are
updated to use the new functions.
Fixes: af75078fec ("first public release")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Number of forwarding cores must be equal or less than
number of forwarding streams, otherwise two cores
would try to use a same queue on a port, which is not allowed.
Fixes: f2bb7ae1d2 ("app/testpmd: handle all Rx queues in RSS setup")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Replace C memcpy code semantics with optimized rte_memcpy.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: David Hunt <david.hunt@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>