Commit Graph

12146 Commits

Author SHA1 Message Date
Andrew Rybchenko
696a073001 net/sfc/base: sync MCDI headers and TLV layout
Regenerate MCDI and TLV layout headers from firmwaresrc to
pick up DPDK firmware variant and related Rx queue and filtering
extensions.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
3f2f0189dd net/sfc/base: add signed image layout support
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
1a8ceb4055 net/sfc/base: add firmware image layout option
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Vijay Srivastava
912e603706 net/sfc/base: add outer IP ID parameter to TSOv2 descriptor
Set outer_ip_id in the TX option descriptor for encapsulated packets.

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Vijay Srivastava
f16e00c6dc net/sfc/base: add encapsulated TSOv2 capability
Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
7ebb0460d6 net/sfc/base: support CTPIO stats
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
096cd34217 net/sfc/base: regenerate headers to pick up CTPIO stats
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Guido Barzini
a45c28824b net/sfc/base: add bit to indicate CTPIO availability
Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Guido Barzini
e05af47fd5 net/sfc/base: add CTPIO statistics
Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
e29dc43f93 net/sfc/base: run genfwdef to update headers
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Guido Barzini
c27347336b net/sfc/base: document the event type for CTPIO sends
Document the TX_EV_TYPE used for TX completion events corresponding
to CTPIO sends.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
373f9fe185 net/sfc/base: add 1.3V voltage and current sensors
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Guido Barzini
6117505a28 net/sfc/base: provide a flag for controlling CTPIO mode
Either cut-through or store-and-forward mode.

Signed-off-by: Guido Barzini <gbarzini@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
f79095529c net/sfc/base: add Medford2 support for tunnel encapsulations
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
62f544985d net/sfc/base: add Medford2 support for licensing
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
e782bf865d net/sfc/base: add Medford2 support for external port numbers
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
9fa69746a2 net/sfc/base: group Medford external port mapping entries
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
1a04c2d163 net/sfc/base: clarify port mode names and masks
New port mode names are defined for Medford2 and later, and
the existing names are aliased to them. Add comments with the
numeric port mode to clarify the external port modes table.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
75ff34e83e net/sfc/base: support Medford2 event timer semantics
The event timer interface has changed for Medford2 - for
details see bug66418 comment 9. Update the common code to
use the new timer semantics for Medford2.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
665d7b9aa1 net/sfc/base: support FEC mode settings
Medford2 controllers support control and reporting of
FEC modes for 25G and higher links. See SF-109306-TC
for suggested usage in client code.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
ec79c42c6d net/sfc/base: remove obsolete comments
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
5858ad96ce net/sfc/base: move VI window size config to ef10 NIC board
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
1e2fa1e1fa net/sfc/base: move privilege config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
01a22b15b4 net/sfc/base: move vector config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
107cf1d792 net/sfc/base: move limits config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
9bd777a7e6 net/sfc/base: move Tx config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
32a3020461 net/sfc/base: move Rx config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
04dbe8e6d4 net/sfc/base: move datapath config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
77b5cbfe48 net/sfc/base: move PHY/link config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
fa7e671a08 net/sfc/base: move legacy board config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
08d38249bc net/sfc/base: move MAC address config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
579c1e6f2e net/sfc/base: move PF/VF config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
7cd282350e net/sfc/base: move port config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
540a928bdd net/sfc/base: add ef10 NIC board config method
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
3cef86b503 net/sfc/base: use correct name for frame truncation event
The RX_ECC_ERR flag in RX events was misnamed, as it
reported frame truncation. Use the new RX_TRUNC_ERR
name for this flag.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
e936b53ce4 net/sfc/base: remove MAC stats size define
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andrew Rybchenko
c953aea983 net/sfc: size MAC stats DMA buffer to support Medford2
Medford2 supports more MAC stats than previous HW. So DMA
buffer must be sized properly.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Richard Houldsworth
667d40513f net/sfc/base: resolve code analysis warnings
Minimal changes adding buffer size checks and simplifying checksum
processing.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
400ba3daee net/sfc/base: decode Medford2 FEC stats if available
Decode Medford2 FEC stats if available in MAC stats DMA buffer.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
d4b6631b89 net/sfc/base: run mkconfig.py to add FEC MAC stats
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
cf89d0c9ed net/sfc/base: use MAC stats DMA buffer size when decoding
On Medford2 and later the MAC stats buffer has been enlarged.
Use the MAC stats DMA buffer size to ensure that the stats END
generation count is read from the correct location, and that
over-reading of the DMA buffer is prevented.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
e5d5a7983e net/sfc/base: use MAC stats DMA buffer size from caps
For Medford2 the DMA buffer used for one-shot or periodic MAC stats
has been extended. Ensure the MAC stats DMA buffer size is large
enough to hold the number of stats counters supported by firmware.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
0edb4ecbe8 net/sfc/base: improve robustness of MAC stats get via MCDI
Previously the code relied on the callers of efx_mcdi_mac_stats
to provide a DMA buffer or NULL depending on the action. Fix
this so that the DMA buffer is only passed in the request when
needed, and that an error is reported for a missing DMA buffer.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
96cab03ded net/sfc/base: retrieve number of MAC stats from NIC
This reports the number of stats (and hence the DMA buffer size)
for MAC stats. If MC_GET_CAPABABILITIES_V4 is not supported then
use the legacy Siena-compatible MC_CMD_MAC_NSTATS value.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
4aab7f07a6 net/sfc/base: refactor EF10 get datapath capabilities
Inline efx_mcdi_get_capabilities() to prepare for reading
newer capabilities response versions.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
1eb735b2c8 net/sfc/base: handle new speeds in link events
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
9768b715c6 net/sfc/base: add efsys macro to get memory region size
EFSYS_MEM_SIZE() reports the DMA mapped size of an efsys_mem_t
allocated region (the allocation size may be different due to
memory allocator and DMA alignment restrictions).

This ensures that common code internals have explicit knowledge
of the usable size of DMA mapped memory regions.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
f1ba8c27fd net/sfc/base: add new loopback modes
Report supported loopback modes for new Medford2 link speeds.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
a1527a3a9e net/sfc/base: support new link modes
Add basic support for new link modes for Medford2.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
0d854a2f07 net/sfc/base: simplify loopback type checking
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00