Adrien Mazarguil [Thu, 23 Nov 2017 17:37:58 +0000 (18:37 +0100)]
net/mlx4: fix documentation in private structure
A couple of structure fields are not Doxygen-friendly.
Fixes:
5db1d364086e ("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>
Adrien Mazarguil [Thu, 23 Nov 2017 17:37:56 +0000 (18:37 +0100)]
net/mlx4: fix unnecessary include
Fixes:
a2ce2121c01c ("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>
Nélio Laranjeiro [Mon, 20 Nov 2017 15:35:47 +0000 (16:35 +0100)]
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:
f5fde5205101 ("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>
Jerin Jacob [Tue, 28 Nov 2017 13:22:38 +0000 (18:52 +0530)]
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>
Alejandro Lucero [Fri, 24 Nov 2017 15:31:49 +0000 (15:31 +0000)]
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>
Alejandro Lucero [Fri, 24 Nov 2017 14:26:02 +0000 (14:26 +0000)]
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:
defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Alejandro Lucero [Fri, 24 Nov 2017 14:24:37 +0000 (14:24 +0000)]
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:
defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Alejandro Lucero [Fri, 24 Nov 2017 14:23:48 +0000 (14:23 +0000)]
net/nfp: fix MTU settings
The wrong mtu length was used for configuring the hardware. The
max_rx_pktlen reported was also wrong.
Fixes:
defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Ilya V. Matveychikov [Tue, 14 Nov 2017 12:42:20 +0000 (16:42 +0400)]
net/bnxt: remove unused field from Rx queue struct
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Jacek Piasecki [Tue, 8 Aug 2017 12:56:43 +0000 (14:56 +0200)]
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:
6d72657ce379 ("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>
Shahaf Shuler [Wed, 29 Nov 2017 11:29:08 +0000 (13:29 +0200)]
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>
Shahaf Shuler [Wed, 29 Nov 2017 11:29:07 +0000 (13:29 +0200)]
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>
Raslan Darawsheh [Sun, 12 Nov 2017 14:36:22 +0000 (16:36 +0200)]
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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:36 +0000 (10:22 +0100)]
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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:35 +0000 (10:22 +0100)]
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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:34 +0000 (10:22 +0100)]
net/mlx5: remove 32-bit support
naddr variable was introduced in
commit
9a7fa9f76d9e ("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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:33 +0000 (10:22 +0100)]
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:
87ec44ce1651 ("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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:22:32 +0000 (10:22 +0100)]
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>
Nélio Laranjeiro [Thu, 23 Nov 2017 09:30:21 +0000 (10:30 +0100)]
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>
Thierry Herbelot [Fri, 17 Nov 2017 13:51:34 +0000 (14:51 +0100)]
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:
a4193ae3bc4f ("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>
Shijith Thotton [Mon, 20 Nov 2017 11:59:51 +0000 (17:29 +0530)]
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>
Ivan Malov [Mon, 20 Nov 2017 11:01:36 +0000 (11:01 +0000)]
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:
19b64c6ac35f ("net/sfc/base: import libefx base")
Fixes:
8c7c723dfe7c ("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>
Mark Spender [Thu, 16 Nov 2017 08:04:41 +0000 (08:04 +0000)]
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>
Andrew Lee [Thu, 16 Nov 2017 08:04:40 +0000 (08:04 +0000)]
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:
dfb3b1ce15f6 ("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>
Mark Spender [Thu, 16 Nov 2017 08:04:39 +0000 (08:04 +0000)]
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>
Mark Spender [Thu, 16 Nov 2017 08:04:38 +0000 (08:04 +0000)]
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>
Andrew Lee [Thu, 16 Nov 2017 08:04:37 +0000 (08:04 +0000)]
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:
f9565517ff4f ("net/sfc/base: import filters support")
Fixes:
457beb2c4d3e ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:36 +0000 (08:04 +0000)]
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:
354df7eadf66 ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:35 +0000 (08:04 +0000)]
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:
19b64c6ac35f ("net/sfc/base: import libefx base")
Fixes:
dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
Fixes:
e7cd430c864f ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:34 +0000 (08:04 +0000)]
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:
099c33bef343 ("net/sfc/base: import MCDI proxy authorization")
Fixes:
e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes:
7243cc0869f8 ("net/sfc/base: import software per-queue statistics")
Fixes:
d96a34d165b1 ("net/sfc/base: import NVRAM support")
Fixes:
05fce2ce8451 ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:33 +0000 (08:04 +0000)]
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:
f9565517ff4f ("net/sfc/base: import filters support")
Fixes:
daa007afd04b ("net/sfc/base: split local MAC I/G back into separate flags")
Fixes:
23c6d0dbac80 ("net/sfc/base: improve API to get supported filter matches")
Fixes:
457beb2c4d3e ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:32 +0000 (08:04 +0000)]
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:
946ba3b6941a ("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>
Andrew Lee [Thu, 16 Nov 2017 08:04:31 +0000 (08:04 +0000)]
net/sfc/base: fix warnings from VS2015 C compiler (C4310)
Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.
Fixes:
354df7eadf66 ("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>
Mark Spender [Thu, 16 Nov 2017 08:04:30 +0000 (08:04 +0000)]
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:
05fce2ce8451 ("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>
Mark Spender [Thu, 16 Nov 2017 08:04:29 +0000 (08:04 +0000)]
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:
7571c3168798 ("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>
Mark Spender [Thu, 16 Nov 2017 08:04:28 +0000 (08:04 +0000)]
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>
Andy Moreton [Thu, 16 Nov 2017 08:04:27 +0000 (08:04 +0000)]
net/sfc/base: fix coding style
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:26 +0000 (08:04 +0000)]
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>
Andrew Jackson [Thu, 16 Nov 2017 08:04:25 +0000 (08:04 +0000)]
net/sfc/base: support new sensors
Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:24 +0000 (08:04 +0000)]
net/sfc/base: add new sensors
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:23 +0000 (08:04 +0000)]
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>
Vijay Srivastava [Thu, 16 Nov 2017 08:04:22 +0000 (08:04 +0000)]
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:
b1d06c75e32c ("net/sfc/base: import PHY LEDs control")
Fixes:
0a7864349106 ("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>
Andy Moreton [Thu, 16 Nov 2017 08:04:21 +0000 (08:04 +0000)]
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>
Andy Moreton [Thu, 16 Nov 2017 08:04:20 +0000 (08:04 +0000)]
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>
Andy Moreton [Thu, 16 Nov 2017 08:04:19 +0000 (08:04 +0000)]
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>
Mark Spender [Thu, 16 Nov 2017 08:04:18 +0000 (08:04 +0000)]
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>
Mark Spender [Thu, 16 Nov 2017 08:04:17 +0000 (08:04 +0000)]
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>
Mark Spender [Thu, 16 Nov 2017 08:04:16 +0000 (08:04 +0000)]
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>
Mark Spender [Thu, 16 Nov 2017 08:04:15 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:14 +0000 (08:04 +0000)]
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>
Andy Moreton [Thu, 16 Nov 2017 08:04:13 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:12 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:11 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:10 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:09 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:08 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:07 +0000 (08:04 +0000)]
net/sfc/base: add description of the PS packets layout
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:06 +0000 (08:04 +0000)]
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>
Andrew Rybchenko [Thu, 16 Nov 2017 08:04:05 +0000 (08:04 +0000)]
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>
Andrew Lee [Thu, 16 Nov 2017 08:04:04 +0000 (08:04 +0000)]
net/sfc/base: support MUM/SUC firmware partitions
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:03 +0000 (08:04 +0000)]
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:
19b64c6ac35f ("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>
Andy Moreton [Thu, 16 Nov 2017 08:04:02 +0000 (08:04 +0000)]
net/sfc/base: quieten get version methods
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:01 +0000 (08:04 +0000)]
net/sfc/base: remove duplicate NVRAM asserts
The checking performed in the ->envo_type_to_partn
internal method make these assertions unnecessary.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:04:00 +0000 (08:04 +0000)]
net/sfc/base: precheck and verify flash writes
Read existing flash content before writing, so the flash write can be
avoided if the existing partition content matches the new image. This
avoids unnecessary write cycles for the flash device, and may also be
faster. If the flash does need to be updated, verify the content after
writing.
Note that reading the flash content after writing but before calling
efx_nvram-rw_finish() avoids firmware bug68170, which can lead to
signed image updates failing on Medford.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:59 +0000 (08:03 +0000)]
net/sfc/base: fix check in NVRAM validate
Fixes:
d96a34d165b1 ("net/sfc/base: import NVRAM support")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:58 +0000 (08:03 +0000)]
net/sfc/base: report correct partition write chunk size
If the firmware reports a non-zero write chunk size then nvram writes
may fail if a different granularity is used (e.g. for MUM firmware on
Sorrento).
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:57 +0000 (08:03 +0000)]
net/sfc/base: check NVRAM locking by partition ID
Tracking which partition is locked avoids being overly conservative
when EFX_NVRAM_xxx maps to more than one partition (depnding on the
current port number).
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:56 +0000 (08:03 +0000)]
net/sfc/base: simplify NVRAM type to partition mappings
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:55 +0000 (08:03 +0000)]
net/sfc/base: rename firmware update verify result cap field
The existing name confuses support for secure boot with
support for reporting a verify result after an NVRAM update.
As the capability only reports support for returning a verify
result, change the name to be less confusing.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:54 +0000 (08:03 +0000)]
net/sfc/base: extend NVRAM RW finish to return verify result
Extend efx_nvram_rw_finish() to return firmware verify result code.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:53 +0000 (08:03 +0000)]
net/sfc/base: report verify result from RW finish callback
This makes the verify result visible to efx_nvram_rw_finish(), which
can be extended to report it in a later patch.
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:52 +0000 (08:03 +0000)]
net/sfc/base: simplify verify result handling
Simplify verify result handling in NVRAM update finish
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andy Moreton [Thu, 16 Nov 2017 08:03:51 +0000 (08:03 +0000)]
net/sfc/base: fix result code in MCDI NVRAM update finish
Fixes:
d96a34d165b1 ("net/sfc/base: import NVRAM support")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Mark Spender [Thu, 16 Nov 2017 08:03:50 +0000 (08:03 +0000)]
net/sfc/base: do not use Tx desc push with TSO descriptors
Pushing TSO option descriptors is unsafe if pacer bypass is enabled,
so to make sure that doesn't happen never push TSO option descriptors.
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Jackson [Thu, 16 Nov 2017 08:03:49 +0000 (08:03 +0000)]
net/sfc/base: copy new header from firmware src
Signed-off-by: Andrew Jackson <ajackson@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Zhiyong Yang [Mon, 15 Jan 2018 07:55:06 +0000 (15:55 +0800)]
lib: remove unnecessary pointer cast
void * pointer can be assigned to any data type pointer.
Unnecessary cast can be removed in order to keep code clearer.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Erik Gabriel Carrillo [Fri, 12 Jan 2018 21:31:05 +0000 (15:31 -0600)]
timer: fix reset on service cores
The return value of rte_lcore_has_role is misinterpreted in the timer
reset function. The return values of rte_lcore_has_role will be changed
in a future DPDK release, but this commit fixes this call site until
that happens.
Fixes:
351f463456f8 ("timer: allow reset on service cores")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Avi Kivity [Mon, 15 Jan 2018 11:33:23 +0000 (13:33 +0200)]
eal: remove another use of register keyword
The 'register' keyword does nothing, and has been removed in C++17.
Remove it for compatibility, like following commit:
Fixes:
0d5f2ed12f9e ("eal: remove use of register keyword")
Signed-off-by: Avi Kivity <avi@scylladb.com>
Nikhil Agarwal [Tue, 12 Dec 2017 10:08:26 +0000 (15:38 +0530)]
examples/l3fwd-power: disable link status interrupt
This application does not need Link Status Interrupt.
It will cause failure for the platforms not supporting LSC.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
Nikhil Agarwal [Tue, 12 Dec 2017 10:08:25 +0000 (15:38 +0530)]
examples/l3fwd-power: replace desc done with Rx queue count
HW queue based platforms may not support descriptor done API.
This patch changes the usages to rx_queue_count API, which
is more generic.
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
Nikhil Agarwal [Tue, 12 Dec 2017 10:08:24 +0000 (15:38 +0530)]
examples/l3fwd-power: fix frequency detection
The code assumes that the platform frequency is 2GHz.
This patch add support for dynamically detecting platform frequence.
Fixes:
d7937e2e3d12 ("power: initial import")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
Nikhil Agarwal [Tue, 12 Dec 2017 10:08:23 +0000 (15:38 +0530)]
examples/l3fwd-power: fix Rx without interrupt
This existing code cause the platform to start receiving packet
immediately irrespective of interrupts available or not.
If the platform does not support Rx interrupt, it shall not start
receiving packets immediately. It shall let the timer management work.
Fixes:
aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
Stephen Hemminger [Mon, 11 Dec 2017 23:12:58 +0000 (15:12 -0800)]
examples/l3fwd: set CLI back to Unix style
The l3fwd program became chatty, and the code looks cluttered in
recent versions. DPDK programs should try for Unix (not VMS) style
and not print messages for the options user selected. Also, errors should
be printed on stderr. To make it easier to find code matching error
messages; error strings should be placed in situ rather than saved
as string vaiables.
Fixes:
268888b5b020 ("examples/l3fwd: modularize")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Pavan Nikhilesh [Tue, 2 Jan 2018 09:53:08 +0000 (15:23 +0530)]
examples/l2fwd: increase pktmbuf pool size
Make pktmbuf pool size a function of ports and lcores detected instead
of using constant 8192.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Prashant Bhole [Mon, 11 Dec 2017 07:31:29 +0000 (16:31 +0900)]
examples: remove unnecessary dev info queries
Removed rte_eth_dev_info_get() calls and declaration of
struct rte_eth_dev_info where info is not used anymore.
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xueming Li [Thu, 7 Dec 2017 14:52:02 +0000 (22:52 +0800)]
cmdline: support backspace key
Support windows putty "\b"(Ctrl-H) backspace key.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Wisam Jaddo [Sun, 14 Jan 2018 08:27:10 +0000 (10:27 +0200)]
app/testpmd: add ethernet peer command
This command will simulate the process of setting the
eth-peer from command line.
It will be useful to perform extra testing.
usage:
testpmd> set eth-peer <port_id> <peer_addr>.
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:19 +0000 (11:09 +0200)]
app/testpmd: enable fast free Tx offload by default
Enable the DEV_TX_OFFLOAD_MBUF_FAST_FREE in case the underlying device
supports.
This is to preserve the previous offloads configuration made according
to the PMD defaults.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:18 +0000 (11:09 +0200)]
app/testpmd: adjust on the fly VLAN configuration
On ethdev there is an API to configure VLAN offloads after the port
was started and without reconfiguration of the port or queues.
In the current design of the application, when the Rx offloads are
changed (through "port config all" CLI command) the port configuration
is overwritten, therefore the configuration made for the VLAN is lost.
This patch is to address the issue by a configuration of each port Rx
offloads separately instead of using the global Rx config. Such
adjustment is required due to the conversion of the application to the
new offloads API.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:17 +0000 (11:09 +0200)]
app/testpmd: enforce offload capabilities check
In the current design it was possible for offload to be set even though
the device is not supporting it. A warning message was printed instead.
This is a wrong behaviour, as application should set only the offloads
reported by the capabilities of the device.
This patch adds verification for the offloads being set and make sure
the offload configuration passed to the device always match its
capabilities.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:16 +0000 (11:09 +0200)]
app/testpmd: remove txqflags option
Since testpmd is now using the new Ethdev offloads API and there is
a way configure each of the tx offloads from CLI or command line,
there is no need for the txqflags configuration anymore.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:15 +0000 (11:09 +0200)]
app/testpmd: add command line option for Tx offloads
This patch adds command line option to set hex value for the ports Tx
offloads flags.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:14 +0000 (11:09 +0200)]
app/testpmd: cleanup internal Tx offloads flags field
The tx_ol_flags field was used in order to control the different
Tx offloads set. After the conversion to the new Ethdev Tx offloads API
it is not needed anymore as the offloads configuration is stored in
ethdev structs.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:13 +0000 (11:09 +0200)]
app/testpmd: fix flowgen forwarding offload flags
The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.
addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.
Fixes:
e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:12 +0000 (11:09 +0200)]
app/testpmd: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:
commit
cba7f53b717d ("ethdev: introduce Tx queue offloads API")
Convert the application to use the new API.
This patch mandates the port to be stopped when configure the Tx
offloads. This is because the PMD must be aware to the offloads changes
on the device and queue configuration.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:11 +0000 (11:09 +0200)]
app/testpmd: add function to check port stopped
This patch adds supports for checking if a single port is stopped.
currently there is a function to check only for all ports.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:10 +0000 (11:09 +0200)]
app/testpmd: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:
commit
ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Convert the application to use the new API. The is no functionality
changes rather simple conversion of the flags.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Shahaf Shuler [Wed, 10 Jan 2018 09:09:09 +0000 (11:09 +0200)]
app/testpmd: fix port configuration print
The print of the port configuration was only according to configuration
of the first port.
Fixes:
f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Pavan Nikhilesh [Sun, 24 Dec 2017 12:47:56 +0000 (18:17 +0530)]
mempool/octeontx: fix memory area registration
Clean up the dependency between alloc and memory area registration, this
removes the need for SLIST data structure and octeontx_pool_list.
Fixes:
2baa3f0b7de5 ("mempool/octeontx: support memory area ops")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Pavan Nikhilesh [Sun, 24 Dec 2017 12:47:55 +0000 (18:17 +0530)]
mempool: fix first memory area notification
Mempool creation needs to be completed first before notifying mempool to
register the mempool area.
Fixes:
12b8cc1a7e86 ("mempool: notify memory area to pool")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>