mbuf next and nb_segs fields already have the default values when get
from mempool, no need to update them in PMD.
See: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
See: 8f094a9ac5 ("mbuf: set mbuf fields while in pool")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The thunderx PMD is sensitive to the layout of the mbuf on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The vector PMD is very sensitive to the layout of the mbuf, especially on
the RX path. Add in some compile-time checks to make sure the mbuf layout
assumptions are valid, and to provide hints to anyone changing the mbuf
where things may need to be updated.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Currently, 'rte_eth_dev_get_port_by_name' changes transmitted
'port_id' unconditionally. This is undocumented and misleading
behaviour as user may expect unchanged value in case of error.
Otherwise, there is no sense having both return value and
a pointer in the function.
Fixes: 9c5b8d8b9f ("ethdev: clean port id retrieval when attaching")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
This commit adds TCP flags support in flow API as
some drivers have SYN filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Application fails to create NVGRE and E-Tag flows with
current configuration, this commit fixes the issue by
adding flow items for E_TAG and NVGRE.
Fixes: e4840ef268 ("ethdev: fix incomplete items in flow API")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Different drivers use internal macros like force_inline for compiler
always inline feature.
Standardizing it through __rte_always_inline macro.
Verified the change by comparing the output binary file.
No difference found in the output binary file with this change.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Checking against VFIO_MAX_GROUPS goes beyond the maximum array
index which should be (VFIO_MAX_GROUPS - 1).
Coverity issue: 144555, 144556, 144557
Fixes: 94c0776b1b ("support hotplug")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
vfio is the kernel framework used by the vfio-pci kernel driver.
DPDK drivers do not rely solely on vfio, but rather on vfio-pci to gain
access to pci resources.
Fixes: 0880c40113 ("drivers: advertise kmod dependencies in pmdinfo")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
If the socket_id is invalid (e.g. -2, -3), the
memzone_reserve_aligned_thread_unsafe should return the
EINVAL and not ENOMEM. To avoid it, we should check the
socket_id before calling malloc_heap_alloc.
Signed-off-by: Tonghao Zhang <nic@opencloud.tech>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixes memory access errors detected by Coverity.
All cases are the maximum permissable value causing an
out-by-one overrun.
Coverity issue: 143433, 143434, 143460, 143464
Fixes: 349950ddb9 ("metrics: add information metrics library")
Signed-off-by: Remy Horton <remy.horton@intel.com>
When rte_lpm.h is used on x86, -O0 option (no optimization at all)
given to gcc causes a compile error like this:
error: the last argument must be an 8-bit immediate
i24 = _mm_srli_si128(i24, sizeof(uint64_t));
-O0 option is useful for debugging and code coverage measurement, but
this error prevents DPDK programs from building. This patch replaces
"sizeof(uint64_t)" with a constant literal "8" to work around the issue.
The issue occurs on gcc/g++ versions from 4.8 to 5.
Signed-off-by: Sangjin Han <sangjin@eecs.berkeley.edu>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixing the below error by returning from the function early
when count == 0.
Issue flagged by GCC 7.1.1
examples/vhost/virtio_net.c:370:38: error: ‘desc_indexes[0]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
rte_prefetch0(&vr->desc[desc_indexes[0]]);
Fixes: ca059fa5e2 ("examples/vhost: demonstrate the new generic APIs")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This one is more of a compiler issue as application
checks the app_parse_opt_vals() return value.
Since this code is in slow path, adding a memset
to fix following "maybe-uninitialized" warning.
qos_sched/args.c: In function ‘app_parse_args’:
examples/qos_sched/args.c:254:32: error: ‘vals[0]’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
pconf->rx_port = (uint8_t)vals[0];
~~~~^~~
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
The DPDK documentation guidelines state that lines should be wrapped as
follows:
* The recommended style for the DPDK documentation is to put sentences on
separate lines. This allows for easier reviewing of patches. ...
* Long sentences should be wrapped at 120 characters +/- 10 characters.
They should be wrapped at words.
http://dpdk.org/doc/guides/contributing/documentation.html#line-length
However, in practice, users almost never submit doc patches in this format.
Instead most users wrap their doc patches at 80 characters.
This patch updates the documentation contributors guide to reflect this
as the recommended guideline.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Add template release notes for DPDK 17.08 with inline
comments and explanations of the various sections.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
The current crypto operation and symmetric crypto operation
structures will be reworked for correctness and improvement,
reducing also their sizes, to fit into less cache lines,
as stated in the following RFC:
http://dpdk.org/dev/patchwork/patch/24011/
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
API changes are planned for 17.08 to made sessions agnostic to the
underlaying devices, removing coupling with crypto PMDs, so a single
session can be used on multiple devices.
It requires to change "struct rte_cryptodev_sym_session" to store more
than one private data for devices, as well as remove redundant dev_id
and dev_type.
Effected public functions:
- rte_cryptodev_sym_session_pool_create
- rte_cryptodev_sym_session_create
- rte_cryptodev_sym_session_free
While session will not be directly associated with device, followed API
will be changed adding uint8_t dev_id to the argument list:
- rte_cryptodev_queue_pair_attach_sym_session
- rte_cryptodev_queue_pair_detach_sym_session
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Refer to RFC patch - cryptodev: remove crypto device type enumeration
It is planned to remove device type enumeration rte_cryptodev_type from
library to remove the coupling between crypto PMD and the librte_cryptodev.
In this case following stuctures will be changed: rte_cryptodev_session,
rte_cryptodev_sym_session, rte_cryptodev_info, rte_cryptodev.
It is planned to change the function rte_cryptodev_count_devtype().
The function prototype doesn’t clearly show the operation.
>From next release 17.08 the dev_type will be changed to driver_id.
So the function name will change to rte_cryptodev_device_count_by_driver().
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
The following PMD names definitions will be moved to the individual PMDs
to remove the coupling between crypto PMDs and the librte_cryptodev:
CRYPTODEV_NAME_NULL_PMD
CRYPTODEV_NAME_AESNI_MB_PMD
CRYPTODEV_NAME_AESNI_GCM_PMD
CRYPTODEV_NAME_OPENSSL_PMD
CRYPTODEV_NAME_QAT_SYM_PMD
CRYPTODEV_NAME_SNOW3G_PMD
CRYPTODEV_NAME_KASUMI_PMD
CRYPTODEV_NAME_ZUC_PMD
CRYPTODEV_NAME_ARMV8_PMD
CRYPTODEV_NAME_SCHEDULER_PMD
CRYPTODEV_NAME_DPAA2_SEC_PMD
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Some work remains for VDEV bus move.
Not sure if there will be some API or ABI changes.
The notice is kept and postponed until the end of this rework.
The PCI fields must be removed from cryptodev and the newly
introduced eventdev, in order to complete the bus rework.
The VLAN flags rework should be completed in 17.08.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Some VFIO functions have been exported without any rename,
thus no breakage.
The struct eth_driver has been removed, but rte_pci_driver
is still used in rte_cryptodev_driver.
Fixes: a016873eb3 ("vfio: export utility functions in map file")
Fixes: 9dca21fb80 ("ethdev: remove ethdev driver")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
The deprecation of the bypass functions in the ethdev has not been
done in 17.05. Let's postpone to 17.08.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The change of _rte_eth_dev_callback_process has not been done in 17.05.
Let's postpone to 17.08.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This is an ABI change notice for DPDK 17.08 in ethdev
about changes in rte_eth_txmode structure.
Currently Tx offloads are enabled by default, and can be disabled
using ETH_TXQ_FLAGS_NO* flags. This behaviour is not consistent with
the Rx side where the Rx offloads are disabled by default and enabled
according to bit field in rte_eth_rxmode structure.
The proposal is to disable the Tx offloads by default, and provide
a way for the application to enable them in rte_eth_txmode structure.
Besides of making the Tx configuration API more consistent for
applications, PMDs will be able to provide a better out of the
box performance.
Finally, as part of the work, the ETH_TXQ_FLAGS_NO* will
be superseded as well.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The PCI and virtual bus are planned to be moved to the generic
drivers/bus directory in v17.08. For this change to be possible, the EAL
must be made completely independent.
The rte_devargs structure currently holds device representation internal
to those two busses. It must be made generic before this work can be
completed.
Instead of using either a driver name for a vdev or a PCI address for a
PCI device, a devargs structure will have to be able to describe any
possible device on all busses, without introducing dependencies on
any bus-specific device representation. This will break the ABI for this
structure.
Additionally, an evolution will occur regarding the device parsing
from the command-line. A user must be able to set which bus will handle
which device, and this setting is integral to the definition of a
device.
The format has not yet been formally defined, but a proposition will
follow soon for a new command line parameter format for all devices.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Add tested Intel platforms with Intel NICs to the release note.
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Add a better explanation about how to disable MDD (Malicious Driver
Detection) in a kernel PF.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>