Commit Graph

4007 Commits

Author SHA1 Message Date
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
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
Andrew Rybchenko
7fb0fbc8e1 net/sfc/base: support inner checksum offload on transmit
Inner checksum offloads may be used only if firmware supports
these tunnels.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
8890d7290f net/sfc/base: make MAC naming consistent with other modules
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 Rybchenko
ede62b5a56 net/sfc/base: more accurately calculate number of PS credits
Maximum number of packets per 64k buffer should be rounded up
when calculating number of credits by event queue size.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
c2b6023351 net/sfc/base: enforce packed stream fake buffer size
In the case of packed stream real size of the buffer does not fit in
Rx descriptor byte count. Real size is specified on Rx queue setup.
Non-zero fake should be used to bypass hardware checks.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
01ef400459 net/sfc/base: provide simple access to RxQ state in EvQ
Packed stream Rx datapath requires access to packed stream state
stored in event queue. Number of credits is upstead in event handler
on a new buffer, packets parsing on 64k boundary crossing and
Rx doorbell push to give credits back.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
3bdf5f1721 net/sfc/base: optimize credits overflow check
Apply check against firmware maximum just before pushing.
However, it does not save from overflow inside firmware,
if firmware still have some credits.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
d8115cadb3 net/sfc/base: clarify meaning of Rx desc lbits in PS mode
There is no point to add mask plus one before mask applying since it
still does not help to avoid overflow on subtract. Modulo mask
arithmetic works perfectly for unsigned integers of the same type.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
11e993ce52 net/sfc/base: add description of the PS packets layout
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
3e3317f7f6 net/sfc/base: improve RxQ label init prototype
RxQ type provides more information which may be useful to
setup event queue appropriately.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Rybchenko
1f0769246e net/sfc/base: improve PS credits push function name
Make it clear from the name that it pushes doorbell.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andrew Lee
f4891612e4 net/sfc/base: support MUM/SUC firmware partitions
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00
Andy Moreton
c14a991305 net/sfc/base: fix ignoring function return value
fix PreFAST issue, add missing annotation that function return value
should not be ignored. Fix alignment.

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

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-16 18:47:49 +01:00