The RX_ECC_ERR flag in RX events was misnamed, as it
reported frame truncation. Use the new RX_TRUNC_ERR
name for this flag.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Decode Medford2 FEC stats if available in MAC stats DMA buffer.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
On Medford2 and later the MAC stats buffer has been enlarged.
Use the MAC stats DMA buffer size to ensure that the stats END
generation count is read from the correct location, and that
over-reading of the DMA buffer is prevented.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
For Medford2 the DMA buffer used for one-shot or periodic MAC stats
has been extended. Ensure the MAC stats DMA buffer size is large
enough to hold the number of stats counters supported by firmware.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Previously the code relied on the callers of efx_mcdi_mac_stats
to provide a DMA buffer or NULL depending on the action. Fix
this so that the DMA buffer is only passed in the request when
needed, and that an error is reported for a missing DMA buffer.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This reports the number of stats (and hence the DMA buffer size)
for MAC stats. If MC_GET_CAPABABILITIES_V4 is not supported then
use the legacy Siena-compatible MC_CMD_MAC_NSTATS value.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Inline efx_mcdi_get_capabilities() to prepare for reading
newer capabilities response versions.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
EFSYS_MEM_SIZE() reports the DMA mapped size of an efsys_mem_t
allocated region (the allocation size may be different due to
memory allocator and DMA alignment restrictions).
This ensures that common code internals have explicit knowledge
of the usable size of DMA mapped memory regions.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Report supported loopback modes for new Medford2 link speeds.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Add basic support for new link modes for Medford2.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
On Medford and earlier controllers the BAR layout is:
PF BAR 0: (32bit I/O) I/O mapped registers
PF BAR 2: (64bit Mem) Memory mapped registers (VI aperture)
PF BAR 4: (64bit Mem) MSI-X tables
VF BAR 0: (64bit Mem) Memory mapped registers (VI aperture)
VF BAR 2: (64bit Mem) MSI-X tables
On Medford2, the layout is:
PF/VF BAR 0: (64bit Mem) Memory mapped registers (VI aperture)
PF/VF BAR 2: (64bit Mem) MSI-X tables
Make the VI aperture BAR number available for drivers that need it.
Remove EFX_MEM_BAR define as it it is not correct on all platforms.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Addresses most of the warnings reported by the sfn windows driver.
Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
The changes to efx_regs_ef10.h are auto-generated and include:
- Updated event RX_L4_CLASS which is now 2 bits (was 3).
The encoding of TCP, UDP and UNKNOWN are unchanged so
the narrower Medford2 field definition is compatible with
all controllers.
- Fix definition of FATSOv2 option descriptors. These were
added manually and differ from the auto-generated values
in some fields (not yet used in common code). The field
definitions have been corrected to agree with the Linux net
driver headers and SF-108452-SW.
The remaining changes adapt the common code to use the updated
headers.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.
Update the common code to query the VI window size via MCDI,
and add new EFX_BAR_VI_* accessor macros for per-VI registers.
The existing EFX_BAR_TBL_* macros can be used for non-VI
register tables (and for code that can never be called for
a Medford2 controller e.g. Siena-only code).
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Automatically generated using mkconfig.py.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Add security level to image boot header.
Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
The query for the tunnel stateless offloads is wrongly implemented
because of:
1. It was using the device id to query for the offloads.
2. It was using a compilation flag for Verbs which no longer exits.
The main reason was lack of proper API from Verbs.
Fixing the query to use rdma-core API. The capability returned from
rdma-core refer to both Tx and Rx sides.
Eventhough there is a separate cap for GRE and VXLAN, implementation merge
them into a single flag in order to simplify the checks on the data
path.
Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Fixes: f5fde52051 ("net/mlx5: add hardware checksum offload for tunnel packets")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Adding a pattern targeting a single queues wrongly behaves as it is an RSS
request, ending by creating several Verbs flows rules to match the RSS
configuration.
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Several control operations implemented by these PMDs affect netdevices
through sysfs, itself subject to file system permission checks enforced by
the kernel, which limits their use for most purposes to applications
running with root privileges.
Since performing the same operations through ioctl() requires fewer
capabilities (only CAP_NET_ADMIN) and given the remaining operations are
already implemented this way, this patch standardizes on ioctl() and gets
rid of redundant code.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Use strcmp to compare device names as the strncmp in original code
causes find_vdev to return -EEXIST for names that are prefix
of another. The creation of interfaces fails unpredictably based
on the order of their creation. An easy way hit this bug is to create
eth_vhost1 after eth_vhost11.
Fixes: dda987315c ("vdev: make virtual bus use its device struct")
Cc: stable@dpdk.org
Signed-off-by: Nachiketa Prachanda <nprachan@vyatta.att-mail.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Fixes: efd5d1a8d8 ("drivers/net: build some vdev PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixes: efd5d1a8d8 ("drivers/net: build some vdev PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The drivers directory contains some sub-directories
for each kind of device (or bus, mem):
net, crypto, event, raw
They are not suffixed with "dev" because it is obvious.
For consistency, the sub-directory drivers/bbdev/
is renamed to drivers/baseband/.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
The array pointers were used without index.
Fixes: b9083ea5e0 ("net/dpaa: further push mode optimizations")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
rte_cycles.h shall be included instead of rte_cycles_64.h
dpaa_eventdev.c:32:27:
fatal error: rte_cycles_64.h: No such file or directory
Fixes: 9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Rather than trying to use meson's build-in detection for libpcap, and
having to special-case cross-building, just check for the presence of
pcap.h and the pcap library.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This patch fixes the build dependency of various
dpaaX components, when the dpaa or fslmc bus is disabled,
or VFIO is disabled.
Fixes: 1ee9569576 ("config: enable dpaaX drivers for generic ARMv8")
Cc: stable@dpdk.org
Reported-by: Yongseok Koh <yskoh@mellanox.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Fail-safe dev_start() operation can be called by both the application
and the hot-plug alarm mechanism.
The installation of Rx interrupt are triggered from dev_start() in any
time it is called while actually the Rx interrupt should be installed
only by the application calls.
So, each plug-in event causes reinstallation which causes memory leak
and spoils the fail-safe Rx interrupt mechanism.
Trigger the Rx interrupt installation only when it does not exist.
Fixes: 9e0360aebf ("net/failsafe: register as Rx interrupt mode")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Running testpmd command "port stop all" followed by command "port start
all" may result in a TAP error:
PMD: Kernel refused TC filter rule creation (17): File exists
Root cause analysis: during the execution of "port start all" command
testpmd calls rte_eth_promiscuous_enable() while during the execution
of "port stop all" command testpmd does not call
rte_eth_promiscuous_disable().
As a result the TAP PMD is trying to add tc (traffic control command)
promiscuous rules to the remote netvsc device consecutively. From the
kernel point of view it is seen as an attempt to add the same rule more
than once. In recent kernels (e.g. version 4.13) this attempt is rejected
with a "File exists" error. In less recent kernels (e.g. version 4.4) the
same rule may have been successfully accepted twice, which is undesirable.
In the corrupted code every tc promiscuous rule included a different
handle number parameter. If instead an identical handle number is
used for all tc promiscuous rules - all kernels will reject the second
identical rule with a "File exists" error, which is easy to identify and
to silently ignore.
Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
The type pthread_t is not portable because it is freely defined.
On Linux, it is an unsigned long int which can be printed with %l.
On FreeBSD, it is a pointer which can be printed with %p.
That's why there was this error:
drivers/net/failsafe/failsafe_private.h:377:53: error:
format specifies type 'unsigned long' but the argument has
type 'pthread_t' (aka 'struct pthread *')
Fixes: 655fcd68c7 ("net/failsafe: fix hotplug races")
Reported-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
intr_handle->fd was wrongly initialized as 0 (usually as the stdio fd)
when virtio-user is used with vhost-kernel. So the interrupt thread
might wrongly treat stdin events as LSC interrupts.
Fixes: 3d4fb6fd25 ("net/virtio-user: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
After reset owner in below patch, we failed to set owner before
sending further vhost messages. It is OK with vhost user implemented
DPDK/VPP/Contrail, but it sees "Operation not permitted" error when
used with vhost kernel.
We fix this by setting owner every time the device is started.
Fixes: 0d6a8752ac ("net/virtio-user: fix crash as features change")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The original words are not accurate. For example, as destroy_device
callback gets called, it does not necessarily mean that the connection
is closed.
Fixes: ee584e9710 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Since commit efc83a1e7f ("net/virtio: fix queue setup consistency"),
when resuming a virtio port, the rx rings are refilled with new mbufs
until they are full (vq->vq_free_cnt == 0). This is done without
ensuring that the descriptor index remains a multiple of
RTE_VIRTIO_VPMD_RX_REARM_THRESH, which is a prerequisite when using the
vector mode. This can cause an out of bound access in the rx ring.
This commit changes the vector refill method from
virtqueue_enqueue_recv_refill_simple() to virtio_rxq_rearm_vec(), which
properly checks that the refill is done by batch of
RTE_VIRTIO_VPMD_RX_REARM_THRESH.
As virtqueue_enqueue_recv_refill_simple() is no more used, this
patch also removes the function.
Fixes: efc83a1e7f ("net/virtio: fix queue setup consistency")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
The mbuf->data_off was was not properly set for the first received
mbufs. Fix this by setting it in virtqueue_enqueue_recv_refill_simple(),
which is used to enqueue the first mbuf in the ring.
The function virtio_rxq_rearm_vec(), which is used to rearm the ring
with new mbufs, is valid and does not need to be updated.
Fixes: cab0461234 ("virtio: fill Rx avail ring with blank mbufs")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fail-safe PMD manages the states of its sub-devices gradually:
DEV_UNDEFINED, DEV_PARSED, DEV_PROBED, DEV_ACTIVE, DEV_STARTED.
When the sub-device arguments successfully was parsed, the state is
raised from DEV_UNDEFINED to DEV_PARSED.
When the sub-device successfully was probed, the state is raised from
DEV_PARSED to DEV_PROBED.
When the sub-device successfully was configured by
rte_eth_dev_configure(), the state is raised from DEV_PROBED to
DEV_ACTIVE.
When the sub-device successfully was started by rte_eth_dev_start(), the
state is raised from DEV_ACTIVE to DEV_STARTED.
When the sub-device successfully was stopped by rte_eth_dev_stop(), the
state is degraded from DEV_STARTED to DEV_ACTIVE.
When the sub-device successfully was closed by rte_eth_dev_close(), the
state is degraded from DEV_ACTIVE to DEV_PROBED.
When the sub-device successfully was removed by
rte_eal_hotplug_remove(), the state is degraded from DEV_PROBED to
DEV_UNDEFINED.
Fail-safe dev_configure() operation calls to its sub-devices
dev_configure() operation, but only for sub-devices which are in
DEV_PROBED state, means that sub-devices which are in DEV_ACTIVE state
because the application triggered dev_stop() operation cannot be
reconfigured again by dev_configure() operation which is really
problematic when application wants to reconfigure its ports.
Actually, the application may get success report when some of the
sub-devices are not in the wanted configuration.
The current behavior of fail-safe dev_configure() is correct only for
the first time dev_configure() is triggered by the application or for
sub-device synchronization in plug-in event, but it ignores the option
for reconfiguration from application side.
Allow calling to sub-devices dev_configure() operations also in
DEV_ACTIVE state when the call was triggered by the application.
Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Fail-safe uses a periodic alarm mechanism, running from the host
thread, to manage the hot-plug events of its sub-devices. This
management requires a lot of sub-devices PMDs operations
(stop, close, start, configure, etc.).
While the hot-plug alarm runs in the host thread, the application may
call fail-safe operations, which directly trigger the sub-devices PMDs
operations as well. This call may occur from any thread decided by the
application (probably the master thread).
Thus, more than one operation can be executed to a sub-device at the
same time. This can initiate a lot of races in the sub-PMDs.
Moreover, some control operations update the fail-safe internal
databases, which can be used by the alarm mechanism at the same time.
This can also initiate races and crashes.
Fail-safe is the owner of its sub-devices and must synchronize their
use according to the ETHDEV ownership rules.
Synchronize hot-plug management by a new lock mechanism uses a mutex to
atomically defend each critical section in the fail-safe hot-plug
mechanism and control operations to prevent any races between them.
Fixes: a46f8d5 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
The fail-safe PMD uses a per sub-device flag called "remove" to
indicate the scope where the sub-device was removed physically and
whether its software resources should be released.
This flag is set when the fail-safe receives an RMV notification
about the physical removal of the sub-device, and should be unset when
all the sub-device resources are released.
The previous code wrongly unsets the flag in dev_configure(), instead
of when the software resources release is completed.
Change the remove flag unsetting to take action in the end of the
software resources release.
Fixes: a46f8d5 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
The hot-plug alarm mechanism of fail-safe PMD is responsible for
handling removed devices during a plug-out event and to restore them
back to activity following a plug-in event.
Fail-safe sets a flag called "pending_alarm" to validate that only one
alarm callback is pending at any time. While this flag is required to
avoid simultaneous initiations of the alarm thread - it should not be
considered during alarm thread cancellation.
So, when failsafe_hotplug_alarm_cancel() was called while the alarm
callback was being executed the alarm mechanism was not stopped.
Skip checking the "pending_alarm" flag to allow alarm thread
cancellation all the times.
Fixes: ebea83f899 ("net/failsafe: add plug-in support")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
CRC stripping is executed in the kernel outside of TAP PMD scope.
There is no prevention that the TAP PMD will report on Rx CRC
stripping capability.
In the corrupted code, TAP PMD did not report on this capability.
The fix enables TAP PMD to report that Rx CRC stripping is supported.
Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
This is to revert the following commits:
commit da646bd938 ("net/mlx5: fix all multi verification code position")
commit 0a40a1363a ("net/mlx5: fix flow type for allmulti rules")
The last one introduced a bug in the following diff:
@ -1262,6 +1274,7 @@ struct ibv_spec_header {
eth.val.ether_type &= eth.mask.ether_type;
}
mlx5_flow_create_copy(parser, ð, eth_size);
+ parser->allmulti = eth.val.dst_mac[0] & 1;
return 0;
}
As broadcast rules will be considered of type allmulti as well.
The patch was originally intended to enable VF to receive all multicast
traffic by using the IBV_FLOW_ATTR_MC_DEFAULT flow type.
Since the support was removed from the kernel there is no point with
fixing this issue, hence the revert.
Fixes: da646bd938 ("net/mlx5: fix all multi verification code position")
Fixes: 0a40a1363a ("net/mlx5: fix flow type for allmulti rules")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
This patch fixed primary socket assertion error during close on a device
that failed to start.
Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Due to the missing __packed definition, compiler treating
it as as global variable.
grep "Allocating common symbols" -A 100 build/app/testacl.map
__packed 0x8 /build/lib/librte_pmd_dpaa2.a(dpaa2_rxtx.o)
Fixes: a5fc38d422 ("net/dpaa2: support Rx packet parsing")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Neither upstream kernel nor MLNX_OFED support such filter.
There is no point announcing this feature.
Reverts commit 0fb2c9842b ("net/mlx5: support IPv4 time-to-live filter")
Fixes: 0fb2c9842b ("net/mlx5: support IPv4 time-to-live filter")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
This patch updates mlx4 Rx offload capabilities to also indicate that
Rx CRC stripping is (always) supported.
Since the device does not support disabling CRC stripping the PMD
silently ignores such requests.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The hw flags are not read correctly: the defines
RX_PKT_CMPL_FLAGS_ITYPE_* are not bits but values, so the should not be
tested with if (value & X) but with if ((value & MASK) == X).
This was resulting in a wrong packet type.
For instance, an IPv4/ICMP packet was returning a value of 7 for
the layer 4, which is undefined.
This patch rework the way packet types are processed, to ensure
that only valid packet types will be advertised.
Fixes: 3d2a6644eb ("net/bnxt: support getting ptypes")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
There is no need to return an error if an existing MAC is added.
Fixes: 778b759ba1 ("net/bnxt: add MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are not parsing for 100G speed correctly.
With this patch we should be able to configure 100G link.
Fixes: 90ed2b7229 ("net/bnxt: add 100G speed detection")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
When Autoneg is turned off especially on remote side,
link does not come up. This patch fixes that.
Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Fix the Rx offload flags when the IP or L4 checksum is seen as incorrect
by the hardware. In this case, the proper value is PKT_RX_IP_CKSUM_BAD.
PKT_RX_IP_CKSUM_NONE means that the checksum may be incorrect in the
packet headers, but the integrity of the IP header is verified. This is
mostly useful for virtual drivers.
Fixes: 7ec39d8c52 ("net/bnxt: update status of Rx IP/L4 CKSUM")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch complements the partial cleanup done inside
eth_dev_tap_create when the routine failed.
Such a failure left a non-functional device attached to the system.
Fixes: 050fe6e9ff ("drivers/net: use ethdev allocation helper for vdev")
Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
testpmd needs to get CRC strip offload from rx_offload_capa with a
recent change. This patch adds CRC strip flag to rx_offload_capa
for ixgbe and ixgbevf, as they have the capability.
Fixes: 8b9bd0efe0 ("app/testpmd: disable Rx VLAN offloads by default")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This reverts commit 7b7711bea5 ("net/i40e/base: enhance loopback
AQ command").
It was to support multiple type of loopbacks, which results to
configuration error about adminq. So revert it as agreed.
Fixes: 7b7711bea5 ("net/i40e/base: enhance loopback AQ command")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Report error message if clearing O_NONBLOCK flag will fail,
then return from function.
Coverity issue: 143439
Fixes: ef53b60300 ("net/virtio-user: support LSC")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Should be not possible to load conflicting DDP profiles. Only DDP
profiles of the same group (not 0) can be loaded together. If DDP
profile group is 0, it is exclusive, i.e. it cannot be loaded with
any other DDP profile. If DDP profile groups are different, these
profiles cannot be loaded together.
Fixes: b319712f53 ("net/i40e: extended list of operations for DDP processing")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This patch fixes shared library compilation due to undefined
reference to an exported variable 'bbdev_logtype'.
Fixes: 4935e1e9f7 ("bbdev: introduce wireless base band device lib")
Fixes: b8cfe2c9ae ("bb/turbo_sw: add software turbo driver")
Fixes: 7dc2b15894 ("bb/null: add null base band device driver")
Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Fix dpaa bus returning IOVA as PA even when it is not running on dpaa
platform.
Fixes: 1ee9569576 ("config: enable dpaaX drivers for generic ARMv8")
Fixes: d5a4e3a00c ("bus/dpaa: set IOVA mode as physical")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Fix the following build error with latest glibc-headers(
Part of aarch64-linux-gnu-gcc-7.3.0 toolchain)
In file included from drivers/bus/fslmc/mc/fsl_mc_sys.h:30:0,
from drivers/bus/fslmc/mc/dpmng.c:7:
/usr/aarch64-linux-gnu/usr/include/libio.h:21:2: error:
#warning "<libio.h> is deprecated; use <stdio.h> instead." [-Werror=cpp]
Fixes: 3af733ba8d ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Device can only be started if firmware is loaded, as per Skeleton
rawdev driver semantics. This patch fixes original implementation
which attempted to start the device without loading firmware.
Fixes: 55ca1b0f21 ("raw/skeleton: add test cases")
Cc: shreyansh.jain@nxp.com
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
priv_tx_uar_remap() is wrongly considering the queue is already configured
and thus present in the queue array of the device.
Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
An RSS configuration without a key is valid according to the
rte_eth_rss_conf API definition.
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Reported-by: Yuanhan Liu <yliu@fridaylinux.org>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Since rdma-core glue libraries are intrinsically tied to their respective
PMDs and used as internal plug-ins, their presence in the default search
path among other system libraries for the dynamic linker is not necessarily
desired.
This commit enables their installation and subsequent look-up at run time
in RTE_EAL_PMD_PATH if configured to a nonempty string. This path can also
be overridden by environment variables MLX[45]_GLUE_PATH.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When built as separate objects, these libraries do not have unique names.
Since they do not maintain a stable ABI, loading an incompatible library
may result in a crash (e.g. in case multiple versions are installed).
This patch addresses the above by versioning glue libraries, both on the
file system (version suffix) and by comparing a dedicated version field
member in glue structures.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
For consistency since these includes are already pulled by others.
Fixes: 4eba244b78 ("net/mlx4: move rdma-core calls to separate file")
Fixes: 0e83b8e536 ("net/mlx5: move rdma-core calls to separate file")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This code should catch mistakes early if a glue structure member is added
without a corresponding implementation in the library.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The timestamp flag needs to be set in the offload flags
for the received pkt in case of PTP offload.
Fixes: b11cceb83a ("net/bnxt: support timesync")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
virtio_dev_free_mbufs was recently modified to free the
virtqueues but failed to check whether the array was
allocated. Added a check to ensure vqs was non-null.
Fixes: bdb32afbb6 ("net/virtio: rationalize queue flushing")
Signed-off-by: David Harton <dharton@cisco.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The eBPF classifier (section "cls_q" in tap_bpf_program.c) is tracing
marked packets in which skb->cb[1] contains an RSS queue number, and
redirects those packets to the matched queue.
It is expected that skb->cb[1] has been previously set with a valid RSS
queue number during an eBPF action (section "l3_l4" in tap_bpf_program.c).
However, for non-RSS flows, skb->cb[1] may contain a random unset value,
which could falsely be interpreted as a valid RSS queue.
To avoid this potential error, tap_bpf_program.c has been updated as
follows:
1. After calculating the RSS queue number, it is added a unique offset in
order to uniquely identify it as a valid RSS queue number.
2. After matching an RSS queue to a packet, skb->cb[1] is set to 0.
Fixes: cdc07e83bb ("net/tap: add eBPF program file")
Fixes: aabe70df73 ("net/tap: add eBPF bytes code")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
TAP device is supporting multi segments Tx, however this capability is
not reported when querying the TAP device.
This commit adds this capability report.
Fixes: 818fe14a98 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Failsafe reported Tx offloads capabilities are the AND result of its
default capabilities and those of its sub-devices.
In the corrupted code failsafe default Tx capabilities were set to 0.
As a result when running testpmd with "--tx-offloads=0x8000" parameter
(request for multi segments offload) - an error was returned:
PMD: net_failsafe:
Some Tx offloads are not supported, requested 0x8000 supported 0x0
To fix this, failsafe default Tx offload capabilities are set to
DEV_TX_OFFLOAD_MULTI_SEGS |
DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM,
Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
The vdev_netvsc driver does periodic detection of PCI devices matched
to the netvsc existed interfaces.
When it finds a match, the PCI address is written to the pipe of the
associated fail-safe PMD instance and a positive value is returned to
the periodic check which is wrongly considered as error.
Change the check to consider only a negative value as error.
Fixes: e7dc5d7bec ("net/vdev_netvsc: implement core functionality")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Fixes: 9e33430517 ("net/qede: fix MTU set and max Rx length")
Fixes: 22d07d939c ("net/qede/base: update")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Few adjustments are required to effectively handle VF vport create/delete
sequence. The problem is exposed by recent ethdev TX offload changes
which requires port to be in down state before applying TX offloads.
- Move vport creation from dev_init() to dev_configure()
- Force to stop vport if it was already started due to previous run
(restart case)
- Move link state enable/disable to dev_init() and dev_close()
respectively.
- For MTU change, recreate vport with new MTU value and restore old
config. This is necessary since VF MTU value can be changed only upon
vport creation.
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
ENA device supports Rx jumbo frames and such information needs to
be provided in the offloads flags.
Fixes: 7369f88f88 ("net/ena: convert to new Rx offloads API")
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
IBV_WQ_FLAGS_SCATTER_FCS is a WQ flag to be used to configure the CRC
strip on a queue upon creation.
Using IBV_RAW_PACKET_CAP_SCATTER_FCS instead to query to capability.
Even though this is RAW_QP capability, it is being used by rdma-core to
indicate for both RAW_QP and WQ.
Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org
Reported-by: Alex Rosenbaum <alexr@mellanox.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
A single queue should have the same verbs priority as an RSS one.
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
priv_flow_stop() may be called several times, in such situation flows are
already removed from the NIC and thus all associated objects are no present
in the flow object (ibv_flow, indirection tables, ....).
Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Resources allocated for drop flow rules are not freed properly. This causes
a memory leak and triggers an assertion failure on a reference counter when
compiled in debug mode.
This issue can be reproduced with testpmd by entering the following
commands:
flow create 0 ingress pattern eth / end actions drop / end
port start all
port stop all
port start all
port stop all
quit
The reason is additional references are taken when re-enabling existing
flow rules, a common occurrence when rehashing configuration.
Fixes: d3a7e09234 ("net/mlx4: allocate drop flow resources on demand")
Cc: stable@dpdk.org
Reported-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
There's interrupt conflict when using DPDK and Linux i40e
on different ports of the same Ethernet controller, this
patch fixes it by switching from IntN to Int0 if multiple
drivers are used.
Fixes: be6c228d4d ("i40e: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This patch provides the option to disable writing some global registers
in PMD, in order to avoid affecting other drivers, when multiple drivers
run on the same NIC and control different physical ports. Because there
are few global resources shared among different physical ports.
Fixes: ec246eeb5d ("i40e: use default filter input set on init")
Fixes: 98f0557076 ("i40e: configure input fields for RSS or flow director")
Fixes: f05ec7d77e ("i40e: initialize flow director flexible payload setting")
Fixes: e536c2e328 ("net/i40e: fix parsing QinQ packets type")
Fixes: 19b16e2f64 ("ethdev: add vlan type when setting ether type")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
New testpmd will get CRC strip offload from rx_offload_capa. I40evf
cannot disable CRC strip. And in fact, it is enabled by PF. This
patch solves the issue by adding CRC strip flag into rx_offload_capa
in i40e and i40evf.
Fixes: 8b9bd0efe0 ("app/testpmd: disable Rx VLAN offloads by default")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
The version map filename does not comply with the format
used by meson build rules for drivers (i.e. on the upper
level) and needs to be revisited. This patch removes efx
postfix from the driver title in the filename.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The AVX2 code path includes files from the ethdev, hash and kvargs libs.
These are not listed as dependencies in the case where AVX2 is not in
the default instruction set for the build e.g. machine=nehalem. This
leads to compiler errors as the header files needed cannot be found.
Fixes: e940646b20 ("drivers/net: build Intel NIC PMDs with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Checking if portal has been allocated is now required at the
caller of rte_dpaa_portal_init() API. This patch adds check
in the dpaa eventdev driver.
Fixes: 5d944582d0 ("bus/dpaa: check portal presence in the caller function")
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
DPAA2 eventdev is named as event_dpaa2 which conflicts with
event_dpaa when both are compiled in together. So event_dpaa
is required to renamed.
Fixes: 1ee9569576 ("config: enable dpaaX drivers for generic ARMv8")
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.
Cc: stable@dpdk.org
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
The following error is reported when compiling 18.02-rc2 using ICC,
"transfer of control bypasses initialization of".
The patch fixes the issue.
Fixes: 1911c5edc6 ("net/tap: fix eBPF RSS map key handling")
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
This patch ensures that the OPDL files all contain correct SPDX tags.
The following changes were made to achieve this:
* replace license text with SPDX tag
* correct occurences where SPDX tag was not on first line of file
* ensure license years were correct
Fixes: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")
Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
Fixes: d548ef513c ("event/opdl: add unit tests")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Liang Ma <liang.j.ma@intel.com>