History log of /freebsd-current/sys/dev/sfxge/common/ef10_impl.h
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# b138e49c 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

sfxge: clean up empty lines in .c and .h files


# ec30f0be 27-Jul-2019 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): fix power of 2 round up when align has smaller type

Substitute driver-defined P2ROUNDUP() h with EFX_P2ROUNDUP()
defined in libefx.

Cast value and alignment to one specified type to guarantee result
correctness.

Reported by: Andrea Valsania <andrea.valsania at answervad.it>
Reviewed by: philip
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D21074


# d707fb20 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): correct annotations where NULL input is OK

Correct annotations where NULL input can be permitted

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


# cf94ca37 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add accessor to whole link status

Add a function which makes an MCDI GET_LINK request and
packages up the results. Currently, the get-link function
is triggered from several entry points which then pass
on or store selected parts of the data. When the driver
needs to obtain the current link state, it is more
efficient to do this in a single call.

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


# c42b6a35 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): support improvements to bandwidth calculations

Change the interface to ef10_nic_get_port_mode_bandwidth()
so more NIC information can be used to infer bandwidth
requirements. Huntington calculations separated out
completely.

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


# a8c1489f 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add support to get active FEC type

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


# b2053d80 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add API to inform libefx of hardware removal

The efx_nic_hw_unavailable() checks ensure that if the NIC hardware
has failed or has been physically removed then libefx will stop
further attempts to access the hardware.

Add an interface for libefx clients to force unavailability, so the
hardware is treated as dead or removed even if still physically present.

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


# c6d5e85d 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add routine to check for hardware presence

Add efx_nic_hw_unavailable() routine to check for hardware presence
before continuing with NIC operations.

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


# e919b7ec 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): generalise EF10 NVRAM buffer interface

The SFN driver's PartitionControl WMI object requires an API to parse
and filter partition data in TLV format, particularly for the Dynamic
Config partition. The ef10_nvram_buffer functions provide this
functionality but are tied to use with license partition only.
Modify functions so they are applicable to all TLV partitions and add
functions to support in-place tag modification.

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


# cd5e3371 30-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add accessor for default port mode

Extend efx_mcdi_get_port_modes() to optionally pass on the default
port mode field. This provides a more direct way of handling the case
where the dynamic config does not specify the port mode than the
alternative of a lookup table indexed by MCFW subtype.

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


# dbcc3c8f 28-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): fix SAL annotation for input buffers

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


# 04381b5e 28-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): support equal stride super-buffer Rx mode

Equal stride super-buffer Rx mode is supported by DPDK firmware
variant. One Rx descriptor provides many Rx buffers to firmware.
Rx buffers follow each other with specified stride.
Also it supports head of line blocking with timeout to address
drops when no Rx descriptors are available. So it gives extra time
to the driver to provide Rx descriptors before drop.

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


# 2a726a7f 28-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): make RxQ type data an union

The type is an internal interface. Single integer is insufficient
to carry RxQ type-specific information in the case of equal stride
super-buffer Rx mode (packet buffers per bucket, maximum DMA length,
packet stride, head of line block timeout).

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


# 17bcc056 28-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): support FW subvariant choice

If DPDK application or OS does not need checksumming on transmit,
it may be disabled in firmware to achieve higher packet rates.
Choice must be done before VIS allocation and is allowed if
no other non-preboot and firmware subvariant-unaware drivers are
attached.

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


# 4142e8cf 28-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add outer IP ID parameter to TSOv2 descriptor

Set outer_ip_id in the TX option descriptor for encapsulated packets.

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


# 76ecd4a3 27-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): move VI window size config to ef10 NIC board

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


# deeaf87f 27-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): move datapath config to ef10 NIC board cfg

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


# 09eac957 27-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): move port config to ef10 NIC board config

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


# 4effeb9e 26-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

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


# c63c8369 26-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): support runtime VI window size

Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Update the common code to query the VI window size via MCDI,
and add new EFX_BAR_VI_* accessor macros for per-VI registers.

The existing EFX_BAR_TBL_* macros can be used for non-VI
register tables (and for code that can never be called for
a Medford2 controller e.g. Siena-only code).

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


# 45becd76 26-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): move RxDP config get to EF10 NIC code

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


# 4f58306c 26-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): correct PIO buffer dimensions for Medford2

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


# 074cfb5c 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add function to create packed stream RxQ

Encoding packed stream buffer size in RxQ type is not a future-proof
idea taking into account a new RxQ types with extra parameters.
To be consistent make packet stream buffer size a separate parameter.
In order to avoid blowing of the default RxQ create function prototype
add a dedicated function to create packed stream RxQ without not
applicable paramters.

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


# 9445d1c5 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): control RxQ scatter using flag instead of type

Rx scatter may be applicable to different Rx queue types.

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


# 95c45bd0 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): fix coding style

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


# 0c9ef1f5 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): improve names for TXQ descriptor counts

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


# 59ee8172 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): improve names for RXQ descriptor counts

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


# 69953083 24-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): improve names for EVQ descriptor counts

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


# 1aa1b495 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): improve RxQ label init prototype

RxQ type provides more information which may be useful to
setup event queue appropriately.

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


# ede1a3ed 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): precheck and verify flash writes

Read existing flash content before writing, so the flash write can be
avoided if the existing partition content matches the new image. This
avoids unnecessary write cycles for the flash device, and may also be
faster. If the flash does need to be updated, verify the content after
writing.

Note that reading the flash content after writing but before calling
efx_nvram-rw_finish() avoids firmware bug68170, which can lead to
signed image updates failing on Medford.

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


# a21b2f20 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): report verify result from RW finish callback

This makes the verify result visible to efx_nvram_rw_finish(), which
can be extended to report it in a later patch.

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


# 82af879c 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): update RSS API to take RSS context parameter

Update efx_rx_scale_mode_set(), efx_rx_scale_key_set()
and efx_rx_scale_tbl_set().

Submitted by: Mark Spender <mspender at solarflare.com>
Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18080


# e6d55a0b 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): add API to allocate and free RSS contexts

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


# f4e2f6a5 23-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

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


# 8e0c4827 22-Nov-2018 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): support packed stream Rx mode in libefx

Submitted by: Artem V. Andreev <Artem.Andreev@oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18022


# 63492ab8 29-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8971


# f92697a4 30-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8969


# 8a4fcbd4 30-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8968


# e9c123a5 29-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

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


# 58a72cb2 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8944


# cc7a82f5 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8935


# a3fe009a 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

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

Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8931


# 75fed2ce 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): fix invalid type of eft_unicst_filter_count

Found by clang when boolean_t is defined as bool for DPDK PMD.

Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days


# 3222b9de 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): cleanup: improve prefast annotations

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


# fe497b15 28-Dec-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

Found by DPDK checkpatch.sh

Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days


# 5c4c3d92 01-Jun-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6673


# 929c7feb 23-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): cleanup: update copyright to 2016

Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6509


# 78e5c87c 17-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6389


# d8484af2 17-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6387


# f6d61784 16-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6369


# d31404ab 14-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge(4): remove PHY property method stubs

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


# 16e5d7bf 14-May-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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

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


# 80af6f26 14-Jan-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D4936


# cfa023eb 14-Jan-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

sfxge: add Medford NIC methods

Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D4908


# e7119ad9 12-Jan-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D4865


# 5f5c71cc 12-Jan-2016 Andrew Rybchenko <arybchik@FreeBSD.org>

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.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D4859