Commit Graph

467 Commits

Author SHA1 Message Date
Andrew Rybchenko
4af6e4df7c sfxge(4): sync up tlv_layout.h (from firmwaresrc 82cd8a5715e9)
Submitted by:   Matthew Slattery <mslattery at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-29 08:25:00 +00:00
Andrew Rybchenko
cff68e1ab7 sfxge(4): regenerate MCDI headers from firmwaresrc .yml
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-29 08:10:51 +00:00
Andrew Rybchenko
54c1459c81 sfxge(4): fix typo in pseudo header accessor function names
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-29 07:20:53 +00:00
Andrew Rybchenko
ecd9d64f0d sfxge(4): delete hunt_phy.c
Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-29 07:10:25 +00:00
Andrew Rybchenko
19734dbb1e sfxge(4): do not use enum type when values are bitmask
ICC complains that enumerated type mixed with another type.

Found by DPDK upstream build sanity check.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8954
2016-12-29 07:06:49 +00:00
Andrew Rybchenko
57b42dbbbc sfxge(4): do not use enum for filter flags
It is not 100% correct to assign non-enum values to enum type
variables.

Found by ICC build (DPDK PMD upstreaming).

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8953
2016-12-29 07:05:47 +00:00
Andrew Rybchenko
fd4fbb71da sfxge(4): don't use Tx descriptor push with TSO option descriptors
It is not safe to push TSO option descriptors if pacer bypass is
enabled, so to make sure that doesn't happen never push TSO option
descriptors.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8952
2016-12-29 07:04:26 +00:00
Andrew Rybchenko
a85ebf7757 sfxge(4): split EFX_FILTER_MATCH_LOC_MAC_IG back into separate flags
The flag EFX_FILTER_MATCH_LOC_MAC_IG to represent filtering on the
individual/group bit of the MAC address (with the two cases being
distingusished by the MAC address in the filter specification) was
introduced to mirror the Linux driver filtering code, but the
implementations are different enough anyway that it isn't of much value.

Having separate flags for unknown unicast and multicast simplifies
the code and allows the set of flags to match those used by MCDI.

It will also makes it easier to report whether these filters are
supported.

In the MCDI definitions, the unknown multicast and unicast flags have
the values 0x40000000 and 0x80000000 respectively, and so using the
same values for simplicity requires 32 bits in the filter specification
to store the flags. This means the structure is now a little bigger
than 64 bytes, but filters are not often used on critical paths so this
shouldn't have much impact - on Linux they are also bigger than they
used to be.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D8951
2016-12-29 07:02:32 +00:00
Andrew Rybchenko
dae5708683 sfxge(4): allow to have no NIC handle on Rx datapath in DPDK PMD
It is required to minimize RxQ context in the driver or avoid chaising
for the NIC handle in adapter (global per-interface) structure.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8950
2016-12-29 07:00:26 +00:00
Andrew Rybchenko
d5a0c7e00a sfxge(4): add missing barrier in common code MCDI response handling
The semantics of the MCDI interfacve require reading the first
dword of the header before any other data in the buffer. Add
a barrier to the common code MCDI handler to enforce this.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D8949
2016-12-29 06:58:51 +00:00
Andrew Rybchenko
b5a8496927 sfxge(4): use correct port number in sensor decoding
The port mask used for per-port sensors in mcdi_sensor_map
assumes zero-based port numbering. The port mask used in
the code is based on the one-based MCDI port number.

Fix this to lookup the correct per-port sensors, and to
allow reporting of sensor events from higher port numbers.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8947
2016-12-29 06:57:36 +00:00
Andrew Rybchenko
f3cacdeb18 sfxge(4): cleanup: simplify disable scatter logic in ef10_rx_qcreate
Reviewed by:    gnn
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8945
2016-12-29 06:56:18 +00:00
Andrew Rybchenko
58a72cb202 sfxge(4): provide a way to find out which MAC stats are supported
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8944
2016-12-29 06:54:40 +00:00
Andrew Rybchenko
b422f9491d sfxge(4): make the common code determine the number of PFs
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8941
2016-12-29 06:52:42 +00:00
Andrew Rybchenko
9933eabb8e sfxge(4): make the common code retrieve the number of FATSOv2 contexts
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8940
2016-12-29 06:51:06 +00:00
Andrew Rybchenko
0ca76fa98a sfxge(4): fix efx_ev_qpoll for non-Siena builds
Both Siena and EF10 use the siena_ev_qpoll() implementation, but this
function is not defined in builds without EFSYS_OPT_SIENA.

Remove siena_ev_qpoll and inline it into efx_ev_qpoll to allow it
to be used in non-Siena builds.

Also remove outdated FIXME comment, as EF10 event batching/merging has
been implemented long ago without needing to modify this code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D8939
2016-12-29 06:49:32 +00:00
Andrew Rybchenko
7b37475fef sfxge(4): fix common code for non-Siena builds
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8938
2016-12-29 06:47:53 +00:00
Andrew Rybchenko
897921fc45 sfxge(4): fix misuse of siena_build_filter in common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8937
2016-12-29 06:46:20 +00:00
Andrew Rybchenko
7fb55c62f7 sfxge(4): cleanup: remove last use of deprecated function flags with privilege check
The function flags were changed to mirror the privileges, but
the privileges are preferred.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8936
2016-12-28 18:07:17 +00:00
Andrew Rybchenko
cc7a82f5da sfxge(4): move BIST methods from hunt_phy.c to ef10_phy.c
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8935
2016-12-28 17:56:03 +00:00
Andrew Rybchenko
fa4a3ccff6 sfxge(4): add UEFI ROM support to the common code
Submitted by:   Andrew Lee <alee at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8934
2016-12-28 17:52:24 +00:00
Andrew Rybchenko
ab72be51e2 sfxge(4): fix GET_RXDP_CONFIG usage for multi-PF on Medford
On Medford, using MC_CMD_GET_RXDP_CONFIG to query the RX end
padding setting is in the ADMIN group, and so fails for
unprivileged functions. In that case, assume the largest size
supported by Medford hardware (256bytes) to prevent overrun.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8933
2016-12-28 17:50:48 +00:00
Andrew Rybchenko
5081d55d40 sfxge(4): support Medford bootcfg partition layout in common code
For Siena and Huntington, the per-port bootcfg (aka expcfg) is
stored in a dedicated 4Kbyte partition for each port.

For Medford, the per-PF bootcfg is stored in a 2Kbyte sector
within a single shared partition. Update the common code to support
the new bootcfg layout.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8932
2016-12-28 17:49:33 +00:00
Andrew Rybchenko
a3fe009ab4 sfxge(4): add possibility to control event queue performance profile
It is ignored on SFN5xxx/6xxx (aka Siena).

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8931
2016-12-28 17:45:52 +00:00
Andrew Rybchenko
75fed2ce6f sfxge(4): fix invalid type of eft_unicst_filter_count
Found by clang when boolean_t is defined as bool for DPDK PMD.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 16:28:09 +00:00
Andrew Rybchenko
80d051ee13 sfxge(4): do not initialize enumerated type variable to another type
Fix build warning generated by ICC.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 16:21:46 +00:00
Andrew Rybchenko
406b8d7d9b sfxge(4): translate MC_CMD_ERR_ERANGE to host errno value
This is needed because MCDI command MC_CMD_REKEY can return
MC_CMD_ERR_ERANGE.

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 15:24:44 +00:00
Andrew Rybchenko
c75d636205 sfxge(4): rename hunt_bist_* methods to ef10_bist_*
Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 13:28:44 +00:00
Andrew Rybchenko
3222b9de29 sfxge(4): cleanup: improve prefast annotations
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:43:11 +00:00
Andrew Rybchenko
1f4bb1bd2a sfxge(4): fix defined-but-not-used warning if neither VPD nor NVRAM opt enabled
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:28:16 +00:00
Andrew Rybchenko
56ec54c70f sfxge(4): cleanup: add missing spaces
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:25:17 +00:00
Andrew Rybchenko
98a9ac91f0 sfxge(4): cleanup: avoid unspecified unsigned
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:19:54 +00:00
Andrew Rybchenko
60cf15c592 sfxge(4): enclose macro complex value in parenthesis
Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:11:15 +00:00
Andrew Rybchenko
09b3e655d5 sfxge(4): make strings array pointer itself immutable
Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:09:45 +00:00
Andrew Rybchenko
a260bd77cf sfxge(4): cleanup: add const qualifier to const array pointer
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:07:34 +00:00
Andrew Rybchenko
69621b26c0 sfxge(4): cleanup: avoid spaces before TAB
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:04:36 +00:00
Andrew Rybchenko
b99afef3b3 sfxge(4): cleanup: avoid space just before TAB in efx_types.h
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:03:06 +00:00
Andrew Rybchenko
01a6119ccf sfxge(4): cleanup: use TAB to indent
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 11:01:01 +00:00
Andrew Rybchenko
6b3fab1a53 sfxge(4): cleanup: add missing space between type and pointer symbol
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:53:53 +00:00
Andrew Rybchenko
bf42516d2c sfxge(4): cleanup: open brace should be on a type name line
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:52:04 +00:00
Andrew Rybchenko
5e9a2dc5d6 sfxge(4): cleanup: remove trailing whitespaces
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:49:41 +00:00
Andrew Rybchenko
fe497b15a1 sfxge(4): cleanup: pointer symbol should go together with struct member name
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:48:15 +00:00
Andrew Rybchenko
75b16fa082 sfxge(4): cleanup: avoid C99 // comments
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:47:04 +00:00
Andrew Rybchenko
1e57660f86 sfxge(4): cleanup: remove unnecessary spaces
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:45:14 +00:00
Andrew Rybchenko
2910c2465f sfxge(4): cleanup: use spaces around binary arithmetic operations
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:44:03 +00:00
Andrew Rybchenko
6d4e783ecb sfxge(4): cleanup: fix wrong indent
Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:43:04 +00:00
Andrew Rybchenko
85365dfcbf sfxge(4): cleanup: remove trailing whitespace
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:40:21 +00:00
Andrew Rybchenko
62b5fe03b9 sfxge(4): cleanup: fix typo in siena_mac_loopback_set() instrumentation
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-12-28 10:39:11 +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
Bryan Drewery
28323add09 Fix improper use of "its".
Sponsored by:	Dell EMC Isilon
2016-11-08 23:59:41 +00:00