Tiwei Bie [Fri, 8 Jun 2018 03:22:24 +0000 (11:22 +0800)]
net/ifc: enable the host notifier support
The necessary vDPA ops have already been implemented
in ifcvf driver. So just need to announce the necessary
protocol features to enable the host notifier support.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tiwei Bie [Fri, 8 Jun 2018 03:22:23 +0000 (11:22 +0800)]
vhost: support host notifier
When a vDPA device is attached, vhost user will try to
register host notifiers to QEMU to allow notifications
to be delivered between the driver in the guest and the
vDPA device in the host directly.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tonghao Zhang [Fri, 8 Jun 2018 09:18:04 +0000 (02:18 -0700)]
vhost: refine new device function
Make sure find avalid device id before allocating
virtio_net, if not, return directly. It may avoid
allocating and freeing virtio_net when there is
not valid device id.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Chas Williams [Thu, 17 May 2018 23:22:52 +0000 (19:22 -0400)]
net/bonding: always update bonding link status
When the first ETH_LINK_UP slave is added to a bonding device, it is
immediately activated. If these are polling slaves, there will be a
later link state event, when last_link_status doesn't match link_status.
But because this slave is already activated, the bonding device's link
status isn't updated.
To fix this, we always attempt to update the bonding device's link status
in the link state change callback.
Adrien Mazarguil [Wed, 13 Jun 2018 16:27:43 +0000 (18:27 +0200)]
app/testpmd: fix crash when attaching a device
Below commit checks global device information to determine if a port uses
the softnic driver once initialized. Problem is that this information is
not available at this point when a port is initialized interactively
through a "port attach XXX" command, crashing testpmd.
This patch systematically initializes global device information to address
this issue.
Since the kni library is an optional library, we need to add a check
here to ensure that the kni wrapper PMD is only built when the main kni
lib is being built.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Wed, 13 Jun 2018 11:32:45 +0000 (19:32 +0800)]
net/ifc: make driver name consistent
Make the compiler switch name and document name consistent as ``ifc`` to
avoid confusion. Also rename the map file to standard name for meson
build in the process.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Ferruh Yigit [Thu, 31 May 2018 13:22:45 +0000 (14:22 +0100)]
ethdev: force RSS offload rules again
PMDs should provide supported RSS hash functions via
dev_info.flow_type_rss_offloads variable.
There is a check in ethdev if requested RSS hash function is supported
by PMD or not.
This check has been relaxed in previous release to not return an error
when a non supported has function requested [1], this has been done to
not break the applications.
Adding the error return back.
PMDs need to provide correct list of supported hash functions and
applications need to take care this information before configuring
the RSS otherwise they will get an error from APIs:
rte_eth_dev_rss_hash_update()
rte_eth_dev_configure()
Ferruh Yigit [Thu, 31 May 2018 12:44:30 +0000 (13:44 +0100)]
ethdev: force offloading API rules
The error path was disabled in previous release to let apps to be more
flexible.
But this release they are enabled, applications have to obey offload API
rules otherwise they will get errors from following APIs:
rte_eth_dev_configure
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Alejandro Lucero [Mon, 11 Jun 2018 09:50:37 +0000 (10:50 +0100)]
net/nfp: fix field initialization in Tx descriptor
TX descriptor eop_offset field is not initialized and it could
contain garbage. This patch fixes the potential problem setting
EOP as the only subfield. The other subfield, data offset, is
not used by now.
Shagun Agrawal [Fri, 8 Jun 2018 17:58:14 +0000 (23:28 +0530)]
net/cxgbe: implement flow create operation
Define filter work request API used to construct filter operations
to be communicated with firmware. These requests are sent via
control queue and completions come asynchronously in firmware event
queue.
Implement flow create operation to create filters in LE-TCAM
(maskfull) region at specified index.
Shagun Agrawal [Fri, 8 Jun 2018 17:58:12 +0000 (23:28 +0530)]
net/cxgbe: parse and validate flows
Introduce rte_flow skeleton and implement validate operation.
Parse and convert <item>, <action>, <attributes> into hardware
specification. Perform validation, including basic sanity tests
and underlying device's supported filter capability checks.
Currently add support for:
<item>: IPv4, IPv6, TCP, and UDP.
<action>: Drop, Queue, and Count.
Also add sanity checks to ensure filters are created at specified
index in LE-TCAM region. The index in LE-TCAM region indicates
the filter rule's priority with index 0 having the highest priority.
If no index is specified, filters are created at closest available
free index.
Shagun Agrawal [Fri, 8 Jun 2018 17:58:11 +0000 (23:28 +0530)]
net/cxgbe: query firmware for filter resources
Fetch available filter resources from firmware and allocate table for
book-keeping and managing filters in hardware. Also define the hardware
filter specification (ch_filter_specification) used to describe each
filter rule.
Michal Krawczyk [Thu, 7 Jun 2018 09:43:21 +0000 (11:43 +0200)]
net/ena: store handle after memory allocation
The pointer received from rte_memzone_reserve from macro
ENA_MEM_ALLOC_COHERENT_NODE was not stored anywhere, and as a result
memory allocated by this macro could not been released.
Rafal Kozik [Thu, 7 Jun 2018 09:43:20 +0000 (11:43 +0200)]
net/ena: fix GENMASK_ULL macro
When use GENMASK_ULL(63,0) left shift by 64 bits is performed.
Shifting by number greater or equal then word length
is undefined operation and failed on some platforms.
Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK") Cc: stable@dpdk.org Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:16 +0000 (11:43 +0200)]
net/ena: adjust error checking and cleaning
Adjust error checking and cleaning to Linux driver:
* add checking if MTU is to small,
* fix error messages (mismatched Rx and Tx),
* return error received from base driver or proper error
code instead of -1,
* in case of error release occupied resources,
* in case of Rx error trigger NIC reset.
Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:10 +0000 (11:43 +0200)]
net/ena: linearize Tx mbuf
Function ena_check_and_linearize_mbuf check Tx mbuf for number of
segments and linearize (defragment) it if necessary. It is called
before sending each packet.
Information about maximum number of segments is stored per each ring.
Maximum number of segments supported by NIC is taken from ENA COM in
ena_calc_queue_size function and stored in adapter structure.
Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Rafal Kozik [Thu, 7 Jun 2018 09:43:08 +0000 (11:43 +0200)]
net/ena: make watchdog configurable
Add variable wd_state to make driver functional without keep alive
AENQ handler.
The watchdog will be executed only if the aenq group has keep alive
enabled.
Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:06 +0000 (11:43 +0200)]
net/ena: add watchdog and keep alive AENQ handler
Keep alive is executing AENQ interrupt periodically. It allows to check
health of the device and trigger reset event if the device will stop
responding.
To check for the state of the device, the DPDK application must call
rte_timer_manage().
Michal Krawczyk [Thu, 7 Jun 2018 09:43:04 +0000 (11:43 +0200)]
net/ena: add reset routine
Reset routine can be used by the DPDK application to reset the device in
case of receiving RTE_ETH_EVENT_INTR_RESET from the PMD.
The reset event is not triggered by the driver, yet. It will be added in
next commits to enable error recovery in case of misfunctioning of the
device.
Rafal Kozik [Thu, 7 Jun 2018 09:43:02 +0000 (11:43 +0200)]
net/ena: handle ENA notification
When ENA notifications are provided ena_notification handler is called.
It checks if received value is not corrupted and if necessary it
reports proper warnings.
Data received from NIC is parsed in ena_update_hints. Fields for
storing those information was added to ena_adapter structure.
ENA notification are enabled by setting ENA_ADMIN_NOTIFICATION flag in
aenq_groups.
Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Michal Krawczyk [Thu, 7 Jun 2018 09:43:01 +0000 (11:43 +0200)]
net/ena: add LSC intr support and AENQ handling
To make the LSC interrupt working, the AENQ must be configured properly
in the ENA device. The AENQ interrupt is common for all maintenance
interrupts - the proper handler is then executed depending on the
received descriptor.
Michal Krawczyk [Thu, 7 Jun 2018 09:42:59 +0000 (11:42 +0200)]
net/ena: add interrupt handler for admin queue
The ENA device is able to send MSI-X when it will complete an command
when polling mode is deactivated. Further, the same interrupt handler
will be used for the AENQ handling - services of the ENA device, that
allows to implement watchdog or LSC handler.
Michal Krawczyk [Mon, 11 Jun 2018 11:01:23 +0000 (13:01 +0200)]
net/ena: update HAL to the newer version
ena_com is the HAL provided by the vendor and it shouldn't be modified
by the driver developers.
The PMD and platform file was adjusted for the new version of the
ena_com:
* Do not use deprecated meta descriptor fields
* Add empty AENQ handler structure with unimplemented handlers
* Add memzone allocations count to ena_ethdev.c file - it was
removed from ena_com.c file
* Add new macros used in new ena_com files
* Use error code ENA_COM_UNSUPPORTED instead of ENA_COM_PERMISSION
Signed-off-by: Michal Krawczyk <mk@semihalf.com> Signed-off-by: Rafal Kozik <rk@semihalf.com>
Shahed Shaikh [Thu, 7 Jun 2018 16:30:52 +0000 (09:30 -0700)]
net/qede: fix link change event notification
As per existing behavior, when firmware sends a link change
notification, PMD only updates the link structure but does
not notify applications about it.
This results in application sending packets even when link
status is down.
Rasesh Mody [Thu, 7 Jun 2018 16:30:20 +0000 (09:30 -0700)]
net/qede: fix memory alloc for multiple port reconfig
Multiple port reconfigurations can lead to memory allocation failures
due to hitting RTE memzone limit or no more room in config while
reserving memzone.
When freeing memzones, update the memzone mapping and the memzone count.
Release Rx and Tx queue rings allocated during queue setup.
Rasesh Mody [Tue, 5 Jun 2018 23:03:57 +0000 (16:03 -0700)]
net/qede: fix L2-handles used for RSS hash update
Fix fast path array index which is used for passing L2 handles to RSS
indirection table, properly distribute rxq handles for indirection table.
Currently, it is using the local copy of indirection table. When the RX
queue configuration changes the local copy becomes invalid.
Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com> Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
Rasesh Mody [Tue, 22 May 2018 23:16:04 +0000 (16:16 -0700)]
net/qede: fix for devargs
Do not error out on invalid devarg, log the message and continue.
Decide updating the tx-switching config in check args. Add a check for
VF when disabling tx-switching
Rasesh Mody [Tue, 22 May 2018 23:16:03 +0000 (16:16 -0700)]
net/qede: fix VF MTU update
This patch fixes VF MTU update to work without having to restart the
vport and there by not requiring port re-configuration. It adds a
VF MTU Update TLV to achieve the same. Firmware can handle VF MTU update
by just pausing the vport.
For cross-builds the CC environmental variable only applies for compiling
native binaries i.e. pmdinfogen, so setting it to a cross-build compiler
will only cause problems. Leave the value unset in the script to use the
platform-default compiler.
Fixes: a55277a788df ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
Maxime Coquelin [Tue, 12 Jun 2018 08:01:27 +0000 (10:01 +0200)]
maintainers: add vhost and virtio co-maintainers
Add Tiwei and Zhihong as co-maintainers for the Vhost and
Virtio components. They have done great contributions recently,
and been very helpful in helping to review Vhost and Virtio series.
Also, add Tiwei as backup for the Next-virtio tree.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Tiwei Bie <tiwei.bie@intel.com> Acked-by: Zhihong Wang <zhihong.wang@intel.com> Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Anoob Joseph [Tue, 29 May 2018 10:45:36 +0000 (16:15 +0530)]
crypto/armv8: fix HMAC supported digest sizes
For HMAC algorithms (SHAx-HMAC), the supported digest sizes are not a
fixed value, but a range between 1 and the maximum digest size for those
algorithms.
Reshma Pattan [Mon, 28 May 2018 15:40:22 +0000 (16:40 +0100)]
doc: add rte_abort issue on FreeBSD in release notes
Added known issue of rte_abort taking a long time
on FreeBSD due to recent memory subsystem rework.
Also, reference Bugzilla entry for keeping most
current information in one place.
Fan Zhang [Wed, 30 May 2018 08:30:47 +0000 (09:30 +0100)]
net/i40e: fix link status update
This patch fixes link status update problem in interrupt mode.
Previously, directly reading link status register instead of
accessing via admin queue command may cause the link status
change interrupt callback inactive. This patch fixes the
problem by making the driver only read the register in
"no wait" and polling mode.
Bugzilla ID: 54 Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") Cc: stable@dpdk.org Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yongseok Koh [Sun, 27 May 2018 07:04:55 +0000 (00:04 -0700)]
net/mlx4: fix crash when configure is not called
Although uncommon, applications may destroy a device immediately after
probing it without going through dev_configure() first.
This patch addresses a crash which occurs when mlx4_dev_close() calls
mlx4_mr_release() due to an uninitialized entry in the private structure.
In addition MR cache init takes place on the device configuration.
When the device is re-configured multiple times, for example when
changing the number of queue on the flight, deadlock can happen.
This patch moved MR cache init from device configuration function to
probe function to make sure init only once.
Fixes: 9797bfcce1c9 ("net/mlx4: add new memory region support") Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Signed-off-by: Xueming Li <xuemingl@mellanox.com> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Xueming Li [Sat, 26 May 2018 13:27:35 +0000 (21:27 +0800)]
net/mlx5: fix memory region cache init
MR cache init takes place on the device configuration.
When the device is re-configured multiple times, for example when
changing the number of queue on the flight, deadlock can happen.
This patch moved MR cache init from device configuration function to
probe function to make sure init only once.
Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support") Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Bruce Richardson [Tue, 29 May 2018 14:42:43 +0000 (16:42 +0200)]
devtools: add test script for meson builds
To simplify testing with the meson and ninja builds, we can add a script
to set up and do multiple builds. Currently this script sets up:
* clang and gcc builds
* builds using static and shared linkage for binaries (libs are always
built as both)
* a build using the lowest instruction-set level for x86 (-march=nehalem)
* cross-builds for each cross-file listed in config/arm
Each build is configured in a directory ending in *-build, and then for
the build stage, we just call ninja in each directory in turn. [i.e. we
assume every directory starting with "build-" is a meson build, which is
probably an ok assumption].
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Gaetan Rivet [Mon, 28 May 2018 16:10:35 +0000 (18:10 +0200)]
doc: postpone devargs genericisation notice
Device querying and declaration has been postponed to 18.08.
Additionally, while working on the feature, some changes previously
announced won't be enacted.