History log of /freebsd-10-stable/sys/dev/sfxge/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
342529 26-Dec-2018 arybchik

MFC r341785

sfxge(4): use n Tx queues instead of n + 2 on EF10 HW

On EF10 HW we can avoid sending packets without checksum offload
or with IP-only checksum offload to dedicated queues. Instead, we
can use option descriptors to change offload policy on any queue
during runtime. Thus, we don't need to create two dedicated queues.

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18390

342527 26-Dec-2018 arybchik

MFC r341784

sfxge(4): prepare the number of Tx queues on event queue 0 to become
variable

The number of Tx queues on event queue 0 can depend on the NIC family
type, and this property will be leveraged by future patches.
This patch prepares the code for this change.

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18389

342524 26-Dec-2018 arybchik

MFC r341783

sfxge(4): report support for Tx checksum op descriptors

FreeBSD driver needs a patch to provide a means for packets
which do not need checksum offload but have flow ID set
to avoid hitting only the first Tx queue (which has been used
for packets not needing checksum offload).

This should be possible on Huntington, Medford or Medford2 chips
since these support toggling checksum offload on any given queue
dynamically by means of pushing option descriptors.

The patch for FreeBSD driver will then need a means to figure out
whether the feature can be used, and testing adapter family might
not be a good solution.

This patch adds a feature bit specifically to indicate support
for checksum option descriptors. The new feature bits may have
more users in future, apart from the mentioned FreeBSD patch.

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18388

342523 26-Dec-2018 arybchik

MFC r341782

sfxge(4): populate per-event queue stats in sysctl

In order to find out why the first event queue and corresponding
interrupt is triggered more frequent, it is useful to know which
events go to each event queue.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18418

342522 26-Dec-2018 arybchik

MFC r341327

sfxge(4): rollback last seen VLAN TCI if Tx packet is dropped

Early processing of a packet on transmit may change last seen
VLAN TCI in the queue context. If such a packet is eventually
dropped, last seen VLAN TCI must be set to its previous value.

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18288

342521 26-Dec-2018 arybchik

MFC r341326

sfxge(4): ensure EvQ poll stops when abort is requested

If an event handler requested an abort, only the inner loop was
guarenteed to be broken out of - the outer loop could continue
if total == batch.

Fix this by poisoning batch to ensure it is different to total.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18287

342520 26-Dec-2018 arybchik

MFC r341311

sfxge(4): make last byte of module information available

Adjust bounds so the interface supports reading
the last available byte of data.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18273

342519 26-Dec-2018 arybchik

MFC r341309

sfxge(4): fix MAC Tx stats for less or equal to 64 bytes

This statistic should include 64byte and smaller frames.
Fix EF10 calculation to match Siena code.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18271

342518 26-Dec-2018 arybchik

MFC r341302

sfxge(4): fix a typo in unicast filter insertion comment

Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18264

342517 26-Dec-2018 arybchik

MFC r341301

sfxge(4): prevent access to the NIC config before probe

NIC config is initialized during NIC probe.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18263

342516 26-Dec-2018 arybchik

MFC r341297

sfxge(4): fix out of bounds read when dereferencing sdup

Introduce and use macro to make sure that MCDI buffers allocated
on stack are rounded up properly.

Submitted by: Gautam Dawar <gdawar at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18259

342515 26-Dec-2018 arybchik

MFC r341295

sfxge(4): avoid usage of too big arrays on stack

Found by PreFAST static analysis.

Submitted by: Martin Harvey <mharvey at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18257

342514 26-Dec-2018 arybchik

MFC r341290

sfxge(4): check size of memory to read sensors data to

Size of provided memory should be consistent with specified size.

Submitted by: Martin Harvey <mharvey at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18252

342513 26-Dec-2018 arybchik

MFC r341215

sfxge(4): fix build because of no declaration

Functions declared in mcdi_mon.h are implemented in mcdi_mon.c.
The build fails if compiler options require declaration before
definition.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18246

342512 26-Dec-2018 arybchik

MFC r341214

sfxge(4): fix SAL annotation for input buffers

Submitted by: Martin Harvey <mharvey at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18245

342511 26-Dec-2018 arybchik

MFC r341213

sfxge(4): fix PreFAST warnings because of unused return

Submitted by: Martin Harvey <mharvey at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18244

342510 26-Dec-2018 arybchik

MFC r341197

sfxge(4): fix comparison always true warning

Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18228

342509 26-Dec-2018 arybchik

MFC r341038

sfxge(4): add method to make checksum option descriptors

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18160

342508 26-Dec-2018 arybchik

MFC r340896

sfxge(4): 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.

Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D1813

342507 26-Dec-2018 arybchik

MFC r340895

sfxge(4): move BIU test code into Siena-specific file

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18129

342506 26-Dec-2018 arybchik

MFC r340894

sfxge(4): 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.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18128

342505 26-Dec-2018 arybchik

MFC r340892

sfxge(4): remove obsolete check for pre-Siena hardware

The fail4 label was used twice, so it doesn't need removing.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18126

342504 26-Dec-2018 arybchik

MFC r340891

sfxge(4): 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.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18125

342503 26-Dec-2018 arybchik

MFC r340890

sfxge(4): 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.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18124

342502 26-Dec-2018 arybchik

MFC r340889

sfxge(4): fix warnings from VS2015 C compiler (C4189)

Fix multiple level 4 warnings
"C4189: 'xxx': local variable is initialized but not referenced";
no functional changes.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18123

342501 26-Dec-2018 arybchik

MFC r340888

sfxge(4): 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

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18122

342500 26-Dec-2018 arybchik

MFC r340887

sfxge(4): 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.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18121

342499 26-Dec-2018 arybchik

MFC r340886

sfxge(4): 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.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18120

342498 26-Dec-2018 arybchik

MFC r340885

sfxge(4): fix warnings from VS2015 C compiler (C4310)

Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18119

342497 26-Dec-2018 arybchik

MFC r340884

sfxge(4): 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.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18118

342496 26-Dec-2018 arybchik

MFC r340883

sfxge(4): 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.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18117

342495 26-Dec-2018 arybchik

MFC r340875

sfxge(4): fix build issue with PHY LED control enabled

Fixed build issue with the EFSYS_OPT_PHY_LED_CONTROL for Huntigton and
Medford.

Submitted by: Vijay Srivastava <vijays at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18110

342494 26-Dec-2018 arybchik

MFC r340833

sfxge(4): support inner checksum offload on transmit

Inner checksum offloads may be used only if firmware supports
these tunnels.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18102

342493 26-Dec-2018 arybchik

MFC r340831

sfxge(4): make MAC naming consistent with other modules

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18101

342492 26-Dec-2018 arybchik

MFC r340826

sfxge(4): fix ignoring function return value

fix PreFAST issue, add missing annotation that function return value
should not be ignored. Fix alignment.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18096

342491 26-Dec-2018 arybchik

MFC r340822

sfxge(4): fix check in NVRAM validate

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18092

342490 26-Dec-2018 arybchik

MFC r340814

sfxge(4): fix result code in MCDI NVRAM update finish

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18084

342489 26-Dec-2018 arybchik

MFC r340806

sfxge(4): fix default RSS context check on Siena

Default RSS context check is carried out during filter
insertion on Siena and it needs to be fixed

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18076

342488 26-Dec-2018 arybchik

MFC r340805

sfxge(4): define a handle to denote default RSS context

Make the existing filter-specific define more general.
This is the same as MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18075

342487 26-Dec-2018 arybchik

MFC r340804

sfxge(4): insert filters for encapsulated packets

On Medford, with full-featured firmware running, encapsulated
packets may not be delivered unless filters are inserted for
them, as ordinary filters are not applied to encapsulated
packets. So filters for encapsulated packets need to be
inserted for each class of encapsulated packet. For simplicity,
catch-all filters are always inserted. These may match more
packets than the OS has asked for, but trying to insert more
precise filters increases complexity for little gain.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18074

342486 26-Dec-2018 arybchik

MFC r340803

sfxge(4): support filters for encapsulated packets

This supports filters which match all unicast or multicast
inner frames in VXLAN, GENEVE, or NVGRE packets.
(Additional fields to match on can be added easily.)

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18073

342485 26-Dec-2018 arybchik

MFC r340802

sfxge(4): use proper MCDI command for encap filters

MC_CMD_FILTER_OP_IN_EXT is needed to set filters for encapsulated
packets.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18072

342484 26-Dec-2018 arybchik

MFC r340801

sfxge(4): provide information about supported tunnels

VXLAN/NVGRE (and Geneve) support is available on SFN8xxx with
full-feature firmware variant running.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18071

342483 26-Dec-2018 arybchik

MFC r340800

sfxge(4): let caller know that queue is already flushed

Tx/Rx queue may be already flushed due to Tx/Rx error on the queue or
MC reboot. Caller needs to know that the queue is already flushed to
avoid waiting for flush done event.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18070

342482 26-Dec-2018 arybchik

MFC r340799

sfxge(4): fix error code usage

MCDI results returned in req.emr_rc have already been translated
from MC_CMD_ERR_* to errno names, so using an MC_CMD_ERR_* value
is incorrect.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18069

342481 26-Dec-2018 arybchik

MFC r340798

sfxge(4): fix out of bounds read in VIs allocation

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18068

342480 26-Dec-2018 arybchik

MFC r340767

sfxge(4): limit max TXQ size on Medford to 2048

Queues with 4096 descriptors are not supported as the top bit is used
for vfifo stuffing.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D8948

342479 26-Dec-2018 arybchik

MFC r312885

sfxge(4): compact the first hot part of RxQ control

buf_base_id is used on RxQ control operations only and not used on
datapath.

Sponsored by: Solarflare Communications, Inc.

342478 26-Dec-2018 arybchik

MFC r312884

sfxge(4): fix RxQ structure layout vs usage on datapath

Recent changes in the pseudo header accessor prototypes start to
use common code RxQ handle on datapath. The handle was located
at the end of the structure with members not used on datapath.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D9359

342477 26-Dec-2018 arybchik

MFC r312883

sfxge(4): fix invalid VLAN tagging after stop/start

TxQ is destroyed on stop and last used tag should be reset to default 0
on the next start.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D9358

342476 26-Dec-2018 arybchik

MFC r312868

sfxge(4): cleanup: remove unused soft context struct member rxq_cache

Sponsored by: Solarflare Communications, Inc.

342475 26-Dec-2018 arybchik

MFC r312867

sfxge(4): cleanup: remvoe trailing tab

Sponsored by: Solarflare Communications, Inc.

342474 26-Dec-2018 arybchik

MFC r312866

sfxge(4): cleanup: remove unused txq_index TxQ control structure member

Sponsored by: Solarflare Communications, Inc.

341332 30-Nov-2018 arybchik

MFC r340765

sfxge(4): cleanup: move into right place

Due to incorrect merge the piece of code was put in incorrect
place and diverge from libefx in other locations.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18024

312169 14-Jan-2017 arybchik

MFC r311983

sfxge(4): add sysctl to change MAC stats update period

The sysctl controls the period per interface.

Sponsored by: Solarflare Communications, Inc.

312168 14-Jan-2017 arybchik

MFC r311977

sfxge(4): add tunable to configure MAC stats update period

Sponsored by: Solarflare Communications, Inc.

312167 14-Jan-2017 arybchik

MFC r311962

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.

312166 14-Jan-2017 arybchik

MFC r311961

sfxge(4): do not ignore requested MAC stats update period

Firmware version which takes PERIOD_MS parameter into account is
required.

Sponsored by: Solarflare Communications, Inc.

312165 14-Jan-2017 arybchik

MFC r311877

sfxge(4): avoid unnecessary mbuf data prefetch

Unnecessary prefetch just loads HW prefetcher and displaces other
cache entries (which could be really useful).

If we parse mbuf for TSO early and use firmware-assisted TSO, we do not
expect mbuf data access when we compose firmware-assisted TSO (v1 or v2)
option descriptors. If packet header needs to be linearized or finally
FATSO cannot be used because of, for example, too big header, we do not
care about a bit more performance degradation because of prefetch
absence (it is better to optimize more common case).

Sponsored by: Solarflare Communications, Inc.

311768 09-Jan-2017 arybchik

MFC r311640

sfxge(4): allow DMA descs to cross 4k boundary on EF10

Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Sponsored by: Solarflare Communications, Inc.

311767 09-Jan-2017 arybchik

MFC r311639

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.

Sponsored by: Solarflare Communications, Inc.

311766 09-Jan-2017 arybchik

MFC r311638

sfxge(4): use SFXGE_LINK_UP() to report link up state

Sponsored by: Solarflare Communications, Inc.

311500 06-Jan-2017 arybchik

MFC r310817

sfxge(4): remove obsolete Wake-On-LAN support

Wake-on-lan is not supported in production on any of our adapters, as
they don't have the required AUX power connector. (It's possible that
AUX power is supplied to some of our ALOM or mezz adapters, but if so
then we've never implemented or tested WoL support.)

Sponsored by: Solarflare Communications, Inc.

311499 06-Jan-2017 arybchik

MFC r310815

sfxge(4): add functions to efx_bootcfg supporting whole partition access

Expose expcfg partition layout discovery and validating buffer copy
routines. Needed for whole-partition expcfg operations.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311498 06-Jan-2017 arybchik

MFC r310814

sfxge(4): make verified update result available from ef10_nvram_partn_unlock()

Manftest needs to know exactly what went wrong with the verified update
so that failing boards can be correctly diagnosed.

Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311497 06-Jan-2017 arybchik

MFC r310818

sfxge(4): support per-command MCDI timeout

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311496 06-Jan-2017 arybchik

MFC r310813

sfxge(4): add per-command timeout reporting to the common code

In newer firmware that supports multithreaded MCDI processing,
longer running commands may be run ina background thread. Add
support for drivers to query the appropriate timeout for each
MCDI request.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311495 06-Jan-2017 arybchik

MFC r310765

sfxge(4): add support for firmware-verified NVRAM updates to the common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311494 06-Jan-2017 arybchik

MFC r310816

sfxge(4): fix efx_filter_supported_filters API

The previous API had various problems, including the length of the
caller provided buffer not being specified, no means being available
to discover how big the buffer needs to be, and a lack of clarity of
what the resulting list contains.

To fix it:
- add the buffer length as a parameter
- if the provided buffer is too short, fail with ENOSPC and return the
required length
- ensure that the list contents are valid and add comments
describing it

It is safe to change this API as, unsuprisingly, it has no users.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311493 06-Jan-2017 arybchik

MFC r310753

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>
Sponsored by: Solarflare Communications, Inc.

311492 06-Jan-2017 arybchik

MFC r310750

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>
Sponsored by: Solarflare Communications, Inc.

311491 06-Jan-2017 arybchik

MFC r310744

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>
Sponsored by: Solarflare Communications, Inc.

311096 02-Jan-2017 arybchik

MFC r310820

sfxge(4): move queue size checks to after the NIC config has been populated

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311095 02-Jan-2017 arybchik

MFC r310819

sfxge(4): cleanup: add efsys_lock_state_t for type of state param in EFSYS_LOCK()

This allows the common code to use the correct type for the lock state
local variable passed to EFSYS_LOCK() and EFSYS_UNLOCK().

On Windows, this allows warning supression pragmas to be removed.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311094 02-Jan-2017 arybchik

MFC r310812

sfxge(4): support non-interrupting event queues creation

Poll-mode driver does not use interrupts and number of used event queues
should not be limitted by the number of interrupts allocated for the
NIC.

Sponsored by: Solarflare Communications, Inc.

311093 02-Jan-2017 arybchik

MFC r310811

sfxge(4): cleanup: remove now-unused function flags

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311092 02-Jan-2017 arybchik

MFC r310810

sfxge(4): cleanup: check deferred packet list tunables once

Sponsored by: Solarflare Communications, Inc.

311091 02-Jan-2017 arybchik

MFC r310770

sfxge(4): cleanup: clarify/unify variable name used for put-list length

get_count is used for get-list.

Sponsored by: Solarflare Communications, Inc.

311090 02-Jan-2017 arybchik

MFC r310764

sfxge(4): sync up tlv_layout.h (from firmwaresrc 82cd8a5715e9)

Submitted by: Matthew Slattery <mslattery at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311089 02-Jan-2017 arybchik

MFC r310762

sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by: Solarflare Communications, Inc.

311088 02-Jan-2017 arybchik

MFC r310760

sfxge(4): fix typo in pseudo header accessor function names

Sponsored by: Solarflare Communications, Inc.

311087 02-Jan-2017 arybchik

MFC r310758

sfxge(4): delete hunt_phy.c

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311086 02-Jan-2017 arybchik

MFC r310756

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.

Sponsored by: Solarflare Communications, Inc.

311085 02-Jan-2017 arybchik

MFC r310755

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).

Sponsored by: Solarflare Communications, Inc.

311084 02-Jan-2017 arybchik

MFC r310754

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>
Sponsored by: Solarflare Communications, Inc.

311083 02-Jan-2017 arybchik

MFC r310752

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.

Sponsored by: Solarflare Communications, Inc.

311082 02-Jan-2017 arybchik

MFC r310749

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>
Sponsored by: Solarflare Communications, Inc.

311081 02-Jan-2017 arybchik

MFC r310748

sfxge(4): cleanup: simplify disable scatter logic in ef10_rx_qcreate

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311080 02-Jan-2017 arybchik

MFC r310747

sfxge(4): provide a way to find out which MAC stats are supported

Sponsored by: Solarflare Communications, Inc.

311079 02-Jan-2017 arybchik

MFC r310746

sfxge(4): make the common code determine the number of PFs

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

311078 02-Jan-2017 arybchik

MFC r310745

sfxge(4): make the common code retrieve the number of FATSOv2 contexts

Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

311077 02-Jan-2017 arybchik

MFC r310742

sfxge(4): fix common code for non-Siena builds

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311076 02-Jan-2017 arybchik

MFC r310741

sfxge(4): fix misuse of siena_build_filter in common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311075 02-Jan-2017 arybchik

MFC r310719

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.

311074 02-Jan-2017 arybchik

MFC r310717

sfxge(4): move BIST methods from hunt_phy.c to ef10_phy.c

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311073 02-Jan-2017 arybchik

MFC r310716

sfxge(4): add UEFI ROM support to the common code

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311072 02-Jan-2017 arybchik

MFC r310715

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>
Sponsored by: Solarflare Communications, Inc.

311071 02-Jan-2017 arybchik

MFC r310714

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>
Sponsored by: Solarflare Communications, Inc.

311070 02-Jan-2017 arybchik

MFC r310713

sfxge(4): add possibility to control event queue performance profile

It is ignored on SFN5xxx/6xxx (aka Siena).

Sponsored by: Solarflare Communications, Inc.

311069 02-Jan-2017 arybchik

MFC r310709

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.

311068 02-Jan-2017 arybchik

MFC r310708

sfxge(4): do not initialize enumerated type variable to another type

Fix build warning generated by ICC.

Sponsored by: Solarflare Communications, Inc.

311067 02-Jan-2017 arybchik

MFC r310704

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.

311066 02-Jan-2017 arybchik

MFC r310699

sfxge(4): rename hunt_bist_* methods to ef10_bist_*

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311065 02-Jan-2017 arybchik

MFC r310696

sfxge(4): cleanup: improve prefast annotations

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

311064 02-Jan-2017 arybchik

MFC r310695

sfxge(4): fix defined-but-not-used warning if neither VPD nor NVRAM opt enabled

Sponsored by: Solarflare Communications, Inc.

311063 02-Jan-2017 arybchik

MFC r310694

sfxge(4): cleanup: add missing spaces

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311062 02-Jan-2017 arybchik

MFC r310693

sfxge(4): cleanup: avoid unspecified unsigned

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311061 02-Jan-2017 arybchik

MFC r310692

sfxge(4): enclose macro complex value in parenthesis

Found by DPDK checkpatches.sh

Sponsored by: Solarflare Communications, Inc.

311060 02-Jan-2017 arybchik

MFC r310691

sfxge(4): make strings array pointer itself immutable

Found by DPDK checkpatches.sh

Sponsored by: Solarflare Communications, Inc.

311059 02-Jan-2017 arybchik

MFC r310690

sfxge(4): cleanup: add const qualifier to const array pointer

Sponsored by: Solarflare Communications, Inc.

311058 02-Jan-2017 arybchik

MFC r310689

sfxge(4): cleanup: avoid spaces before TAB

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311057 02-Jan-2017 arybchik

MFC r310688

sfxge(4): cleanup: avoid space just before TAB in efx_types.h

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311056 02-Jan-2017 arybchik

MFC r310687

sfxge(4): cleanup: use TAB to indent

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311054 02-Jan-2017 arybchik

MFC r310686

sfxge(4): cleanup: add missing space between type and pointer symbol

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311053 02-Jan-2017 arybchik

MFC r310685

sfxge(4): cleanup: open brace should be on a type name line

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311052 02-Jan-2017 arybchik

MFC r310684

sfxge(4): cleanup: remove trailing whitespaces

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311051 02-Jan-2017 arybchik

MFC r310683

sfxge(4): cleanup: pointer symbol should go together with struct member name

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

311050 02-Jan-2017 arybchik

MFC r310682

sfxge(4): cleanup: avoid C99 // comments

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

310842 30-Dec-2016 arybchik

MFC r310681

sfxge(4): cleanup: remove unnecessary spaces

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

310839 30-Dec-2016 arybchik

MFC r310680

sfxge(4): cleanup: use spaces around binary arithmetic operations

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

310837 30-Dec-2016 arybchik

MFC r310679

sfxge(4): cleanup: fix wrong indent

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.

310835 30-Dec-2016 arybchik

MFC r310678

sfxge(4): cleanup: remove trailing whitespace

Sponsored by: Solarflare Communications, Inc.

310832 30-Dec-2016 arybchik

MFC r310677

sfxge(4): cleanup: fix typo in siena_mac_loopback_set() instrumentation

Sponsored by: Solarflare Communications, Inc.

310830 30-Dec-2016 arybchik

MFC r310627

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.

Sponsored by: Solarflare Communications, Inc.

307373 15-Oct-2016 arybchik

MFC r307038

sfxge(4): update external port mapping for Medford

Extend the mapping table for external port numbering to support port modes
which output to the second external port only. Where supported, map from
the current port mode rather than inferring from all the available modes.
Updated comments for clarity.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

307371 15-Oct-2016 arybchik

MFC r306944

sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode
definition use

It fixes driver attach issue to a new firmware which reports a new
port-modes.

Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

304679 23-Aug-2016 arybchik

MFC r301724

sfxge(4): handle negative ticks difference correctly

ticks are signed int and if statistics is not updated for a long time
(more than INT_MAX ticks, but less than UINT_MAX) difference becomes
negative and less than hz for a long time.

Other option to repeat is simply load driver (which initializes
timestamps to 0) when ticks are negative.

Sponsored by: Solarflare Communications, Inc.

301989 17-Jun-2016 arybchik

MFC r301607

sfxge(4): host byte order is required for IP ID in TSO descriptors

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

301988 17-Jun-2016 arybchik

MFC r301604

sfxge(4): cleanup: add missing probes to ef10_nvram_segment_write_tlv

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301987 17-Jun-2016 arybchik

MFC r301495

sfxge(4): update TX vFIFO ULL tag location to avoid merge conflict

Sponsored by: Solarflare Communications, Inc.

301986 17-Jun-2016 arybchik

MFC r301427

sfxge(4): allow firmware to auto-configure event queues on Medford

On Medford, licenses are required to enable RX and event cut through and to
disable RX batching. To avoid the need for the driver to make decisions based on
the licensing state, the MC_CMD_INIT_EVQ has been extended to allow us to leave
the decision to the firmware. If the adapter is licensed for low-latency use,
the firmware will choose the optimal settings for latency, otherwise it will use
the best settings for throughput.

For Huntington we still need to choose the settings ourselves.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D6717

301985 17-Jun-2016 arybchik

MFC r301309

sfxge(4): always be ready to receive batched events

When the low-latency firmware variant is running, it is reported as not
being capable of batching RX events, but it can still do so if the
FORCE_EV_MERGING flag is set on an RXQ. Therefore we need to handle
batched RX events even if the capability isn't set.

If this bug is fixed in the firmware such that the capability is set
even when running the low-latency firmware variant, it will almost
always be reported so I don't think we lose much by removing the check.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D6705

301984 17-Jun-2016 arybchik

MFC r301308

sfxge(4): add helper to compute timer quantum

This also adjusts the timer values used to match the Linux net
driver implementation:
a) non-zero time intervals should result in at least one quantum
b) timer load/reload values are only zero biased for Falcon/Siena

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D6704

301983 17-Jun-2016 arybchik

MFC r301237

sfxge(4): support EVQ timer workaround via MCDI

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/6675

301982 17-Jun-2016 arybchik

MFC r301127

sfxge(4): cleanup: remove unused variables in common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301981 17-Jun-2016 arybchik

MFC r301125

sfxge(4): cleanup: add missing space after if keyword

Sponsored by: Solarflare Communications, Inc.

301980 17-Jun-2016 arybchik

MFC r301122

sfxge(4): set moderation in efx_ev_qcreate

This simplifies setting an initial interrupt moderation value, and
avoids most calls to evx_ev_qmoderate from contexts where MCDI is
not allowed (MCDI is need for an EVQ timer workaround in a later patch).

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D6673

301979 17-Jun-2016 arybchik

MFC r301061

sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by: Solarflare Communications, Inc.

301401 04-Jun-2016 arybchik

MFC r300849

sfxge(4): fix typo in monitor types strings in common code

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301400 04-Jun-2016 arybchik

MFC r300848

sfxge(4): avoid necessity to add one more constant condition note

Use for forever loop instead of while.

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301399 04-Jun-2016 arybchik

MFC r300847

sfxge(4): cope with always true unsigned comparison with 0 to make lint happier

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301398 04-Jun-2016 arybchik

MFC r300846

sfxge(4): unsigned 1 should be shifted to produce bitmask

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301397 04-Jun-2016 arybchik

MFC r300845

sfxge(4): cope with lint for EFX_SET_OWORD_BIT() with const bit arg

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301396 04-Jun-2016 arybchik

MFC r300844

sfxge(4): remove set but not used variable

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301395 04-Jun-2016 arybchik

MFC r300842

sfxge(4): remove unreachable break after goto

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301393 04-Jun-2016 arybchik

MFC r300841

sfxge(4): add constant condition note to make lint happier

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301392 04-Jun-2016 arybchik

MFC r300840

sfxge(4): note unused variables to make lint happier

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301391 04-Jun-2016 arybchik

MFC r300739

sfxge(4): correct parenthesis location in if coundition

Found by lint on illumos.

Submitted by: Garrett D'Amore <garrett at damore.org>
Sponsored by: Solarflare Communications, Inc.

301390 04-Jun-2016 arybchik

MFC r300609

sfxge(4): enable Medford support

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

301389 04-Jun-2016 arybchik

MFC r300608

sfxge(4): bump driver version to the closest out-of-tree version

Sponsored by: Solarflare Communications, Inc.

301388 04-Jun-2016 arybchik

MFC r300607

sfxge(4): cleanup: update copyright to 2016

Sponsored by: Solarflare Communications, Inc.

301387 04-Jun-2016 arybchik

MFC r300606

sfxge(4): provide option to disable not a local MAC address check

Option EFSYS_OPT_ALLOW_UNCONFIGURED_NIC disables check that the adapter
MAC address is not a local address (beginning 02).

Submitted by: Laurence Evans <levans at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

301386 04-Jun-2016 arybchik

MFC r300605

sfxge(4): be ready to receive events immediately after event queues are created

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

301385 04-Jun-2016 arybchik

MFC r300505

sfxge(4): cleanup: remove unused EFX preempt macros

The EFSYS_PREEMPT_DISABLE() and EFSYS_PREEMPT_ENABLE() macros
were used to ensure correct timing of I2C operations. The APIs
for I2C operations have been removed, so these macros have no
callers.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301384 04-Jun-2016 arybchik

MFC r300135

sfxge(4): cleanup: remove trailing whitespaces

Sponsored by: Solarflare Communications, Inc.

301383 04-Jun-2016 arybchik

MFC r300011

sfxge(4): only raise an exception after MC assert or reboot in the common code

Fix efx_mcdi_request_poll so it only raises an exception if EIO is
reported from a detected MC assert or reboot. This prevents
an unnecessary exception being raised if an MCDI response error code
is trandlated to EIO.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301382 04-Jun-2016 arybchik

MFC r300010

sfxge(4): restore clearing of MCDI new epoch flag in common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301381 04-Jun-2016 arybchik

MFC r300009

sfxge(4): fix Medford timer quantum calculation in common code

The event/timer block used sysclk in Huntington, but has been
moved to the dpcpu clock domain for Medford. Fix the computed
timer quantum to use the right clock.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301380 04-Jun-2016 arybchik

MFC r300008

sfxge(4): query and use current MTU if setting the MTU fails

This allows the driver to fall back to the largest usable MTU if a
user attempts to configure an unprivileged function with an MTU higher
than that of the attached port.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301379 04-Jun-2016 arybchik

MFC r300007

sfxge(4): store licensing state in efx_lic

Check licensing support at NIC startup to avoid multiple checks later.
As state is stored, licensing initialisation is moved later in start
procedure.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301378 04-Jun-2016 arybchik

MFC r299925

sfxge(4): cleanup: quieten more common code MCDI handlers

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301377 04-Jun-2016 arybchik

MFC r299924

sfxge(4): cleanup: remove misnamed function declaration

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301376 04-Jun-2016 arybchik

MFC r299923

sfxge(4): cleanup: make MCDI license queries quieter in common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301375 04-Jun-2016 arybchik

MFC r299920

sfxge(4): cleanup: simplify ef10_ev_qcreate

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301374 04-Jun-2016 arybchik

MFC r299919

sfxge(4): translate MC_CMD_ERR_EEXIST to host errno value

This is needed because the new MCDI command nvram_private_append can
return MC_CMD_ERR_EEXIST

Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301373 04-Jun-2016 arybchik

MFC r299918

sfxge(4): cleanup: run genfwdef to propogate prior changes to TLV headers

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301372 04-Jun-2016 arybchik

MFC r299917

sfxge(4): set TSOv2 feature flag on Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301371 04-Jun-2016 arybchik

MFC r299915

sfxge(4): improve TX/RX queue error messages

Report the full error descriptor in a form that can be passed to
firmwaresrc/dpcpu/scripts/evdecode

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301370 04-Jun-2016 arybchik

MFC r299911

sfxge(4): fix license validation check for V3 licenses

Length consistency checks were failing for ECC hashes.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301369 04-Jun-2016 arybchik

MFC r299909

sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by: Solarflare Communications, Inc.

301368 04-Jun-2016 arybchik

MFC r299907

sfxge(4): increase maximum size of license keys

Increase buffer sizes for license keys to 160 bytes to accomodate ECDSA
hashes.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301366 04-Jun-2016 arybchik

MFC r299905

sfxge(4): fix V1 licensing MCDI operations

Implementation of the MCDI commands for Siena boards was requesting
the wrong operation.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301365 04-Jun-2016 arybchik

MFC r299904

sfxge(4): improve PCIe link speed and width check

Perform a more accurate check of whether the PCIe bandwidth is
sufficient for the current/supported port modes.

Give a different warning if there is sufficient bandwidth to achieve
line rate, but the link is not fast enough for optimal latency.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301364 04-Jun-2016 arybchik

MFC r299903

sfxge(4): cleanup: make TLV scans quieter

Find end of segments in a more direct way that avoids an error report at
the terminator.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301363 04-Jun-2016 arybchik

MFC r299901

sfxge(4): cleanup: make VPD lookups quieter

A lookup on a VPD entry which is missing reports several failure
messages as it propagates through wrapper functions. Restructured
the wrappers to treat this gracefully as an expected case.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301362 04-Jun-2016 arybchik

MFC r299899

sfxge(4): cleanup: make licensing function quieter

Silent handling of failure to invoke functions that are not supported on
older licensing versions.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301361 04-Jun-2016 arybchik

MFC r299898

sfxge(4): restructure efx_lic to support V3 licensing

Create separate implementations of the efx_lic API for each revision of
the licensing system. All processing of the V1/V2 license partition is
moved to efx_lic, and an implementation of V3 licensing uses the existing
TLV functions with extensions for writing new TLV entries.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301360 04-Jun-2016 arybchik

MFC r299734

sfxge(4): remove unused EFX PHY symbols

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301359 04-Jun-2016 arybchik

MFC r299733

sfxge(4): remove obsolete EFX_MON types

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301358 04-Jun-2016 arybchik

MFC r299732

sfxge(4): remove unimplemented sensor reconfigure method

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301357 04-Jun-2016 arybchik

MFC r299731

sfxge(4): remove unimplemented sensor reset method

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301356 04-Jun-2016 arybchik

MFC r299730

sfxge(4): fix build with -Werror=pointer-sign

-Werror=pointer-sign is enabled in OmniOS GLD driver build.

Sponsored by: Solarflare Communications, Inc.

301355 04-Jun-2016 arybchik

MFC r299729

sfxge(4): remove unimplemented MAC reset method

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301354 04-Jun-2016 arybchik

MFC r299728

sfxge(4): cleanup: remove unused define EFX_EVQ_FALCON_TIMER_QUANTUM_NS

Sponsored by: Solarflare Communications, Inc.

301353 04-Jun-2016 arybchik

MFC r299727

sfxge(4): cleanup: remove unused variable flags

Sponsored by: Solarflare Communications, Inc.

301352 04-Jun-2016 arybchik

MFC r299724

sfxge(4): remove unimplemented EFX PHY methods

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301351 04-Jun-2016 arybchik

MFC r299723

sfxge(4): import TLV layout from firmwaresrc

Submitted by: Laurence Evans <levans at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301350 04-Jun-2016 arybchik

MFC r299722

sfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301349 04-Jun-2016 arybchik

MFC r299721

sfxge(4): remove PHY property method stubs

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301348 04-Jun-2016 arybchik

MFC r299720

sfxge(4): move ef10 definitions to ef10_impl.h

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301347 04-Jun-2016 arybchik

MFC r299719

sfxge(4): prepare for moving EF10 definitions to ef10_impl.h

Move legacy privilege masks near to their only user.
Move Huntington definitions to the top of hunt_impl.h to prepare
for moving the remaining EF10 definitions to ef10_impl.h.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301346 04-Jun-2016 arybchik

MFC r299718

sfxge(4): rename falconsiena_filter types

Falcon support has been removed, so this code only supports Siena.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301345 04-Jun-2016 arybchik

MFC r299607-r299612

sfxge(4): rename falconsiena_*

Falcon support has been removed, so this code only supports Siena.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301344 04-Jun-2016 arybchik

MFC r299596-r299606, r299681, r299726, r299738

sfxge(4): move ef10_*() functions to ef10_*.c files

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301343 04-Jun-2016 arybchik

MFC r299595

sfxge(4): comment on when we assume multicast chaining is available

It's the same on Medford as Huntington.

Multicast chaining is not always on, even with Medford, as it's not
supported by low latency firmware.

Unlike the Linux driver, we don't need to support virtulization with
firmware released before support for multicast chaining was added.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301342 04-Jun-2016 arybchik

MFC r299594

sfxge(4): avoid duplicate delivery of packets when changing multicast
mode with multicast chaining enabled

With multicast chaining, if e.g. a specific multicast filter is
inserted and the multicast mis-match filter is then inserted, both may
match a packet and cause it to be delivered.

Copy the behaviour of the Linux driver, which is to remove the old filters
first, on the basis that customers are more likely to be able to handle
drops than duplicates (see bug49178 comment 4).

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301341 04-Jun-2016 arybchik

MFC r299518

sfxge(4): update multicast filter insertion algorithm

When the multicast filters we're allowed to insert are controlled by the
hypervisor, it may be that we can insert some but not others. So we need
to have fallbacks where we insert any filters we can without rolling back
when one fails to insert.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301340 04-Jun-2016 arybchik

MFC r299517

sfxge(4): cleanup: constify common code method tables

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301338 04-Jun-2016 arybchik

MFC r299411

sfxge(4): update unicast filter insertion algorithm

As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301337 04-Jun-2016 arybchik

MFC r299410

sfxge(4): fix efx_filter_reconfigure parameter type

This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301336 04-Jun-2016 arybchik

MFC r299407

sfxge(4): make efx_sram_test Siena-only

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301334 04-Jun-2016 arybchik

MFC r299406

sfxge(4): add new Emerald board sensors to common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301332 04-Jun-2016 arybchik

MFC r299405

sfxge(4): simplify efx_mac_select

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301331 04-Jun-2016 arybchik

MFC r299404

sfxge(4): remove Falcon specific EV_GLOBAL support

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301330 04-Jun-2016 arybchik

MFC r299403

sfxge(4): remove Falcon-specific code paths from common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301329 04-Jun-2016 arybchik

MFC r299344

sfxge(4): cleanup: remove unneeded include files

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301328 04-Jun-2016 arybchik

MFC r299340

sfxge(4): cleanup: remove unused efx_infer_family()

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301327 04-Jun-2016 arybchik

MFC r299339

sfxge(4): cleanup: remove obsolete common code module

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301326 04-Jun-2016 arybchik

MFC r299338, r299345

sfxge(4): cleanup: fix typos

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301325 04-Jun-2016 arybchik

MFC r299337

sfxge(4): cleanup efx_check.h comments and error messages

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301324 04-Jun-2016 arybchik

MFC r299320-r299328, r299330-r299336

sfxge(4): remove EFSYS_OPT_FALCON and related EFSYS_OPT_ options

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301323 04-Jun-2016 arybchik

MFC r299402

sfxge(4): add TLV format buffer manipulation functions for V3 licensing

The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301322 04-Jun-2016 arybchik

MFC r299319

sfxge(4): add TLV item manipulation functions to common code

Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code. Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format. Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301321 04-Jun-2016 arybchik

MFC r299318

sfxge(4): restructure TLV buffer validation

Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301320 04-Jun-2016 arybchik

MFC r299254

sfxge(4): remove EFSYS_OPT_PCIE_TUNE

With the removal of Falcon support, this is now dead code.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301319 04-Jun-2016 arybchik

MFC r299253

sfxge(4): disable common code support for Falcon

This patch ensures that client code will fail to build
with Falcon support. Following patches remove Falcon
support code entirely.

sfxge(4) has never supported Falcon.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301318 04-Jun-2016 arybchik

MFC r299252

sfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301317 04-Jun-2016 arybchik

MFC r299251

sfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301316 04-Jun-2016 arybchik

MFC r299250

sfxge(4): remove unused efx_nic_pcie_extended_sync()

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

301315 04-Jun-2016 arybchik

MFC r301105

sfxge(4): cope with code duplication on SW events composition

Sponsored by: Solarflare Communications, Inc.

301314 04-Jun-2016 arybchik

MFC r301075

sfxge(4): avoid code duplication in SW events definition

Sponsored by: Solarflare Communications, Inc.

301313 04-Jun-2016 arybchik

MFC r301067

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.

301312 04-Jun-2016 arybchik

MFC r301065

sfxge(4): zero should be used as RxQ label in SW event

The buggy code was using the rxq index but should use the evq label
associated with the rxq. It was missed in r298735.

Sponsored by: Solarflare Communications, Inc.

298836 30-Apr-2016 arybchik

MFC r298735

sfxge(4): do not use RxQ index as label

Labels are limitted by 32 on EF10. It is not sufficient on powerful hosts.
Since only one RxQ is running over each EvQ, zero label may be used.

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
PR: 208267
Differential Revision: https://reviews.freebsd.org/D6121

295526 11-Feb-2016 arybchik

MFC r295467

sfxge: implement SIOCGI2C to read information from phy modules

The IOCTL is used by 'ifconfig -v' to show SFP+/QSFP+ information
including inventory information and dianostics (temperature, light
levels, voltage etc).

Reviewed by: gnn,melifaro
Approved by: re (gjb)
Sponsored by: Solarflare Communications, Inc.

294406 20-Jan-2016 arybchik

MFC r294372

sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by: Solarflare Communications, Inc.

294404 20-Jan-2016 arybchik

MFC r294310

sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294403 20-Jan-2016 arybchik

MFC r294309

sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes. This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294402 20-Jan-2016 arybchik

MFC r294259

sfxge: regenerate EF10 registers definition for Medford

Sponsored by: Solarflare Communications, Inc.

294401 20-Jan-2016 arybchik

MFC r294257

sfxge: regenerate siena_flash.h from FW sources

Sponsored by: Solarflare Communications, Inc.

294400 20-Jan-2016 arybchik

MFC r294256

sfxge: cleanup: remove extra empty lines

Sponsored by: Solarflare Communications, Inc.

294399 20-Jan-2016 arybchik

MFC r294255

sfxge: highlight that descriptor cache sizes are configured using TLV now

Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294398 20-Jan-2016 arybchik

MFC r294254

sfxge: support RFID-selectable segments of dynamic configuration

tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by: Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294397 20-Jan-2016 arybchik

MFC r294253

sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU

This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294396 20-Jan-2016 arybchik

MFC r294094

sfxge: check the RX DMA end padding configuration on Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294395 20-Jan-2016 arybchik

MFC r294092

sfxge: rename Huntington MAC methods to EF10 and use for Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294394 20-Jan-2016 arybchik

MFC r294091

sfxge: rename common hunt PHY methods to ef10 and use for Medford

Leaving BIST methods for now as, though the Medford bootrom now has lots
of BIST support, production firmware doesn't appear to have been updated
yet.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294393 20-Jan-2016 arybchik

MFC r294081

sfxge: cleanup: simplify ef10_get_datapath_caps

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294392 20-Jan-2016 arybchik

MFC r294079

sfxge: Medford still needs fallback for no privilege mask

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294391 20-Jan-2016 arybchik

MFC r294078

sfxge: medford stores a single global copy of VPD

Not per PF copies as on Huntington.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294390 20-Jan-2016 arybchik

MFC r294077

sfxge: support FATSOv2

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294389 20-Jan-2016 arybchik

MFC r294076

sfxge: rework MCDI request completion

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294388 20-Jan-2016 arybchik

MFC r294075

sfxge: rename hunt_link_state_t to ef10_link_state_t

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294387 20-Jan-2016 arybchik

MFC r293902

sfxge: cleanup: quieten efx_mcdi_read_resonse_header error reporting

The "mcdi_err_arg" probe still reports results of failed MCDI
commands, unless the caller invoked efx_mcdi_execute_quiet().

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294386 20-Jan-2016 arybchik

MFC r293901,r294371

sfxge: add accessors for license-related MCDI calls to common code

Add support for Huntington MCDI licensing interface to common code.
Ported from Linux net driver IOCTL functions with restructuring for
initial support for V3 licensing API.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294385 20-Jan-2016 arybchik

MFC r293900

sfxge: add table entries for License NVRAM partition

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294384 20-Jan-2016 arybchik

MFC r293899

sfxge: cleanup: adjust efx_mcdi_get_port_modes() comment for clarity

Fix an explanatory comment which did not explain very well.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294383 20-Jan-2016 arybchik

MFC r293895

sfxge: fix common code VPD iterator and duplicate tag verification

Fix efx_vpd_hunk_next() which has -- since its inception -- failed to
correctly iterate over the tags and keywords contained in the VPD data.
Only the first tag or keyword would be returned and the next call with
*contp == 1 would walk to the end of the data and finish.

This was spotted when fixing up errors spotted by Prefast code analysis
(which neglected to set all of the out parameters in all successful cases)

Also fix efx_vpd_verify() on Siena and EF10 which (as a side effect of
correctly iterating over all the tags and keywords) was failing as it
detected that both the static VPD and dynamic VPD storage contained an
RV keyword in the VPD-R tag. This is intentional as the static VPD and
dynamic VPD are stored separately (firmware merges their contents and
computes a new RV keyword checksum for the data readable from the VPD
capability in PCIe configuration space).

Submitted by: Andrew Lee <alee at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294382 20-Jan-2016 arybchik

MFC r293892

sfxge: use correct register definitions for setting interrupt moderation on Medford

The only value which has changed is the number of rows
(ER_DZ_EVQ_TMR_REG_ROWS is 2048 vs 1024 for FR_BZ_TIMER_COMMAND_REGP0_ROWS)
but that isn't used, so this shouldn't change behaviour.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294381 20-Jan-2016 arybchik

MFC r293891

sfxge: support FATSOv2 in common code

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294380 20-Jan-2016 arybchik

MFC r293890

sfxge: rx_prefix_pktlen methods do not require EFSYS_OPT_RX_SCALE

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294379 20-Jan-2016 arybchik

MFC r293889,r294080,r294093,r294201,r294249-r294252

sfxge: convert nvram methods to use partition id

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294378 20-Jan-2016 arybchik

MFC r293888

sfxge: rework MCDI start request

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294377 20-Jan-2016 arybchik

MFC r293887

sfxge: add Medford NIC methods

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294019 14-Jan-2016 arybchik

MFC r293819

sfxge: cleanup: fix return code types

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294018 14-Jan-2016 arybchik

MFC r293818

sfxge: cleanup: fix typo in unused EFX_QWORD_IS_SET64

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294017 14-Jan-2016 arybchik

MFC r293817

sfxge: cleanup: prefast fixes in common code

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294016 14-Jan-2016 arybchik

MFC r293814

sfxge: cleanup: simplify EFX header includes

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294015 14-Jan-2016 arybchik

MFC r293813

sfxge: define FATSOv2 option descriptors

Sponsored by: Solarflare Communications, Inc.

294014 14-Jan-2016 arybchik

MFC r293812

sfxge: add Medford firmware subtypes definitions

Pulled firmware_ids.h from firmwaresrc and applied genfwdef script.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294013 14-Jan-2016 arybchik

MFC r293811

sfxge: support MC_CMD_GET_CAPABILITIES_V2

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294012 14-Jan-2016 arybchik

MFC r293810

sfxge: simplify conversion of NVRAM types to/from partition ids

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294010 14-Jan-2016 arybchik

MFC r293809

sfxge: simplify MCDI request start

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294009 14-Jan-2016 arybchik

MFC r293808

sfxge: note VI_SHIFT reported in ALLOC_VIS response

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294008 14-Jan-2016 arybchik

MFC r293807

sfxge: rework RX prefix handling in the common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294007 14-Jan-2016 arybchik

MFC r293806

sfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT

The EFSYS_OPT_RX_HDR_SPLIT optional feature in the common code
implemented the Lookahead Split feature of Windows. This split
received packets at a preconfigured byte offset, and delivered
the header and payload portions to separate receive queues.

Now the common code interface has no callers, so remove it.

Note that this should not be confused with the Header Data Split
feature of Windows, which splits packets at a header boundary.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294006 14-Jan-2016 arybchik

MFC r293805

sfxge: rename common hunt NIC methods to ef10

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

294005 14-Jan-2016 arybchik

MFC r293774

sfxge: regenerate MCDI header

Sponsored by: Solarflare Communications, Inc.

294004 14-Jan-2016 arybchik

MFC r293773

sfxge: remove obsolete lookahead split RXQ support

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294003 14-Jan-2016 arybchik

MFC r293772

sfxge: pass context type and num_queues to efx_mcdi_rss_context_alloc

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294002 14-Jan-2016 arybchik

MFC r293770

sfxge: cleanup: use consistent types for NVRAM partitions

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294001 14-Jan-2016 arybchik

MFC r293769

sfxge: fix interrupt handling for Medford

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

294000 14-Jan-2016 arybchik

MFC r293768

sfxge: update NVRAM partition lookup for Medford

Prior to Medford, option ROM config was stored with one partition
per network port. Medford stores option ROM config in a single
partition (as an array of configurations, one per PF).

Update the EFXname /port to MCDI partition mapping for this.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293999 14-Jan-2016 arybchik

MFC r293767

sfxge: cleanup: improve consistency in efx_check.h

Make error messages consistent, and remove redundant checks.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293998 14-Jan-2016 arybchik

MFC r293766

sfxge: remove obsolete efx_mac_hash_set() from common code

This API has been replaced by efx_mac_multicast_list_set()
and has no callers.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293997 14-Jan-2016 arybchik

MFC r293765

sfxge: rework MCDI header version handling

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293996 14-Jan-2016 arybchik

MFC r293764

sfxge: rename hunt filter methods, types etc. to ef10 and use for Medford

New filters types may be added, but the same machinery should be able to
handle them.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293995 14-Jan-2016 arybchik

MFC r293763

sfxge: add definitions for compressed satellite images to common code headers

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293994 14-Jan-2016 arybchik

MFC r293762

sfxge: add new MCDI sensors to common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293993 14-Jan-2016 arybchik

MFC r293761

sfxge: remove unnecessary pulling out of soft bits from RX events

These bits are changed on Medford.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293992 14-Jan-2016 arybchik

MFC r293758

sfxge: remove obsolete common code PKTFILTER module

The pktfilter module has been obsolete for some time, as
it was replaced by newer features in filter module. With
the removal of the storport driver, this module has no
users and can be removed.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293991 14-Jan-2016 arybchik

MFC r293757

sfxge: rename hunt MCDI methods to ef10 and use for Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293990 14-Jan-2016 arybchik

MFC r293756

sfxge: rename hunt nvram methods and use for Medford

Some new partitions have been added, but they shouldn't need to be
handled any differently.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293989 14-Jan-2016 arybchik

MFC r293755

sfxge: rename Huntington VPD methods to ef10 and use for Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293988 14-Jan-2016 arybchik

MFC r293754

sfxge: rename hunt RX methods to ef10 and use for Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293987 14-Jan-2016 arybchik

MFC r293753

sfxge: rename hunt TX methods to ef10 and use for Medford

Rename all except hunt_tx_qdesc_tso_create(), which creates a
fw-assisted TSO v1 descriptor which isn't supported on Medford.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293986 14-Jan-2016 arybchik

MFC r293752

sfxge: rename hunt ev methods to ef10 and use for Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293985 14-Jan-2016 arybchik

MFC r293751

sfxge: rename hunt interrupt methods to ef10 and use on Medford

All of these apply to both Huntington and Medford.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293984 14-Jan-2016 arybchik

MFC r293750

sfxge: update SRAM methods to be no-ops on Medford as well

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293983 14-Jan-2016 arybchik

MFC r293749

sfxge: use NIC config in place of some Huntington specific PIO constants

This should allow these functions to work for Medford as well.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293982 14-Jan-2016 arybchik

MFC r293748

sfxge: change hunt specific fields of efx_nic_t to ef10

All these fields will be used in shared ef10 code, so put them in an
ef10 member of a per-architecture union, rather that in the per-chip
union.

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293981 14-Jan-2016 arybchik

MFC r293740

sfxge: update autogenerated monitors lists

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293980 14-Jan-2016 arybchik

MFC r293734

sfxge: add medford_impl.h, medford_nic.c, ef10_impl.h

Creating some files together to do the build system changes in one go.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293978 14-Jan-2016 arybchik

MFC r293733

sfxge: add Medford sensor support

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293976 14-Jan-2016 arybchik

MFC r293732

sfxge: use MCDIv2 on Medford

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293975 14-Jan-2016 arybchik

MFC r293731

sfxge: add Medford PCI IDs to common code

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293974 14-Jan-2016 arybchik

MFC r293730

sfxge: add sanity checking for EFX_OPT_MEDFORD build option to efx_check.h

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293973 14-Jan-2016 arybchik

MFC r293658

sfxge: add Medford build option disabled by default

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293972 14-Jan-2016 arybchik

MFC r292090

sfxge: unify MCDI response polling

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: philip
Sponsored by: Solarflare Communications, Inc.

293971 14-Jan-2016 arybchik

MFC r292088

sfxge: simplify MCDI methods

It is a part of MCDI rework to share more code among NIC families.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293970 14-Jan-2016 arybchik

MFC r292086

sfxge: add tunable for maximum start attetmps after reset

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293969 14-Jan-2016 arybchik

MFC r292055

sfxge: consolidate privilege check functions

To reduce code duplication in common code, consolidate similar privilege
check functions.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293968 14-Jan-2016 arybchik

MFC r292053

sfxge: cleanup: fix header

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293967 14-Jan-2016 arybchik

MFC r292052

sfxge: simplify privilege checks with macro

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293966 14-Jan-2016 arybchik

MFC r292010

sfxge: cleanup: removed unused variable

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

293965 14-Jan-2016 arybchik

MFC r292009

sfxge: cleanup: fix (unused) EFX_OR_BYTE macro

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293964 14-Jan-2016 arybchik

MFC r292008

sfxge: use MAC spoofing TX and MAC change privileges

Update of common code to provide a query on the MAC_SPOOFING_TX and
CHANGE_MAC privileges instead of the deprecated MAC_SPOOFING privilege.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293963 14-Jan-2016 arybchik

MFC r292051

sfxge: [6/6] support for MCDI proxy authorization in common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293962 14-Jan-2016 arybchik

MFC r292050

sfxge: [5/6] rework event completion error handling

Required for MCDI proxy authorization support.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293961 14-Jan-2016 arybchik

MFC r292007

sfxge: [4/6] rework MCDI response polling

Required for MCDI proxy authorization support.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293960 14-Jan-2016 arybchik

MFC r291985

sfxge: [3/6] rework MCDI response handling

Required for MCDI proxy authorization support.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293959 14-Jan-2016 arybchik

MFC r291928

sfxge: [2/6] rework MCDI response polling

Required to support MCDI proxy authorization.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293958 14-Jan-2016 arybchik

MFC r291927

sfxge: [1/6] add common code MCDI proxy auth build option

Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293957 14-Jan-2016 arybchik

MFC r291926

sfxge: fix pointer parameter/value signedness mismatch warnings

TLV routines use 'uint8_t *', NVRAM code uses caddr_t. Just cast to
required type to fix the warning.

Required to build with -Werror=pointer-signg.

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293956 14-Jan-2016 arybchik

MFC r291925

sfxge: fix name conflict with crc32_table from sys/crc32.h

The header is not present on FreeBSD, but exists on OmniOS where sfxge
common code is used as well.

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293955 14-Jan-2016 arybchik

MFC r291924

sfxge: switch to TxQ creation specific flags

It is better do not mix TxQ creation and receive event flags since only
checksum flags are applicable to TxQ.
Also it will allow to add a new TxQ creation specific flags.

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293954 14-Jan-2016 arybchik

MFC r291923

sfxge: [Sorrento] support writing of MUM firmware

When writing the MUM firmware the chunk size must be equal to the erase
size.

Submitted by: Laurence Evans <levans at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293953 14-Jan-2016 arybchik

MFC r291922

sfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag

Use flag on vadapter alloc when reported as a supported capability.
Use the slow device reset only when the capability is missing.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293952 14-Jan-2016 arybchik

MFC r291862

sfxge: erase nvram partitions in chunks equal to their erase size

The erase size is reported by the nvram info command.

Submitted by: Paul Fox <pfox at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

293951 14-Jan-2016 arybchik

MFC r291849

sfxge: pick up the new TLV structures

The header is auto-generated from firmware sources.

Sponsored by: Solarflare Communications, Inc.

293950 14-Jan-2016 arybchik

MFC r291848

sfxge: cleanup: remove set but not used trailer variable

Required to build with -Werror=unused-but-set-variable.

Sponsored by: Solarflare Communications, Inc.

293949 14-Jan-2016 arybchik

MFC r291847

sfxge: cleanup: remove set but not used variable with parse error indication

Required to build with -Werror=unused-but-set-variable.
Keep it under #if 0 as a reminder for parse error processing.

Sponsored by: Solarflare Communications, Inc.

293948 14-Jan-2016 arybchik

MFC r291846

sfxge: cleanup: remove set but not used saved_spec variable

Required to build with -Werror=unused-but-set-variable.

Sponsored by: Solarflare Communications, Inc.

293947 14-Jan-2016 arybchik

MFC r291845

sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs

The SFL9122 "Huntington" controller was never built.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293946 14-Jan-2016 arybchik

MFC r291843

sfxge: support for MCDI logging implemented

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

293945 14-Jan-2016 arybchik

MFC r291747

sfxge: [EF10] support RxQ scattering control

If, for example, a VF is configured to use a 1500 byte MTU, but the port
it is attached to is set to 9000 bytes, overlength frames can be received
by the VF. As Huntington scatters by default, these overlength packets
would be scattered across several descriptors, with all except the last
having the CONT bit set.

To avoid this, disable scatter when creating RXQs if the firmware
supports doing so, which all recent versions do. Then we only get
a single descriptor from an overlength frame. This will have the CONT
bit set to indicate it was truncated, so we can discard it.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293944 14-Jan-2016 arybchik

MFC r291746

sfxge: add additional WRITESIZE value for NVRAM_INFO command

Submitted by: Paul Fox <pfox at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293943 14-Jan-2016 arybchik

MFC r291682

sfxge: regenerate MCDI headers

Sponsored by: Solarflare Communications, Inc.

293942 14-Jan-2016 arybchik

MFC r291680

sfxge: remove internal register definitions that should not be used by host code

Submitted by: Guido Barzini <gbarzini at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293941 14-Jan-2016 arybchik

MFC r291679

sfxge: add markers for autogenerated defines

Move use defines outside.

Submitted by: Guido Barzini <gbarzini at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293940 14-Jan-2016 arybchik

MFC r291678

sfxge: sync TLV layout headers with firmwaresrc for event merging config

Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293939 14-Jan-2016 arybchik

MFC r291677

sfxge: add MCDI logging support to common code

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293938 14-Jan-2016 arybchik

MFC r291590

sfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet

After an MC reboot, a VF driver may reset before the PF driver has
finished bringing everything back up. This includes the VFs EVB port.
MC_CMD_VADAPTOR_ALLOC is the first MCDI call after an MC reboot to
require the EVB port, so if it fails with MC_CMD_ERR_NO_EVB_PORT,
retry the command a few times after waiting a while.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293937 14-Jan-2016 arybchik

MFC r291588

sfxge: add function to query link control privilege

Make link control privilege visible to OS driver to guard updates to
flow control and PHY advertised capabilities.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293936 14-Jan-2016 arybchik

MFC r291587

sfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl

It allows manftest to program them.

Submitted by: Paul Fox <pfox at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293935 14-Jan-2016 arybchik

MFC r291586

sfxge: allow VFs to have locally administered MAC addresses

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293934 14-Jan-2016 arybchik

MFC r291585

sfxge: support MAC spoofing for 4.2.x firmare

Common code should infer other privileges from Admin privilege to
support firmware that pre-dates introduction of specific privilege
flags.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293933 14-Jan-2016 arybchik

MFC r291584

sfxge: parse packets for TSO early in if_transmit

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

293931 14-Jan-2016 arybchik

MFC r291570

sfxge: added setting TSO-related parameters

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

293930 14-Jan-2016 arybchik

MFC r291569

sfxge: avoid TSO packets collapses if packet header uses 2 segments

It is really observed in the case of VLAN over sfxge interface.
Also this change makes total value equal to 35 which is default assumed
by the kernel for if_hw_tsomaxsegcount.

Sponsored by: Solarflare Communications, Inc.

293928 14-Jan-2016 arybchik

MFC r291488

sfxge: avoid TSO packets collapses bacause of not 2K aligned data

Sponsored by: Solarflare Communications, Inc.

293927 14-Jan-2016 arybchik

MFC r291436

sfxge: add prefast annotation to common code return types

Using a typedef for common code return types (rather than "int")
allows the Prefast static analyser to understand when a function
has been successful (and thus when its postconditions must hold).

This greatly reduces then number of false positives reported by
prefast for error paths in common code functions.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293926 14-Jan-2016 arybchik

MFC r291434

sfxge: cleanup: fix prefast annotations on mac stats updates

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293925 14-Jan-2016 arybchik

MFC r291432

sfxge: modify nvram update functions for uio platform to support
RFID-selectable presets

Dynamic config partitions on boards that support RFID are divided into
a number of segments, each formatted like a partition, with header,
trailer and end tags. The first segment is the current active
configuration.

The segments are initialised by manftest and each contain a different
configuration e.g. firmware variant. The firmware can be instructed
via RFID to copy a segment over the first segment, hence changing the
active configuration. This allows ops to change the configuration of
a board prior to shipment using RFID.

Changes to the dynamic config may need to be written to all segments (in
particular firmware versions written by manftest) or just the first
segment (changes to the active configuration). See SF-111324-SW.
If only the first segment is written the code still needs to be aware of
the possible presence of subsequent segments as writing to a segment may
cause its size to increase, which would overwrite the subsequent
segments and invalidate them.

Boards that do not support RFID will only have one segment in their
dynamic config partition.

Submitted by: Paul Fox <pfox at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293924 14-Jan-2016 arybchik

MFC r291398

sfxge: cleanup: report error on failure path in efx_vpd_hunk_verify

If the VPD is corrupt and contains an 'RV' keyword before the
END tag, then this function could return without setting the
return code to report the error.

Found by prefast.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293923 14-Jan-2016 arybchik

MFC r291397

sfxge: cleanup: fix prefast annotations on mac stats updates

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293922 14-Jan-2016 arybchik

MFC r291396

sfxge: fix prefast warning in falconsiena_tx_qcreate

Keep prefast happy by returning the initial queue index
from falconsiena_tx_qcreate(). No change in behaviour, as
etxo_qcreate already zeros *addedp before the call.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293921 14-Jan-2016 arybchik

MFC r291395

sfxge: cleanup: fix prefast annotations for stats buffers

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293920 14-Jan-2016 arybchik

MFC r291394

sfxge: unlink PIO buffers from VIs in WC mapping in hunt_nic_fini()

PIO is not yet supported in the FreeBSD driver.

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293919 14-Jan-2016 arybchik

MFC r291393

sfxge: infer external port numbering for Pavia

Adjust external port mapping table to distinguish Pavia from Monza.
Now the presence of any 40G mode implies at least 2 outputs per
external port. So Pavia 4x10G ports are now mapped to 1,2,3,4;
Monza 4x10G ports map to 1,1,2,2 as before.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293918 14-Jan-2016 arybchik

MFC r291392

sfxge: cleanup: fix prefast annotation

Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

293917 14-Jan-2016 arybchik

MFC r291391

sfxge: do not use unnamed union in siena_mc_combo_rom_hdr_t

GCC 4.2.1 used on FreeBSD 8 and 9 branches does not like unnamed
union member in the structure. It is not strictly required in head,
but nice to have to minimize difference with out-of-tree driver.

Sponsored by: Solarflare Communications, Inc.

293916 14-Jan-2016 arybchik

MFC r291390

sfxge: cleanup: error probe correction

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

292089 11-Dec-2015 arybchik

sfxge: implement interface statistics shown by netstat

PR: 202907
Submitted by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
Reviewed by: gnn, philip
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D4317

285813 23-Jul-2015 arybchik

MFC r285798

sfxge: added fallbacks for pre 4.2.1 firmware support

Driver must be able to start against older firmware that is missing
recently added MCDI calls, otherwise firmware upgrade will not be
possible.

Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: re (gjb)

284867 26-Jun-2015 arybchik

MFC: r284747

sfxge: skip VPD info population if access is denied

The patch allows to run on unprivileged PF (PFIOV) passed to
a virtual machine.

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.

284556 18-Jun-2015 arybchik

MFC: r283679

sfxge: do not use DEBUG_FLAGS to enable extra debug checks

DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

Reviewed by: imp
Sponsored by: Solarflare Communications, Inc.

284555 18-Jun-2015 arybchik

MFC: r283514

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.

284554 18-Jun-2015 arybchik

sfxge: use if_initbaudrate() to set interface baudrate

It is required to cope with u_long limit for 10 Gbps in a right way.
It is a direct commit to stable/10 since head differs (head does not
have if_initbaudrate(), if_baudrate is simply uint64_t).

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D2849

283682 29-May-2015 arybchik

MFC: r283599

sfxge: mask ifmedia options (pauses) when looking for matching mode

Sponsored by: Solarflare Communications, Inc.

283350 24-May-2015 arybchik

MFC: r283278

sfxge: relax assertion to allow RST flag in TSO packets

Kernel under stress load, mixed MC reboot and sfupdate really
generates TSO packet with RST flag.
It will generate many TCP packets with RST flag set.
May be RST flag should be set in the last segment only, but it could be
dropped. So, it is safer to keep the flag in all packets to be sure that
connection is reset.

Sponsored by: Solarflare Communications, Inc.

283217 21-May-2015 arybchik

MFC: r283051

sfxge: do not advertise LRO capability if LRO is compiled out

Sponsored by: Solarflare Communications, Inc.

283216 21-May-2015 arybchik

MFC: r283050

sfxge: automatically turn off TSO when Tx checksum offload is disabled

Also return error if TSO is requested without Tx checksum offload.

Sponsored by: Solarflare Communications, Inc.

283215 21-May-2015 arybchik

MFC: r283049

sfxge: allow to disable checksum offloads over VLAN

It just affects capabilities of the created VLAN interface.

Sponsored by: Solarflare Communications, Inc.

283214 21-May-2015 arybchik

MFC: r283048

sfxge: fix overflow queue freeze

If TxQ lock is obtained, deferred packet list shold be serviced even if
the packet addition fails because of overflow.

Without the patch freeze happens if:
- queue is not blocked (i.e. completion does not trigger unblock and service)
- put-list overflow (1024 entries)
- sfxge_tx_packet_add() acquires TxQ lock just as it is released it in
sfxge_tx_qdpl_service() on the second CPU but before pending check
- sfxge_tx_packet_add() swizzles put-list to get-list, fails because of
non-tcp get-list overflow and returns without packet list service
- sfxge_tx_qdpl_service() on the second CPU checks that there are no
pending packets in the put-list and returns

Other possible solution is to guaranee that maximum length of the put-list
is less than maximum length of any get-list.

Sponsored by: Solarflare Communications, Inc.

283213 21-May-2015 arybchik

MFC: r283007

sfxge: avoid usage of ifm_data

The driver uses ifm_data to save capabilities mask calculated during
initialization when supported phy modes are discovered.
The patch simply calculates it when either media or options are changed.

Sponsored by: Solarflare Communications, Inc.

283212 21-May-2015 arybchik

MFC: r283000

sfxge: add local variable with changed capabilities mask

It is required for the next patch which adds dependency of TSO
capabilities from Tx checksum offloads.

Sponsored by: Solarflare Communications, Inc.

283211 21-May-2015 arybchik

MFC: r282998

sfxge: move mbuf free to sfxge_if_transmit()

It is a preparation to the next patch which will service packet queue
even if packet addtion fails.

Sponsored by: Solarflare Communications, Inc.

283210 21-May-2015 arybchik

MFC: r282997

sfxge: get rid of locked variable in sfxge_tx_packet_add()

Now each branch has one and only one possible TxQ lock state.
It simplifies understanding of the code.

Sponsored by: Solarflare Communications, Inc.

283209 21-May-2015 arybchik

MFC: r282996

sfxge: support Rx checksum offloads disabling

We can't disable it in HW, but we can ignore result.
Discard Rx descriptor checksum flags if Rx checksum offload is off.

Sponsored by: Solarflare Communications, Inc.

283208 21-May-2015 arybchik

MFC: r282942

sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked()

It simplifies understanding of the sfxge_tx_packet_add() logic and
avoids passing of 'locked' to called function.

Sponsored by: Solarflare Communications, Inc.

283207 21-May-2015 arybchik

MFC: r282941

sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed

It is simply not required since the kernel checks corresponding
IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads.
Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits
are set in IPv4 and IPv6 mbufs.

Sponsored by: Solarflare Communications, Inc.

283206 21-May-2015 arybchik

MFC: r282940

sfxge: LRO may be done only if checksums are OK

Also it is cheaper to check Rx descriptor flags than TCP protocol in IP
header.

Sponsored by: Solarflare Communications, Inc.

283205 21-May-2015 arybchik

MFC: r282903

sfxge: advertise IPv6 Rx and Tx checksum offload support

Tx checksum offload may be enabled/disabled.

Sponsored by: Solarflare Communications, Inc.

283204 21-May-2015 arybchik

MFC: r282900

sfxge: IPv4 Tx checksum offload may be disabled in fact

Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx.

Sponsored by: Solarflare Communications, Inc.

283203 21-May-2015 arybchik

MFC: r282899

sfxge: add local variable with Rx descriptor flags

Sponsored by: Solarflare Communications, Inc.

283202 21-May-2015 arybchik

MFC: r282897

sfxge: add missing const qualifier to sfxge_link_mode

Sponsored by: Solarflare Communications, Inc.

281955 24-Apr-2015 hiren

MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@

r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

r275483:
Remove M_FLOWID from SCTP code.

r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.

Note: The FreeBSD version has been bumped.

Reviewed by: hps, tuexen
Sponsored by: Limelight Networks


/freebsd-10-stable/share/man/man9/netisr.9
/freebsd-10-stable/sys/dev/bxe/bxe.c
/freebsd-10-stable/sys/dev/cxgb/cxgb_sge.c
/freebsd-10-stable/sys/dev/cxgbe/t4_main.c
/freebsd-10-stable/sys/dev/cxgbe/t4_sge.c
/freebsd-10-stable/sys/dev/e1000/if_igb.c
/freebsd-10-stable/sys/dev/ixgbe/ixgbe.c
/freebsd-10-stable/sys/dev/ixgbe/ixv.c
/freebsd-10-stable/sys/dev/ixl/ixl_txrx.c
/freebsd-10-stable/sys/dev/mxge/if_mxge.c
/freebsd-10-stable/sys/dev/netmap/netmap_freebsd.c
/freebsd-10-stable/sys/dev/oce/oce_if.c
/freebsd-10-stable/sys/dev/qlxgbe/ql_isr.c
/freebsd-10-stable/sys/dev/qlxgbe/ql_os.c
/freebsd-10-stable/sys/dev/qlxge/qls_isr.c
/freebsd-10-stable/sys/dev/qlxge/qls_os.c
sfxge_rx.c
sfxge_tx.c
/freebsd-10-stable/sys/dev/virtio/network/if_vtnet.c
/freebsd-10-stable/sys/dev/vmware/vmxnet3/if_vmx.c
/freebsd-10-stable/sys/dev/vxge/vxge.c
/freebsd-10-stable/sys/net/flowtable.c
/freebsd-10-stable/sys/net/ieee8023ad_lacp.c
/freebsd-10-stable/sys/net/if_lagg.c
/freebsd-10-stable/sys/net/if_lagg.h
/freebsd-10-stable/sys/net/netisr.c
/freebsd-10-stable/sys/netinet/in_pcb.h
/freebsd-10-stable/sys/netinet/ip_output.c
/freebsd-10-stable/sys/netinet/sctp_indata.c
/freebsd-10-stable/sys/netinet/sctp_input.c
/freebsd-10-stable/sys/netinet/sctp_output.c
/freebsd-10-stable/sys/netinet/sctp_pcb.c
/freebsd-10-stable/sys/netinet/sctp_structs.h
/freebsd-10-stable/sys/netinet/sctputil.c
/freebsd-10-stable/sys/netinet/tcp_input.c
/freebsd-10-stable/sys/netinet/tcp_syncache.c
/freebsd-10-stable/sys/netinet6/sctp6_usrreq.c
/freebsd-10-stable/sys/ofed/drivers/net/mlx4/en_rx.c
/freebsd-10-stable/sys/ofed/drivers/net/mlx4/en_tx.c
/freebsd-10-stable/sys/sys/mbuf.h
/freebsd-10-stable/sys/sys/param.h
280901 31-Mar-2015 arybchik

MFC: r280807

sfxge: fix bug in TSO when a DMA segment has both header and data

Sponsored by: Solarflare Communications, Inc.

280615 25-Mar-2015 arybchik

MFC: 279398

sfxge: compile out LRO if kernel is compiled without IPv4 and IPv6

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

MFC: 279411

Unbreak 'make depend' with sfxge by removing debugging code activated in the
INET || INET6 case

X-MFC with: r279398
Pointyhat to: arybchik

280613 25-Mar-2015 arybchik

MFC: 280433

sfxge: cleanup: fix index variable type to match upper boundary type

Sponsored by: Solarflare Communications, Inc.

280612 25-Mar-2015 arybchik

MFC: 280432

sfxge: cleanup: add a blank line before each #if to improve readability

Sponsored by: Solarflare Communications, Inc.

280610 25-Mar-2015 arybchik

MFC: 280380

sfxge: remove unnecessary and wrong prediction

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2085

280609 25-Mar-2015 arybchik

MFC: 280379

sfxge: do not check MCDI status word

This is a temporary workaround until we determine a reliable sequence
of operations for detecting MC reboots.

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2084

280608 25-Mar-2015 arybchik

MFC: 280378

sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64

bus_space_*_8() are not always macros, so it is not correct to use
#ifndef.

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2083

280607 25-Mar-2015 arybchik

MFC: 280377

sfxge: add statistics for each Tx queue

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2082

280606 25-Mar-2015 arybchik

MFC: 280376

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.
Original Differential Revision: https://reviews.freebsd.org/D2081

280605 25-Mar-2015 arybchik

MFC: 280375

sfxge: add barriers to BAR write macros

In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
1. Before the first write to guarantee that previous writes to the region
have been done
2. Before the last write to guarantee that write to the last dword/qword is
done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2077

280604 25-Mar-2015 arybchik

MFC: 280374

sfxge: assert either kernel or internal copy of interface flags

ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.

Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2075

280603 25-Mar-2015 arybchik

MFC: 280164

sfxge: increase default put-list limit to 1024

Drops are observed under multi-stream TCP traffic due to put-list
overflow with limit equal to 64.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280602 25-Mar-2015 arybchik

MFC: 280163

sfxge: prefetch txq->common if TxQ is started only

Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280601 25-Mar-2015 arybchik

MFC: 280162

sfxge: adding version info to device description

The information is required for NIC update and config tools.

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280600 25-Mar-2015 arybchik

MFC: 280161

sfxge: move deferred packet list statistics to dedicated node

It is done to structure sysctl and do not mix with Tx queue statistics
to be added.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280599 25-Mar-2015 arybchik

MFC: 280160

sfxge: add tunables to control LRO parameters on driver load time

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280596 25-Mar-2015 arybchik

MFC: 279351

sfxge: expect required init_state on data path and in periodic calls

With the patch applied the number of instruction events is 1% less and
number of mispredicted branch events is 5% less under multistream TCP
traffic load close to line rate.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280593 25-Mar-2015 arybchik

MFC: 279266

sfxge: correct limit for number of Rx queues

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280592 25-Mar-2015 arybchik

MFC: 279231

sfxge: add put-list high watermark

It is interesting to know how long put-list grows.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280590 25-Mar-2015 arybchik

MFC: 279230

sfxge: use goto to cleanup to avoid duplicate cleanup code

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280589 25-Mar-2015 arybchik

MFC: 279183

sfxge: add common code support for changing TX queue pace

To delay packets from a particular TX queue by a particular time, write a value
into the TX Pace table s.t. pace time <= TX Pace Clock Period * (2 ^ pace value)
- the TX pace clock is 1/13 of the system clock, so its period should be 104 or
52 ns depending on whether turbo mode is active.

EFX_TX_PACE_CLOCK_BASE added by me.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280588 25-Mar-2015 arybchik

MFC: 279182

sfxge: correct event queue interrupt moderation timer quanta

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280585 25-Mar-2015 arybchik

MFC: 279179

sfxge: DMA allocated memory is set to zeros because of BUS_DMA_ZERO flag

It is not required to set it to zeros once again.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280584 25-Mar-2015 arybchik

MFC: 279178

sfxge: do no allow EFSYS_MEM_ALLOC sleep

It solves locking problem when EFSYS_MEM_ALLOC is called in
the context holding a mutex (not allowed to sleep).
E.g. on interface bring up or multicast addresses addition.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280582 25-Mar-2015 arybchik

MFC: 279177

sfxge: assert event queue lock in event handlers

It is useful to highlight lock context.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280581 25-Mar-2015 arybchik

MFC: 279176

sfxge: pass correct address to free allocated memory in the case of load error

It is one more place missed in the previous fix.
Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280580 25-Mar-2015 arybchik

MFC: 279175

sfxge: using bus_space_*_stream_* API for better portability

Host-bus byte order translation is not requred.

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280578 25-Mar-2015 arybchik

MFC: 279174

sfxge: add missing Siena sensors to common code

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280577 25-Mar-2015 arybchik

MFC: 279173

sfxge: add missing common code NVRAM types and map from MCDI

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280576 25-Mar-2015 arybchik

MFC: 279172

sfxge: add new identities to Siena static config

Submitted by: Andrew Jackson <ajackson at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280575 25-Mar-2015 arybchik

MFC: 279147

sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280568 25-Mar-2015 arybchik

MFC: 279146

sfxge: use sparse index to retrieve sensor value

Submitted by: Andrew Jackson <ajackson at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280567 25-Mar-2015 arybchik

MFC: 279145

sfxge: use macros to acquire and release BAR locks everywhere

It was the result of invalid merge of the patch from out-of-tree driver.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280566 25-Mar-2015 arybchik

MFC: 279144

sfxge: packet can't require more than n_dma_seg descriptors plus one

Use remaining number of DMA segment instead of maximum number in mapping
when checking space for one more TSO segment packet.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280565 25-Mar-2015 arybchik

MFC: 279143

sfxge: use common definitions of MC shared memory offsets and PDU length

Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280564 25-Mar-2015 arybchik

MFC: 279142

sfxge: synchronize EF10 registers header

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280563 25-Mar-2015 arybchik

MFC: 279141

sfxge: style fixes and cleanup

Sync endif comment with conditional.
BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena.
Restore commented out assertion.
Sync comments with out-of-tree driver.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280562 25-Mar-2015 arybchik

MFC: 279098

sfxge: allow TX and RX queue limits to be changed

Before the common code had hard coded limits on the IDs RXQs and TXQs could
be created with which were suited for the Windows driver with VMQ, and so
would prevent queues with IDs greater than or equal to 259 (for TXQs) or 768
(for RXQs) from being created. This change allows the limits to be set in
efsys.h, so that all 1024 queues can be created during new manftest tests.
Also, the descriptor cache sizes were also hard coded to values suited to
the smaller queue counts, and so it was necessary to make them configurable
as well.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280561 25-Mar-2015 arybchik

MFC: 279097

sfxge: check allocations are non-NULL before freeing them

Caught when efx_filter_init() failed and called efx_filter_fini() in the
teardown path.

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280560 25-Mar-2015 arybchik

MFC: 279096

sfxge: keep fw and driver view of autoneg parameters consistent

Previously the driver's view was the expected outcome of any
reconfiguration even if that reconfiguration failed.

Submitted by: Ben Horgan
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280559 25-Mar-2015 arybchik

MFC: 279095

sfxge: never set RX_DESCQ_EN during self-test

We must not enable RX queues with random parameters when they are
mapped into a VF with an untrusted driver. It's probably not a good
idea to do this anyway, so take this bit out of the table test masks.

Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280557 25-Mar-2015 arybchik

MFC: 279094

sfxge: more accurate calculation of maximum number of TSO segments

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280556 25-Mar-2015 arybchik

MFC: 279080

sfxge: reap Tx descriptors on unblock

Otherwise when processing finally comes to efx_tx_qdesc_post() it could
be insufficient space between reaped and added to post pending
descriptors.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280555 25-Mar-2015 arybchik

MFC: 279078

sfxge: add assertions that required event handlers are implemented

efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null. Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.

Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280553 25-Mar-2015 arybchik

MFC: 279077

sfxge: style fixes

Use nitem() to get number of array elements.
Remove unused define.
Use TAB to indent.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280551 25-Mar-2015 arybchik

MFC: 279076

sfxge: regenerate sensor map

Add Florence R7 and Modena sensors.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280550 25-Mar-2015 arybchik

MFC: 279048

sfxge: add Florence R7 turbo mode support to common code

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280549 25-Mar-2015 arybchik

MFC: 279047

sfxge: regenerate MCDI protocol headers

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280547 25-Mar-2015 arybchik

MFC: 279046

sfxge: handle fragmented TCP header in mbuf

TCP header is fragmented in the case of VLAN tagged IPv6 traffic without
HW VLAN tagging.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280545 25-Mar-2015 arybchik

MFC: 278942

sfxge: fix broken MCDI_EV_FIELD() macro

Submitted by: Andrew Lee <alee at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280544 25-Mar-2015 arybchik

MFC: 278941

sfxge: support variable-length response to MCDI GET_BOARD_CFG

Allocate the minimum or maximum response length for GET_BOARD_CFG as
appropriate. When looking up firmware subtypes by partition ID,
check the ID against the actual response length.

Merge of the patch made by Ben Hutchings in 2011.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280541 25-Mar-2015 arybchik

MFC: 278940

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)

280539 25-Mar-2015 arybchik

MFC: 278939

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)

280538 25-Mar-2015 arybchik

MFC: 278938

sfxge: add driver context member with number of transmit queues

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280537 25-Mar-2015 arybchik

MFC: 278937

sfxge: add TCP segment size to sfxge_tso_state

It avoids access to m_pkthdr when TSO packet is started and also makes
tso_start_new_packet() function smaller.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280536 25-Mar-2015 arybchik

MFC: 278841

sfxge: flush all Tx queues from if_qflush

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor), glebius

280535 25-Mar-2015 arybchik

MFC: 278839

sfxge: style fixes

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280533 25-Mar-2015 arybchik

MFC: 278838

sfxge: SYSCTL_IN/OUT should not be called with non-sleepable lock held

The problem is found using WITNESS option enabled.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280532 25-Mar-2015 arybchik

MFC: 278837

sfxge: remove inline specifiers

Now compiler does not need any help.
The patch does not change generated code.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor), glebius

280530 25-Mar-2015 arybchik

MFC: 278836

sfxge: remove used sfxge_tso_state member dma_seg_i

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280528 25-Mar-2015 arybchik

MFC: 278835

sfxge: remove full_packet_size from sfxge_tso_state

It makes sfxge_tso_state smaller and even makes tso_start_new_packet()
few bytes smaller. Data used to calculate packet size are used nearby,
so it should be no problems with cache etc.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor), glebius

280527 25-Mar-2015 arybchik

MFC: 278833

sfxge: remove unused variable

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor), glebius

280526 25-Mar-2015 arybchik

MFC: 278255

sfxge: Add statistics for partially dropped TSO packets

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280525 25-Mar-2015 arybchik

MFC: 278254

sfxge: using 64-bit access for x86-64

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280524 25-Mar-2015 arybchik

MFC: 278250

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)

280523 25-Mar-2015 arybchik

MFC: 278248

sfxge: access statistics buffers under port lock

Allow access to statistics data not only from sysctl handlers.

Submitted by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280522 25-Mar-2015 arybchik

MFC: 278221

sfxge: Add macros to init, destroy, acquire, release and assert locks

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280521 25-Mar-2015 arybchik

MFC: 278220

sfxge: Implement EFSYS_MEM_READ_BARRIER()

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280519 25-Mar-2015 arybchik

MFC: 277895

sfxge: Separate software Tx queue limit for non-TCP traffic

Add separate software Tx queue limit for non-TCP traffic to make total
limit higher and avoid local drops of TCP packets because of no
backpressure.
There is no point to make non-TCP limit high since without backpressure
UDP stream easily overflows any sensible limit.

Split early drops statistics since it is better to have separate counter
for each drop reason to make it unabmiguous.

Add software Tx queue high watermark. The information is very useful to
understand how big queues grow under traffic load.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280518 25-Mar-2015 arybchik

MFC: 277894

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)

280517 25-Mar-2015 arybchik

MFC: 277893

sfxge: Use SFXGE_MODERATION to initialize event moderation

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280516 25-Mar-2015 arybchik

MFC: 277892

sfxge: Pass correct address to free allocated memory in the case of load error

Most likely is was just memory leak on the error handling path since
typically efsys_mem_t is filled in by zeros on allocation.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280515 25-Mar-2015 arybchik

MFC: 277891

sfxge: Remove unused esm_size member of the efsys_mem_t structure

esm_size is not even initialized properly when memory is allocated.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280514 25-Mar-2015 arybchik

MFC: 277890

sfxge: Do not bzero() DMA allocated memory once again

sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so
allocated memory is already filled in by zeros

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280513 25-Mar-2015 arybchik

MFC: 277889

sfxge: Add evq argument to sfxge_tx_qcomplete()

It removes necessity to get evq pointer by its index in soft context.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280512 25-Mar-2015 arybchik

MFC: 277888

sfxge: fixed TSO code to cope with VLAN headers

Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280511 25-Mar-2015 arybchik

MFC: 277887

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)

280510 25-Mar-2015 arybchik

MFC: 277886

sfxge: Make it possible to build without EVQ statistics

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280509 25-Mar-2015 arybchik

MFC: 277885

sfxge: Move txq->next pointer to part writable on completion path

In fact the pointer is used only if more than one TXQ is processed in
one interrupt.
It is used (read-write) on completion path only.
Also it makes the first part of the structure smaller and it fits now
into one 128byte cache line. So, TXQ structure becomes 128 bytes
smaller.

Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)

280508 25-Mar-2015 arybchik

MFC: 277884

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)

280507 25-Mar-2015 arybchik

MFC: 272411

Properly handle a case that should never happen (the bus_dma
callback being called with error set to non-zero).

280505 25-Mar-2015 arybchik

MFC: 272331

Support tunable to control Tx deferred packet list limits

Also increase default for Tx queue get-list limit.
Too small limit results in TCP packets drops especiall when many
streams are running simultaneously.
Put list may be kept small enough since it is just a temporary
location if transmit function can't get Tx queue lock.

Submitted by: Andrew Rybchenko <arybchenko at solarflare.com>
Sponsored by: Solarflare Communications, Inc.

280504 25-Mar-2015 arybchik

MFC: 272330

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.

280502 25-Mar-2015 arybchik

MFC: 272328

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.

280501 25-Mar-2015 arybchik

MFC: 272325

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.

280499 25-Mar-2015 arybchik

MFC: 263649

sfxge: limit software Tx queue size.

Previous implementation limits put queue size only (when Tx lock can't
be acquired), but get queue may grow unboundedly which results in mbuf
pools exhaustion and latency growth.

Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

280497 25-Mar-2015 arybchik

MFC: 263332

Add counter for Tx errors returned from if_transmit.

Submitted by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

280496 25-Mar-2015 arybchik

MFC: 263297

Return error when packet is dropped because of link down.

Submitted by: Boris Misenov <Boris.Misenov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

265884 11-May-2014 gnn

MFC: 263302, 264461, 264772

263302:
fix mbuf leak if it does not fit in software queue

264461:
Commit various fixes for the SolarFlare drivers, in particular
this set of patches fixes support for systems with > 32 cores.

Details include

sfxge: RXQ index (not label) comes from FW in flush done/failed events

Change the second argument name of the efx_rxq_flush_done_ev_t and
efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
comes from FW in flush done and failed events.

sfxge: TXQ index (not label) comes from FW in flush done event

Change the second argument name of the efx_txq_flush_done_ev_t prototype to
highlight that TXQ index (not label) comes from FW in flush done event.

sfxge: use TXQ type as label to support more than 32 TXQs

There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
in all other event queues.

264772:
Check that port is started when MAC filter is set

The MAC filter set may be called without softc_lock held in the case of
SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
flag which implies port started, but it is not guaranteed to remain.
softc_lock shared lock can't be held in the case of these ioctls processing,
since it results in failure where kernel complains that non-sleepable
lock is held in sleeping thread.

Both problems are repeatable on LAG with LACP proto bring up.

Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254800 24-Aug-2013 andre

Remove unnecessary setup of the m->pkthdr.header pointer.

Sponsored by: The FreeBSD Foundation


250460 10-May-2013 eadler

Fxi a bunch of typos.

PR: misc/174625
Submitted by: Jeremy Chadwick <jdc@koitsu.org>


243857 04-Dec-2012 glebius

Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.


234086 10-Apr-2012 glebius

M_DONTWAIT is a flag from historical mbuf(9)
allocator, not malloc(9) or uma(9) flag.


229613 05-Jan-2012 jhb

Update recently added drivers to use the if_*addr_r*lock() wrapper
functions instead of using the IF_ADDR_LOCK directly. The wrapper
functions are the supported interface for device drivers.

Reviewed by: bz, philip
MFC after: 1 week


228078 28-Nov-2011 philip

sfxge: Add $FreeBSD$ tags to common code files.

Requested by: bz


227843 22-Nov-2011 marius

- There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
(bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
since r52045) but even recently added device drivers do this unnecessarily.
Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
Discussed with: jhb
- Also while at it, use __FBSDID.


227700 19-Nov-2011 philip

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


227699 19-Nov-2011 philip

sfxge: Fix if_baudrate reports

This field is supposed to be set to the interface bit rate, but for some
reason I thought it was denominated in kilobits. Multiply the values up
accordingly, taking care to saturate rather than overflow on 32-bit
architectures.

Submitted by: Ben Hutchings <bwh -at- solarflare.com>
MFC after: 3 weeks


227641 17-Nov-2011 marius

Implement prefetch_read_{many,once}() for sparc64 and fix compilation on
other !x86 architectures.


227640 17-Nov-2011 marius

Fix compilation on ILP32.


227569 16-Nov-2011 philip

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