Commit Graph

10817 Commits

Author SHA1 Message Date
Adrien Mazarguil
27563725b1 net/mlx4: use function to get default RSS fields
Supported RSS hash fields are listed in function mlx4_conv_rss_hf() and
duplicated in mlx4_flow_prepare(); the latter are used when RSS is
requested without specifying any parameters.

This commit standardizes on mlx4_conv_rss_hf().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-01-16 18:47:49 +01:00
Adrien Mazarguil
c7869af57e net/mlx4: fix documentation in private structure
A couple of structure fields are not Doxygen-friendly.

Fixes: 5db1d36408 ("net/mlx4: restore Tx checksum offloads")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-01-16 18:47:49 +01:00
Adrien Mazarguil
3058dd9bca net/mlx4: fix unnecessary include
Fixes: a2ce2121c0 ("net/mlx4: separate Tx configuration functions")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
4aa15eb19a net/mlx5: fix Tx checksum offloads
Tx checksum offloads are correctly handled in a single Tx burst function
whereas the capability is always set.
This causes VXLAN packet with checksum offloads request to be ignored when
the (E)MPS Tx functions are selected.

Fixes: f5fde52051 ("net/mlx5: add hardware checksum offload for tunnel packets")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Jerin Jacob
42473d6782 net/thunderx: fix multi segment Tx function return
multi segment version of tx burst function was not
returning the actual number of packets sent out
in PMD xmit function.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
2018-01-16 18:47:49 +01:00
Alejandro Lucero
f92e944788 net/nfp: configure default RSS reta table
Some apps can enable RSS but not update the reta table nor the hash.
This patch adds a default reta table setup based on total number of
configured rx queues. The hash key is dependent on how the app
configures the rx_conf struct.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-01-16 18:47:49 +01:00
Alejandro Lucero
d4abcc55c5 net/nfp: fix CRC strip check behaviour
NFP does CRC strip by default and it is not configurable. But, even
if an app requests not to do it, that should not be a reason for PMD
configuration failure.

Fixes: defb9a5dd1 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-01-16 18:47:49 +01:00
Alejandro Lucero
c70ccbc79d net/nfp: fix jumbo settings
When jumbo frames is configured, the hardware mtu needs to be updated to
the specified max_rx_pkt_len. Also, changing mtu should be avoided once
the PMD port started.

Fixes: defb9a5dd1 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-01-16 18:47:49 +01:00
Alejandro Lucero
d9b98888d4 net/nfp: fix MTU settings
The wrong mtu length was used for configuring the hardware. The
max_rx_pktlen reported was also wrong.

Fixes: defb9a5dd1 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-01-16 18:47:49 +01:00
Ilya V. Matveychikov
5aac4f74cd net/bnxt: remove unused field from Rx queue struct
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
2018-01-16 18:47:49 +01:00
Jacek Piasecki
1184582b5f net/bonding: fix bonding in 8023ad mode
This patch blocks possibility to set master bonding by
rte_eth_bond_mode_set() in 802.3ad mode, as the API
doesn't prevent this.

Fixes: 6d72657ce3 ("net/bonding: add other aggregator modes")
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
0c62250ba6 net/mlx5: add physical port counters
Extend the PMD extended statistics with more counters on the physical
port.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
abdb903fac doc: update mlx5 statistics query
Update the guide with more details on the different statistics query
possible with MLX5 PMD.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-16 18:47:49 +01:00
Raslan Darawsheh
8937c9f1de net/mlx4: store RSS hash result in mbufs
Add RSS hash result from CQE to mbuf,
Also, set PKT_RX_RSS_HASH in the ol_flags.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
27a6b2d694 net/mlx5: remove redundant inline variable
A non max_inline 0 means an inline is requested, there is no need to
duplicate this information.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
3bbae1ebd6 net/mlx5: move variable declaration
Most of the variable in mlx5_tx_burst() are defined too soon.
This commit moves them their uses C block of code.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
ebbb81eb27 net/mlx5: remove 32-bit support
naddr variable was introduced in
commit 9a7fa9f76d ("net/mlx5: use vector types to speed up processing")
to avoid compilation errors on 32bits compilation, as x86_32 is no more
supported by rdma-core nor by MLNX_OFED, this variable becomes useless and
can be safely removed.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
51e7fa8d20 net/mlx5: fix secondary process verification
Since the secondary process has its own devops, function which cannot be
called by the secondary don't need anymore to verify which process is
calling it.

Fixes: 87ec44ce16 ("net/mlx5: add operations for secondary process")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
01d79216e6 net/mlx5: remove get priv internal function
mlx5_get_priv() is barely use across the driver.  To avoid mixing access,
this function is definitely removed.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Nélio Laranjeiro
992300f402 net/mlx5: remove parser/flow drop queue
This drop queue can be handled efficiently by using the drop flag in the
context.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-16 18:47:49 +01:00
Thierry Herbelot
25b73ba6f3 net/mlx5: cleanup allocation of ethtool stats
Simplify the computation for the needed size:
- exact size for the structure header,
- exact size for a number of 64-bit counters.

Fixes: a4193ae3bc ("net/mlx5: support extended statistics")
Cc: stable@dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-16 18:47:49 +01:00
Shijith Thotton
37a725d66d net/liquidio: support queue re-configuration
Support for re-configuration of number of queues per port and descriptor
size. Renamed variable representing number of descriptors as nb_desc
from max_count.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2018-01-16 18:47:49 +01:00
Ivan Malov
7e9834276b net/sfc/base: remove Falcon-specific concurrency check
Falcon support has been withdrawn from libefx, however, there is still
an obsolete Falcon-specific assertion that efx_mac_stats_upload()
and efx_port_poll() aren't concurrent. To be consistent with an overall
Falcon support revocation it's desirable to remove it.

Fix debug build invalid assertion failure.

Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Fixes: 8c7c723dfe ("net/sfc/base: import MAC statistics")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
2a7e4bf28c net/sfc/base: move BIU test code into Siena-specific file
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
677cb89c9f net/sfc/base: fix PreFAST static analysis warning (C6001)
Fix warning
"C6001: Using uninitialized memory '*sensor_maskp'"
which could occur when the npages argument to efx_mcdi_sensor_info()
is less than or equal to zero.

Fixes: dfb3b1ce15 ("net/sfc/base: import monitors access via MCDI")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
61a87e4061 net/sfc/base: expand on comment on number of queues field
Expand on comment on RSS_CONTEXT_ALLOC_IN_NUM_QUEUES field.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
e138cb31d2 net/sfc/base: remove obsolete check for pre-Siena hardware
The fail4 label was used twice, so it doesn't need removing.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
a63faf8ccd net/sfc/base: fix warnings from VS2015 C compiler (C4214)
Fix multiple level 4 warnings
"C4214: nonstandard extension used: bit field types other than int";
no functional changes.

Fixes: f9565517ff ("net/sfc/base: import filters support")
Fixes: 457beb2c4d ("net/sfc/base: support filters for encapsulated packets")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
d6e43440d0 net/sfc/base: fix warnings from VS2015 C compiler (C4057)
Fix two level 4 warnings
"C4057: 'function': 'const uint8_t *' differs in indirection to
slightly different base types from 'caddr_t'"; no functional changes.

Fixes: 354df7eadf ("net/sfc/base: import bootrom configuration")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
7539590259 net/sfc/base: fix warnings from VS2015 C compiler (C4189)
Fix multiple level 4 warnings
"C4189: 'xxx': local variable is initialized but not referenced";
no functional changes.

Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base")
Fixes: dfb3b1ce15 ("net/sfc/base: import monitors access via MCDI")
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
698c68d6f2 net/sfc/base: fix warnings from VS2015 C compiler (C4100)
Fix multiple level 4 warnings
"C4100: 'xxx': unreferenced formal parameter"
no functional changes.

The _NOTE(ARGUNUSED(xxx)) annotations are being exposed to the Visual
Studio 2015 C compiler with the following:

    #define _NOTE_ARGUNUSED(...) UNREFERENCED_PARAMETER((__VA_ARGS__));
    #define _NOTE(_annotation)   _NOTE_ ## _annotation

Fixes: 099c33bef3 ("net/sfc/base: import MCDI proxy authorization")
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Fixes: 7243cc0869 ("net/sfc/base: import software per-queue statistics")
Fixes: d96a34d165 ("net/sfc/base: import NVRAM support")
Fixes: 05fce2ce84 ("net/sfc/base: import libefx licensing")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
0b2755fc10 net/sfc/base: fix warnings from VS2015 C compiler (C4245)
Fix level 4 warning
"C4245: 'initializing': conversion from 'int' to 'uint32_t',
signed/unsigned mismatch" warning; no functional changes.

Fixes: f9565517ff ("net/sfc/base: import filters support")
Fixes: daa007afd0 ("net/sfc/base: split local MAC I/G back into separate flags")
Fixes: 23c6d0dbac ("net/sfc/base: improve API to get supported filter matches")
Fixes: 457beb2c4d ("net/sfc/base: support filters for encapsulated packets")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
3526327689 net/sfc/base: fix warnings from VS2015 C compiler (C4244)
Fix level 4 warning
"C4244: '+=': conversion from 'unsigned int' to 'uint16_t', possible loss
of data"; no functional changes.

Fixes: 946ba3b694 ("net/sfc/base: import VPD support")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
e6df11c856 net/sfc/base: fix warnings from VS2015 C compiler (C4310)
Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.

Fixes: 354df7eadf ("net/sfc/base: import bootrom configuration")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
5e6602ecdb net/sfc/base: fix probes in licensing support
EFSYS_PROBE1 takes one typed value (in addition to the probe name),
whereas EFSYS_PROBE has just the probe name.

Which to use is determined by the probe name – “fail1” probes are
expected to include the function result.

Fixes: 05fce2ce84 ("net/sfc/base: import libefx licensing")
Cc: stable@dpdk.org

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
f893aeb4ed net/sfc/base: fix diagnostics support build without Siena
The compilation failed because __efx_sram_pattern_fns was used in
efx_nic.c, but defined in efx_sram.c which is only needed when
supporting Siena.

To fix it move all the code using __efx_sram_pattern_fns into
Siena-specific files (except for the definition in efx_sram.c itself,
as that file only needs to be included in Siena-supporting builds
anyway).

The functions to test registers and tables are unlikely to apply to any
new hardware and so can be moved into Siena files. Since Huntington
such tests have been implemented in firmware.

Fixes: 7571c31687 ("net/sfc/base: import diagnostics support")
Cc: stable@dpdk.org

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
f5e50fb628 net/sfc/base: allow to use PHY stats on Huntington/Medford
EFSYS_OPT_PHY_STATS can be used with Huntington or Medford, not just Siena.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
f67e471914 net/sfc/base: fix coding style
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
d90171aaaf net/sfc/base: remove unused defined for WPTR alignment
MEDFORD_RX_WPTR_ALIGN is not used.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Jackson
e6fba14511 net/sfc/base: support new sensors
Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
e68d3864fd net/sfc/base: add new sensors
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
d9aabcd72e net/sfc/base: move Siena-specific defs to right header
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Vijay Srivastava
f0afed09a6 net/sfc/base: fix build issue with PHY LED control enabled
Fixed build issue with the EFSYS_OPT_PHY_LED_CONTROL for Huntigton and
Medford.

Fixes: b1d06c75e3 ("net/sfc/base: import PHY LEDs control")
Fixes: 0a78643491 ("net/sfc/base: import PHY statistics")
Cc: stable@dpdk.org

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
8f64a99262 net/sfc/base: improve names for TXQ descriptor counts
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
201f052a37 net/sfc/base: improve names for RXQ descriptor counts
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
6de5190dd4 net/sfc/base: improve names for EVQ descriptor counts
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
37f8a41ad0 net/sfc/base: remove assertion on no longer used define
MC_CMD_INIT_RXQ_OUT_LEN is not used any more.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
9a57eee018 net/sfc/base: request info about outer frame in Rx events
For encapsulated packets, the firmware gives info about the inner frame
fields by default. When not using encapsulation offload, ask for info
about the outer frame instead.

On SFN8xxx with firmware version before v6.4.2.1007 driver reload is
needed after switching from full-feature to low-latency firmware
variant since the driver still thinks that firmware supports
encapsulation, but firmware does not tolerate request to provide info
about outer frame in Rx events.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
596b7d428d net/sfc/base: ignore error in completion event on MCDIv2 HW
With MCDIv2, the reponse length can be to big to fit into the
CMDDONE_DATALEN field in the MCDI completion event. But rather that
the length being truncated, it can overflow into the CMDDONE_ERRNO
field (this is a longstanding firmware bug). Hence the CMDDONE_ERRNO
field may not be valid.

It isn't necessary to use the value in the CMDDONE_ERRNO field though,
so it can be ignored. The actual error code is already read from the
response header on MCDIv2 capable hardware and stored in emr_rc, so
that can be used instead.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Mark Spender
0f55ea2b7a net/sfc/base: use MCDIv2 for requests with too long response
Use MCDIv2 for requests with a response size too long for MCDIv1.

Required for MC_CMD_MAC_STATS to reports the stats without using DMA.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00