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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>