Commit Graph

35782 Commits

Author SHA1 Message Date
Vincenzo Maffione
d55913f555 netmap: set IFCAP_NETMAP in if_capabilities
Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP
in if_capabilities on netmap_attach. This patch reverts this change.

Reviewed by:	np
Approved by:	gnn (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D17987
2018-11-28 14:07:34 +00:00
Andrew Rybchenko
4142e8cfbb sfxge(4): add outer IP ID parameter to TSOv2 descriptor
Set outer_ip_id in the TX option descriptor for encapsulated packets.

Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18213
2018-11-28 09:25:43 +00:00
Andrew Rybchenko
357c2ebbb4 sfxge(4): add encapsulated TSOv2 capability
Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18212
2018-11-28 09:25:31 +00:00
Andrew Rybchenko
74d36c847b sfxge(4): support CTPIO stats
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18211
2018-11-28 09:25:21 +00:00
Andrew Rybchenko
2fdc432ccd sfxge(4): regenerate headers to pick up CTPIO stats
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18210
2018-11-28 09:25:09 +00:00
Andrew Rybchenko
1845c6b478 sfxge(4): add bit to indicate CTPIO availability
Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18209
2018-11-28 09:24:58 +00:00
Andrew Rybchenko
a905810049 sfxge(4): add CTPIO statistics
Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18208
2018-11-28 09:24:47 +00:00
Andrew Rybchenko
6d522ee0fc sfxge(4): run genfwdef to update headers
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18207
2018-11-28 09:24:36 +00:00
Andrew Rybchenko
a9abe8d9e9 sfxge(4): document the event type for CTPIO sends
Document the TX_EV_TYPE used for TX completion events corresponding
to CTPIO sends.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18206
2018-11-28 09:24:25 +00:00
Andrew Rybchenko
4db0da6420 sfxge(4): add 1.3V voltage and current sensors
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18205
2018-11-28 09:24:14 +00:00
Andrew Rybchenko
9a9a7fab24 sfxge(4): provide a flag for controlling CTPIO mode
Either cut-through or store-and-forward mode.

Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18204
2018-11-28 09:24:03 +00:00
Andrew Rybchenko
edaff290d6 sfxge(4): add Medford2 support for tunnel encapsulations
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18203
2018-11-28 09:23:52 +00:00
Andrew Rybchenko
ef3b3edeb6 sfxge(4): add Medford2 support for licensing
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18202
2018-11-28 09:23:41 +00:00
Andrew Rybchenko
f83ec5160d sfxge(4): add Medford2 support for external port numbers
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18201
2018-11-28 09:23:30 +00:00
Andrew Rybchenko
259a7b375b sfxge(4): group Medford external port mapping entries
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18200
2018-11-28 09:23:19 +00:00
Andrew Rybchenko
b14569a458 sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18199
2018-11-28 09:23:05 +00:00
Andrew Rybchenko
2222409ba1 sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18198
2018-11-28 09:22:53 +00:00
Andrew Rybchenko
ffde74241a sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18197
2018-11-28 09:22:42 +00:00
Andrew Rybchenko
e4c4abb28f sfxge(4): remove obsolete comments
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18196
2018-11-28 06:56:34 +00:00
Andrew Rybchenko
76ecd4a37b sfxge(4): move VI window size config to ef10 NIC board
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18195
2018-11-28 06:56:22 +00:00
Andrew Rybchenko
26fcca572d sfxge(4): move privilege config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18194
2018-11-28 06:56:11 +00:00
Andrew Rybchenko
61e0c16d1c sfxge(4): move vector config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18193
2018-11-28 06:55:59 +00:00
Andrew Rybchenko
ff8ff86654 sfxge(4): move limits config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18192
2018-11-28 06:55:47 +00:00
Andrew Rybchenko
40f5e54c62 sfxge(4): move Tx config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18191
2018-11-28 06:55:36 +00:00
Andrew Rybchenko
69aff9bb81 sfxge(4): move Rx config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18190
2018-11-28 06:55:24 +00:00
Andrew Rybchenko
deeaf87ffb sfxge(4): move datapath config to ef10 NIC board cfg
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18189
2018-11-28 06:55:12 +00:00
Andrew Rybchenko
e5f6f32f25 sfxge(4): move PHY/link config to ef10 NIC board cfg
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18188
2018-11-28 06:55:00 +00:00
Andrew Rybchenko
233c1e5e89 sfxge(4): move legacy board config to ef10 NIC board cfg
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18187
2018-11-28 06:54:49 +00:00
Andrew Rybchenko
d36ea92c49 sfxge(4): move MAC address config to ef10 NIC board cfg
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18186
2018-11-28 06:54:37 +00:00
Andrew Rybchenko
17f272e7a7 sfxge(4): move PF/VF config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18185
2018-11-28 06:54:25 +00:00
Andrew Rybchenko
09eac95749 sfxge(4): move port config to ef10 NIC board config
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18184
2018-11-28 06:54:13 +00:00
Andrew Rybchenko
daf72d82e0 sfxge(4): pacify false positive warning
The warning says that it may be usage of possibly uninitialized value.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18183
2018-11-28 06:54:02 +00:00
Andrew Rybchenko
481943395d sfxge(4): add ef10 NIC board config method
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18182
2018-11-28 06:53:51 +00:00
Andrew Rybchenko
8bff5a20fb sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18181
2018-11-28 06:53:40 +00:00
John Baldwin
2d714dbcc7 Add read-only sysctls for all tunables in the cxgbe(4) driver.
Reviewed by:	np
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D18360
2018-11-27 22:02:54 +00:00
Andrew Rybchenko
9361c4ad4e sfxge(4): remove MAC stats size define
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18180
2018-11-27 14:16:14 +00:00
Andrew Rybchenko
a98c7b04ae sfxge(4): resolve code analysis warnings
Minimal changes adding buffer size checks and simplifying checksum
processing.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18179
2018-11-27 14:16:03 +00:00
Andrew Rybchenko
747819d260 sfxge(4): decode Medford2 FEC stats if available
Decode Medford2 FEC stats if available in MAC stats DMA buffer.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18178
2018-11-27 14:15:52 +00:00
Andrew Rybchenko
79300430e3 sfxge(4): run mkconfig.py to add FEC MAC stats
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18177
2018-11-27 14:15:41 +00:00
Andrew Rybchenko
fdfd8bfee9 sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18176
2018-11-27 14:15:30 +00:00
Andrew Rybchenko
6c54b7b61f sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18175
2018-11-27 14:15:19 +00:00
Andrew Rybchenko
670be9dddf sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18174
2018-11-27 14:15:08 +00:00
Andrew Rybchenko
807145d9f6 sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18173
2018-11-27 14:14:57 +00:00
Andrew Rybchenko
016941e371 sfxge(4): refactor EF10 get datapath capabilities
Inline efx_mcdi_get_capabilities() to prepare for reading
newer capabilities response versions.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18172
2018-11-27 14:14:45 +00:00
Andrew Rybchenko
f50efe9ac2 sfxge(4): handle new speeds in link events
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18170
2018-11-27 13:00:51 +00:00
Andrew Rybchenko
4aaefb9559 sfxge(4): 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.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18170
2018-11-27 13:00:39 +00:00
Andrew Rybchenko
725bb178d3 sfxge(4): add new loopback modes
Report supported loopback modes for new Medford2 link speeds.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18169
2018-11-27 13:00:28 +00:00
Andrew Rybchenko
d81df2213e sfxge(4): support new link modes
Add basic support for new link modes for Medford2.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18168
2018-11-27 13:00:17 +00:00
Andrew Rybchenko
e5be75536a sfxge(4): removing unneeded assert
Remove ASSERT() from sfxge_link_mode_to_phy_cap() which causes an
unnecessary panic, even though the callers have proper error handling.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18167
2018-11-27 13:00:06 +00:00
Andrew Rybchenko
4add9918a6 sfxge(4): simplify loopback type checking
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18166
2018-11-27 12:59:55 +00:00