Commit Graph

32 Commits

Author SHA1 Message Date
Pedro F. Giffuni
718cf2ccb9 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 14:52:40 +00:00
Andrew Rybchenko
a7668ace83 sfxge(4): cleanup: remove unused soft context struct member rxq_cache
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2017-01-27 08:54:33 +00:00
Andrew Rybchenko
58223d5b7a sfxge(4): add tunable to configure MAC stats update period
Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9151
2017-01-12 13:00:17 +00:00
Andrew Rybchenko
62f5c49637 sfxge(4): stats refresh in SW should depend on HW update period
The period should be taken into account by the function which
refreshes driver stats.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9130
2017-01-12 06:30:44 +00:00
Andrew Rybchenko
1eec14756f sfxge(4): treat EFX_LINK_UNKOWN as link down
It is safer to consider EFX_LINK_UNKNOWN as link down.
link_mode is set to EFX_LINK_UNKNOWN on port stop and fini.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9060
2017-01-07 10:52:02 +00:00
Andrew Rybchenko
44fcad033f sfxge(4): do not limit driver RSS table to RSS channels max
Specification of entire RSS table in the driver allows to spread traffic
more equally across CPUs/RSS channels if number of RSS channels is not
power of 2.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D8910
2016-12-27 08:51:26 +00:00
Andrew Rybchenko
84bcd65e0f sfxge(4): cope with code duplication on SW events composition
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D6666
2016-06-01 06:51:19 +00:00
Andrew Rybchenko
e1399ed7a2 sfxge(4): avoid code duplication in SW events definition
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D6662
2016-05-31 20:54:42 +00:00
Andrew Rybchenko
9885e222ea sfxge(4): move definition of the SW events to sfxge.h
Tx flush done event is defined and Rx-specific header is not a good
place for it.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-05-31 18:34:39 +00:00
Andrew Rybchenko
929c7feb83 sfxge(4): cleanup: update copyright to 2016
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6509
2016-05-24 12:16:57 +00:00
Gleb Smirnoff
009d75e764 Use m_getjcl() instead of manually selecting zone.
Reviewed by:	arybchik
2016-01-28 16:51:56 +00:00
Andrew Rybchenko
a45a0da19c sfxge: support FATSOv2
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4934
2016-01-15 06:25:26 +00:00
Andrew Rybchenko
9c2c444b10 sfxge: support for MCDI logging implemented
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4355
2015-12-05 07:04:11 +00:00
Andrew Rybchenko
3c838a9f51 sfxge: add 7xxx NICs family support
Support 7xxx adapters including firmware-assisted TSO and VLAN tagging:

  - Solarflare Flareon Ultra 7000 series 10/40G adapters:
    - Solarflare SFN7042Q QSFP+ Server Adapter
    - Solarflare SFN7142Q QSFP+ Server Adapter

  - Solarflare Flareon Ultra 7000 series 10G adapters:
    - Solarflare SFN7022F SFP+ Server Adapter
    - Solarflare SFN7122F SFP+ Server Adapter
    - Solarflare SFN7322F Precision Time Synchronization Server Adapter

  - Solarflare Flareon 7000 series 10G adapters:
    - Solarflare SFN7002F SFP+ Server Adapter

Support utilities to configure adapters and update firmware.

The work is done by Solarflare developers
(Andy Moreton, Andrew Lee and many others),
Artem V. Andreev <Artem.Andreev at oktetlabs.ru> and me.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 weeks
Causually read by: gnn
Differential Revision: https://reviews.freebsd.org/D2618
2015-05-25 08:34:55 +00:00
Andrew Rybchenko
919c8da4c5 sfxge: cleanup: add a blank line before each #if to improve readability
Sponsored by:   Solarflare Communications, Inc.
2015-03-24 11:25:19 +00:00
Andrew Rybchenko
a411fe4e80 sfxge: remove obsolete Tx non-multi queue support
Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier
versions support.

Sponsored by:   Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2081
2015-03-23 15:47:37 +00:00
Andrew Rybchenko
3d8fce2701 sfxge: implement if_get_counter callback
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-22 19:25:57 +00:00
Andrew Rybchenko
097de6f518 sfxge: add driver context member with number of event queues
Mainly to unify with similar member for transmit and receive queues.
It will be used in the future for resources allocation processing.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:21:59 +00:00
Andrew Rybchenko
133366a6e5 sfxge: add driver context member with number of receive queues
Mainly to unify with similar member for transmit queues.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:20:59 +00:00
Andrew Rybchenko
e2b05fe21c sfxge: add driver context member with number of transmit queues
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:19:35 +00:00
Andrew Rybchenko
33d45dc5e4 sfxge: make lock names unique
Lock name should include interface name.
Tx queue and event queue lock name should include queue number.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-05 11:39:15 +00:00
Andrew Rybchenko
763cab7173 sfxge: Add macros to init, destroy, acquire, release and assert locks
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-04 20:03:57 +00:00
Andrew Rybchenko
d9e49c8352 sfxge: implemented parameter to restrict RSS channels
Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 19:09:14 +00:00
Andrew Rybchenko
76c8553679 sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t
Remove the first member alignment to cacheline since it is nop.
Use __aligned() for the whole structure to make sure that the structure
size is cacheline aligned.
Remove lock alignment to make the structure smaller and fit all members
used on event queue processing into one cacheline (128 bytes) on x86-64.
The lock is obtained as well from different context when event queue
statistics are retrived from sysctl context, but it is infrequent.
Reorder members to avoid padding and go in usage order on event
processing.
As the result all structure members used on event queue processing fit
into exactly one cacheline (128 byte) now.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:57:27 +00:00
Andrew Rybchenko
fe9000816a sfxge: Make it possible to build without EVQ statistics
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:54:43 +00:00
Andrew Rybchenko
b64af6b0fb sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access
It was the only place on data path where sc->evq array is accessed.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-01-29 18:50:25 +00:00
George V. Neville-Neil
bc85c897c7 The patch allows to check state of the software Tx queues at run time.
Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2014-09-30 20:43:21 +00:00
George V. Neville-Neil
385b1d8e67 Make size of Tx and Rx rings configurable
Required size of event queue is calculated now.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2014-09-30 20:36:07 +00:00
George V. Neville-Neil
b7b0edd17c cleanup: code style fixes
Remove trailing whitespaces and tabs.
Enclose value in return statements in parentheses.
Use tabs after #define.
Do not skip comparison with 0/NULL in boolean expressions.

Submitted by:   Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2014-09-30 20:18:10 +00:00
Gleb Smirnoff
76039bc84f The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-26 17:58:36 +00:00
Philip Paeps
76a869385c sfxge: Remove interrupt self-test code
It's not currently used; it didn't build on 32-bit and the previous build fix
is incorrect.  If we really implement self-tests we can do this again
properly.

Submitted by:	Ben Hutchings <bwh -at- solarflare.com>
MFC after:	3 weeks
2011-11-19 09:16:52 +00:00
Philip Paeps
e948693ed7 Add the sfxge(4) device driver, providing support for 10Gb Ethernet adapters
based on Solarflare SFC9000 family controllers.  The driver supports jumbo
frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO),
Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side
Scaling (RSS) using MSI-X interrupts.

This work was sponsored by Solarflare Communications, Inc.

My sincere thanks to Ben Hutchings for doing a lot of the hard work!

Sponsored by:	Solarflare Communications, Inc.
MFC after:	3 weeks
2011-11-16 17:11:13 +00:00