These were originally used for compatibility between DPDK releases when
this PMD was built out of tree.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Wrapper functions whose main purpose was to take a lock on the private
structure are no longer needed since this lock does not exist anymore.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Concurrent use of various control path functions (e.g. configuring a queue
and destroying it simultaneously) may lead to undefined behavior.
PMD are not supposed to protect themselves from misbehaving applications,
and mlx4 is one of the few with internal locks on most control path
operations. This adds unnecessary complexity.
Leave this role to wrapper functions in ethdev.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This addresses badly formatted comments and needless empty lines before
refactoring functions into different files.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Due to its reliance on system calls, the mlx4 PMD uses positive errno
values internally and negative ones at the ethdev API border. Although most
internal functions are documented, this mixed design is unusual and prone
to mistakes (e.g. flow API implementation uses negative values
exclusively).
Standardize on negative errno values and rely on rte_errno instead of
errno in all functions.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Returning a different value when the current link status differs from the
previous one was probably useful at some point in the past but is now
meaningless; this value is ignored both internally (mlx4 PMD) and
externally (ethdev wrapper).
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Thanks to the fact the PMD temporarily uses a slower interface for Rx,
removing the WR ID hack to instead store mbuf pointers directly makes the
code simpler at no extra cost.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit acac55f164.
"Fast Verbs" is a nonstandard experimental interface that must be reverted
for compatibility reasons. Its replacement is slower but temporary,
performance will be restored by a subsequent commit through an enhanced
data path implementation. This one focuses on maintaining basic
functionality in the meantime.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit 9980f81dc2.
"Fast Verbs" is a nonstandard experimental interface that must be reverted
for compatibility reasons. Its replacement is slower but temporary,
performance will be restored by a subsequent commit through an enhanced
data path implementation. This one focuses on maintaining basic
functionality in the meantime.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit 8b3ffe95e7.
Multicast loopback prevention is not part of the standard Verbs interface.
Remove it temporarily.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit 3e49c148b7.
Resource domains are not part of the standard Verbs interface. The
performance improvement they bring will be restored later through a
different data path implementation.
This commit makes the PMD not rely on the non-standard QP allocation
interface.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs API used to set QP attributes is deprecated. Revert to the
standard API since it actually supports the remaining ones.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs API used to implement inline receive is deprecated.
Support will be added back after refactoring the PMD.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs API used to implement Tx and Rx burst functions is deprecated.
Drop scatter/gather support to ease refactoring while maintaining basic
single-segment Rx/Tx functionality in the meantime.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs API used to implement packet type recognition is deprecated.
Support will be added back after refactoring the PMD.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs API used to implement Tx and Rx checksum offloads is deprecated.
Support for these will be added back after refactoring the PMD.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The Verbs RSS API used in this PMD is now obsolete. It is superseded by an
enhanced API with fewer constraints already used in the mlx5 PMD.
Drop RSS support in preparation for a major refactoring. The ability to
configure several Rx queues is retained, these can be targeted directly by
creating specific flow rules.
There is no need for "ignored" Rx queues anymore since their number is no
longer limited to powers of two.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit ff00a0dc56.
Support for several RSS parent queues was necessary to implement the RSS
flow rule action, dropped in a prior commit.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This reverts commit d7769c7c08.
Existing RSS features rely on experimental Verbs provided by Mellanox OFED.
In order to replace this dependency with standard distribution packages,
RSS support must be temporarily removed to be re-implemented using a
different API.
Removing support for the RSS flow rule action is the first step toward this
goal.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Configuring several Rx queues enables RSS, which causes an additional
special parent queue to be created to manage them.
MAC flows are associated with the queue supposed to receive packets; either
the parent one in case of RSS or the single orphan otherwise.
For historical reasons the current implementation supports another scenario
with multiple orphans, in which case MAC flows are configured on all of
them. This is harmless but useless since it cannot happen.
Removing this feature allows dissociating the remaining MAC flow from Rx
queues and store it inside the private structure where it belongs.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Only the default port MAC address remains and is not configurable.
This is done in preparation for a major refactoring.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This option both sets the maximum number of segments for Rx/Tx packets and
whether scattered mode is supported at all. This commit removes the latter
as well as configuration file exposure since the most appropriate value
should be decided at run-time.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Current implementation is partial (Tx only), not convenient to use and
not of primary concern.
Remove this feature before refactoring the PMD.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Verbs support for RSS, inline receive and extended device query calls has
not been optional for a while. Their absence is untested and is therefore
unsupported.
Remove the related compilation checks and assume Mellanox OFED is up to
date, as described in the documentation.
Use this opportunity to remove a few useless data path debugging messages
behind compilation checks on never defined macros.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Use maximum number reported by hardware capabilities as replacement for the
static check on MLX4_PMD_MAX_PHYS_PORTS.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
The seemingly artificial limitation on the maximum number of instances for
this PMD is an historical leftover that predates its first public release.
It was used as a workaround to support multiple physical ports on a PCI
device exposing a single bus address when mlx4 was implemented directly as
an Ethernet device driver instead of a PCI driver spawning Ethernet
devices.
Getting rid of it simplifies device initialization.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Copyright lasts long enough not to require notices to be updated yearly.
The current approach of updating them occasionally while working on
unrelated tasks should be deprecated in favor of dedicated commits updating
all files at once when necessary.
Standardize on a single year per copyright owner.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This patch adds link to the DPDK i40e doc,
which is how to upgrade firmware guide for users.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Update efx_rx_scale_mode_set(), efx_rx_scale_key_set()
and efx_rx_scale_tbl_set().
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Rename efx_rx_scale_support_get() to efx_rx_scale_default_support_get(),
and efx_rx_hash_support_get() to efx_rx_hash_default_support_get().
All these really report is whether an exclusive RSS context was
successfully acquired at efx_rx_init().
efx_rx_scale_support_get() sounds like it reports whether the device
supports RSS, and whether exclusive or shared contexts are supported,
but it doesn't do that. Renaming it to
efx_rx_scale_default_support_get() helps to reflect that it reports
what RSS support the client gets without trying to allocate RSS
contexts itself.
Also rename efx_rx_scale_support_t to efx_rx_scale_context_type_t, to
make the enum more suitable for specifying the type of an RSS context
to be allocated.
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
The patch adds enc_rx_scale_max_exclusive_contexts member
to nic_cfg_t structure and sets the corresponding values
for Siena, Huntington and Medford
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Default RSS context check is carried out during filter
insertion on Siena and it needs to be fixed
Fixes: f7dc06bf35 ("net/sfc/base: import 5xxx/6xxx family support")
Cc: stable@dpdk.org
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Make the existing filter-specific define more general.
This is the same as MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID.
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Unused variables will be found in several places if RSS
support is disabled at build time; the patch is to fix it
Fixes: 4ec1fc3ba8 ("net/sfc: add basic stubs for RSS support on driver attach")
Fixes: d9ff551fc9 ("net/sfc: support RSS hash offload")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Support for the feature is added to EFX Tx datapath
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Support for the feature is added to EFX Rx datapath
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Support MTU change in the range ETHER_MIN_MTU to PF_MTU. A drop in PF
MTU lowers VF MTU if it goes out of range.
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
The corrupted code doesn't return error when probe function
fails due to error in device mac address getting.
By this way, the probe function may return success even if the
ETH dev is not allocated.
Hence, the probe caller, for example failsafe PMD, fails when it
tries to get ETH dev after the device was plugged out while mlx5
was probing it.
The fix adds error report to the probe caller when priv_get_mac fails
and in all other failure options which are missing it.
By this way, it prevents the unexpected behavior to miss ETH device
after the device was probed successfully.
This bug was already present in the original code taken from mlx4.
Fixes: 771fa900b7 ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Fixes: 1371f4df16 ("mlx5: check port is configured as ethernet device")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>