Hemant Agrawal [Fri, 26 May 2017 06:51:11 +0000 (12:21 +0530)]
net/dpaa2: support parallel Rx
Typically when the PMD issues a Rx command to DPAA2 hardware,
the HW writes the available descriptors into the given memory.
The RX function then processes the frames and prepare them as
mbufs.
This patch adds support to issue another pull request to hardware
in another memory location, before we start processing the output
of the first request. This help in controlling the CPU cycles
wasted during the wait for the hardware to write the descriptors.
Hemant Agrawal [Fri, 26 May 2017 06:51:10 +0000 (12:21 +0530)]
bus/fslmc: support for parallel Rx DQ requests
DPAA2 hardware support the option to configure
multiple memories for Rx recv buffer (DPAA2-DQRR).
Each Rx request executing is called as 'DQ' request.
This patch adds routines to get information w.r.t each DQ request.
Hemant Agrawal [Fri, 26 May 2017 06:51:08 +0000 (12:21 +0530)]
net/dpaa2: stop using software annotation
The DPAA2 driver is not using the DPAA2 frame descriptor
software annotation area. This patch reduces the
PTA length to zero and adjust the RX Buffer Layout
accordingly.
Markus Theil [Mon, 22 May 2017 10:17:50 +0000 (12:17 +0200)]
net/igb: fix add/delete of flex filters
Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved
into the add and delete parts of the if/else statement.
Fixes: 231d43909a31 ("igb: migrate flex filter to new API") Cc: stable@dpdk.org Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
John Daley [Wed, 17 May 2017 22:38:10 +0000 (15:38 -0700)]
net/enic: flow API debug
Added a debug function to print enic filters and actions when
rte_validate_flow is called. Compiled in CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW
is enabled and log level is INFO.
Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Nelson Escobar <neescoba@cisco.com>
John Daley [Wed, 17 May 2017 22:38:09 +0000 (15:38 -0700)]
net/enic: flow API for Legacy NICs
5-tuple exact Flow support for 1200 series adapters. This allows:
Attributes: ingress
Items: ipv4, ipv6, udp, tcp (must exactly match src/dst IP
addresses and ports and all must be specified).
Actions: queue and void
Selectors: 'is'
Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Nelson Escobar <neescoba@cisco.com>
John Daley [Wed, 17 May 2017 22:38:08 +0000 (15:38 -0700)]
net/enic: flow API for NICs with advanced filters disabled
Flow support for 1300 series adapters with the 'Advanced Filter'
mode disabled via the UCS management interface. This allows:
Attributes: ingress
Items: Outer eth, ipv4, ipv6, udp, sctp, tcp, vxlan. Inner eth, ipv4,
ipv6, udp, tcp.
Actions: queue and void
Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
With advanced filters disabled, an IPv4 or IPv6 item must be specified
in the pattern.
Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Nelson Escobar <neescoba@cisco.com>
John Daley [Wed, 17 May 2017 22:38:06 +0000 (15:38 -0700)]
net/enic: flow API for NICs with advanced filters enabled
Flow support for 1300 series adapters with the 'Advanced Filter'
mode enabled via the UCS management interface. This enables:
Attributes: ingress
Items: Outer eth, ipv4, ipv6, udp, sctp, tcp, vxlan. Inner eth, ipv4,
ipv6, udp, tcp.
Actions: queue, and void
Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Nelson Escobar <neescoba@cisco.com>
John Daley [Wed, 17 May 2017 22:38:04 +0000 (15:38 -0700)]
net/enic/base: bring NIC interface functions up to date
Update the base functions for the Cisco VIC. These files are mostly
common with other VIC drivers so are left alone is as much as possible.
Includes in a new filter/action interface which is needed for Generic
Flow API PMD support. Update FDIR code to use the new interface.
Signed-off-by: John Daley <johndale@cisco.com> Reviewed-by: Nelson Escobar <neescoba@cisco.com>
John Miller [Tue, 16 May 2017 16:14:15 +0000 (12:14 -0400)]
net/ark: fix buffer not null terminated
Coverity issue: 144512
Coverity issue: 144513 Fixes: 9c7188a68d7b ("net/ark: provide API for hardware modules pktchkr and pktgen") Cc: stable@dpdk.org Signed-off-by: John Miller <john.miller@atomicrules.com>
Pascal Mazon [Fri, 12 May 2017 13:01:39 +0000 (15:01 +0200)]
net/tap: create netdevice during probing
This has three main benefits:
- tun_alloc is now generic again for any queue,
- mtu no longer needs to be handled in tap_setup_queue(),
- an actual netdevice is created as soon as the device is probed.
On top of it, code in eth_dev_tap_create() has been reworked to have a
more logical behavior; initialization can now fail if a remote is
requested but cannot be set up.
Support for a fixed MAC address for testing with the last octet
incrementing by one for each interface defined with the new 'mac=fixed'
string on the --vdev option. The default option is still to randomize
the MAC address for each tap interface.
Signed-off-by: Keith Wiles <keith.wiles@intel.com> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com> Acked-by: Keith Wiles <keith.wiles@intel.com>
Jerin Jacob [Mon, 1 May 2017 06:40:18 +0000 (12:10 +0530)]
net/thunderx: add compile-time checks
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>
Bruce Richardson [Fri, 28 Apr 2017 16:21:15 +0000 (17:21 +0100)]
net/fm10k: add compile-time checks to vector driver
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>
Bruce Richardson [Fri, 28 Apr 2017 16:21:14 +0000 (17:21 +0100)]
net/i40e: add compile-time checks to vector driver
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>
Bruce Richardson [Fri, 28 Apr 2017 16:21:12 +0000 (17:21 +0100)]
net/ixgbe: add compile-time checks to vector driver
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>
Ilya Maximets [Thu, 18 May 2017 12:19:40 +0000 (15:19 +0300)]
ethdev: keep port id unchanged if obtaining by name failed
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: 9c5b8d8b9feb ("ethdev: clean port id retrieval when attaching") Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
David Marchand [Sat, 20 May 2017 13:12:37 +0000 (15:12 +0200)]
drivers/net: fix vfio kmod dependency
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: 0880c40113ef ("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>
Tonghao Zhang [Fri, 12 May 2017 06:03:43 +0000 (23:03 -0700)]
memzone: check NUMA id when reserving a zone
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>
Sangjin Han [Fri, 2 Jun 2017 05:07:46 +0000 (05:07 +0000)]
lpm: fix build with gcc -O0 option
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: ca059fa5e290 ("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>
Jerin Jacob [Fri, 2 Jun 2017 11:20:30 +0000 (16:50 +0530)]
examples/qos_sched: suppress gcc 7.1.1 warning
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>
John McNamara [Thu, 11 May 2017 14:09:40 +0000 (15:09 +0100)]
doc: change line length limit in contributors guide
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.
Pablo de Lara [Fri, 28 Apr 2017 18:06:44 +0000 (19:06 +0100)]
doc: announce crypto structures rework
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>
Tomasz Kulasek [Thu, 4 May 2017 15:37:23 +0000 (17:37 +0200)]
doc: announce API changes for crypto sessions
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.
doc: announce crypto device type enumeration removal
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>
Shahaf Shuler [Mon, 1 May 2017 06:58:12 +0000 (09:58 +0300)]
doc: announce ABI change for Tx offload
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>
Gaetan Rivet [Wed, 10 May 2017 15:46:10 +0000 (17:46 +0200)]
doc: announce ABI change for device parameters
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>
Coverity reported that an argument for sizeof was used improperly.
We should allocate memory for value size that pointer points to,
instead of pointer size itself.
Coverity issue: 144523, 144521 Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name") Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>