History log of /src/sys/dev/cxgbe/t4_filter.c (Results 1 – 25 of 90)
Revision Date Author Comments
# 721033a7 29-Sep-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): T7 TCB CPLs have queue and channel in different location

MFC after: 3 days
Sponsored by: Chelsio Communications


# c231e86c 29-Sep-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Update the filtering code for T7

There are new fields available and the width of the optional part has
changed. This affects the ntuples used by TOE/filters/hashfilters.

MFC after: 3 day

cxgbe(4): Update the filtering code for T7

There are new fields available and the width of the optional part has
changed. This affects the ntuples used by TOE/filters/hashfilters.

MFC after: 3 days
Sponsored by: Chelsio Communications

show more ...


# e19d8497 12-Feb-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Add a new hw_all_ok() routine and use it to avoid hardware access in the
public control interfaces (ifnet ioctls, ifmedia ca

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Add a new hw_all_ok() routine and use it to avoid hardware access in the
public control interfaces (ifnet ioctls, ifmedia calls, etc.). Continue
to use hw_off_limits() in the private ioctls/sysctls and other debug
code. Retire adapter_stopped() as it's of no use by itself.

This fixes problems where ifnet slow-path operations would enter a
synch_op just before set_adapter_hwstatus(false) and touch the hardware
when it's not safe to do so.

MFC after: 1 week
Sponsored by: Chelsio Communications

show more ...


# 64a00f87 01-Apr-2023 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Consolidate all mk_set_tcb_field_ulp in one place.

MFC after: 1 week
Sponsored by: Chelsio Communications


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 83b5cda1 28-Apr-2021 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Add support for NIC suspend/resume and live reset.

Add suspend/resume callbacks to the driver and a live reset built around
them. This commit covers the basic NIC and future commits will

cxgbe(4): Add support for NIC suspend/resume and live reset.

Add suspend/resume callbacks to the driver and a live reset built around
them. This commit covers the basic NIC and future commits will expand
this functionality to other stateful parts of the chip. Suspend and
resume operate on the chip (the t?nex nexus device) and affect all its
ports. It is not possible to suspend/resume or reset individual ports.
All these operations can be performed on a running NIC. A reset will
look like a link bounce to the networking stack.

Here are some ways to exercise this functionality:

/* Manual suspend and resume. */
# devctl suspend t6nex0
# devctl resume t6nex0

/* Manual reset. */
# devctl reset t6nex0

/* Manual reset with driver sysctl. */
# sysctl dev.t6nex.0.reset=1

/* Automatic adapter reset on any fatal error. */
# hw.cxgbe.reset_on_fatal_err=1

Suspend disables the adapter (DMA, interrupts, and the port PHYs) and
marks the hardware as unavailable to the driver. All ifnets associated
with the adapter are still visible to the kernel but operations that
require hardware interaction will fail with ENXIO. All ifnets report
link-down while the adapter is suspended.

Resume will reattach to the card, reconfigure it as before, and recreate
the queues servicing the existing ifnets. The ifnets are able to send
and receive traffic as soon as the link comes back up.

Reset is roughly the same as a suspend and a resume with at least one of
these events in between: D0->D3Hot->D0, FLR, PCIe link retrain.

MFC after: 1 month
Relnotes: yes
Sponsored by: Chelsio Communications

show more ...


# 43bbae19 26-Apr-2021 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Separate the sw- and hw-specific parts of resource allocations

The driver uses both software resources (locks, callouts, memory for
descriptors and for bookkeeping, sysctls, etc.) and hard

cxgbe(4): Separate the sw- and hw-specific parts of resource allocations

The driver uses both software resources (locks, callouts, memory for
descriptors and for bookkeeping, sysctls, etc.) and hardware resources
(VIs, DMA queues, TCAM entries, etc.) to operate the NIC. This commit
splits the single *_ALLOCATED flag used to track all these resources
into separate *_SW_ALLOCATED and *_HW_ALLOCATED flags.

This is the simplified pseudocode that now applies to most queues (foo
can be ctrlq/txq/rxq/ofld_txq/ofld_rxq):

/* Idempotent */
alloc_foo
{
if (!SW_ALLOCATED)
init_iq/init_eq/init_fl no-fail sw init
alloc_iq_fl/alloc_eq/alloc_wrq may-fail sw alloc
add_foo_sysctls, etc. no-fail post-alloc items
if (!HW_ALLOCATED)
alloc_iq_fl_hwq/alloc_eq_hwq hw resource allocation
}

/* Idempotent */
free_foo
{
if (!HW_ALLOCATED)
free_iq_fl_hwq/free_eq_hwq release hw resources
if (!SW_ALLOCATED)
free_iq_fl/free_eq/free_wrq release sw resources
}

The routines that take the driver to FULL_INIT_DONE and VI_INIT_DONE and
back are now all idempotent. The quiesce routines pay attention to the
HW_ALLOCATED flag and will not wait on the hardware for pidx/cidx
updates and other completions if this flag is not set.

MFC after: 1 month
Sponsored by: Chelsio Communications

show more ...


# c91dda5a 19-Feb-2021 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Add a driver ioctl to set the filter mask.

Allow the filter mask (aka the hashfilter mode when hashfilters are
in use) to be set any time it is safe to do so. The requested mask
must be a

cxgbe(4): Add a driver ioctl to set the filter mask.

Allow the filter mask (aka the hashfilter mode when hashfilters are
in use) to be set any time it is safe to do so. The requested mask
must be a subset of the filter mode already. The driver will not change
the mode or ingress config just to support a new mask.

MFC after: 2 weeks
Sponsored by: Chelsio Communications

show more ...


# 7ac8040a 19-Feb-2021 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Use firmware commands to get/set filter configuration.

1. Query the firmware for filter mode, mask, and related ingress config
instead of trying to figure them out from hardware registe

cxgbe(4): Use firmware commands to get/set filter configuration.

1. Query the firmware for filter mode, mask, and related ingress config
instead of trying to figure them out from hardware registers. Read
configuration from the registers only when the firmware does not
support this query.

2. Use the firmware to set the filter mode. This is the correct way to
do it and is more flexible as well. The filter mode (and associated
ingress config) can now be changed any time it is safe to do so.

The user can specify a subset of a valid mode and the driver will
enable enough bits to make sure that the mode is maxed out -- that
is, it is not possible to set another bit without exceeding the
total width for optional filter fields. This is a hardware
requirement that was not enforced by the driver previously.

MFC after: 2 weeks
Sponsored by: Chelsio Communications

show more ...


# 866a7f28 22-Oct-2019 John Baldwin <jhb@FreeBSD.org>

Always allocate the atid table during attach.

Previously the table was allocated on first use by TOE and the
ratelimit code. The forthcoming NIC KTLS code also uses this table.
Allocate it uncondit

Always allocate the atid table during attach.

Previously the table was allocated on first use by TOE and the
ratelimit code. The forthcoming NIC KTLS code also uses this table.
Allocate it unconditionally during attach to simplify consumers.

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D22028

show more ...


# 88148a07 22-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343202 through r343319.


# 6baf1e48 20-Jan-2019 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Clear the reply-pending status of a hashfilter when the reply
indicates an error. Also, do not remove it twice from the hf list in
this case.

Submitted by: Krishnamraju Eraparaju @ Chelsi

cxgbe(4): Clear the reply-pending status of a hashfilter when the reply
indicates an error. Also, do not remove it twice from the hf list in
this case.

Submitted by: Krishnamraju Eraparaju @ Chelsio
MFC after: 1 week
Sponsored by: Chelsio Communicatons

show more ...


# fda9adaf 27-Oct-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r339670 through r339812.


# d54dafc6 25-Oct-2018 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Allow "pass" filters to distribute matching traffic using a
subset of a VI's RSS indirection table.

This makes it possible to make groups out of rx queues and steer
different kinds of traf

cxgbe(4): Allow "pass" filters to distribute matching traffic using a
subset of a VI's RSS indirection table.

This makes it possible to make groups out of rx queues and steer
different kinds of traffic to different groups. For example, an
interface with 8 rx queues could have all non-TCP traffic delivered to
queues 0-3 and all TCP traffic to queues 4-7.

Note that it is already possible for filters to steer traffic to a
particular queue or to distribute it using the full indirection table
(much like normal rx does).

Sponsored by: Chelsio Communications

show more ...


# 01d4e214 05-Oct-2018 Glen Barber <gjb@FreeBSD.org>

MFH r338661 through r339200.

Sponsored by: The FreeBSD Foundation


# ce44d808 27-Sep-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338731 through r338987.


# 061bbaf7 22-Sep-2018 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Reuse existing "switching" L2T entries when possible.

Approved by: re@ (rgrimes@)
Sponsored by: Chelsio Communications


# 3611ec60 18-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r337646 through r338014.


# f9c0a512 10-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r337286 through r337585.


# 721033a7 29-Sep-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): T7 TCB CPLs have queue and channel in different location

MFC after: 3 days
Sponsored by: Chelsio Communications


# c231e86c 29-Sep-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Update the filtering code for T7

There are new fields available and the width of the optional part has
changed. This affects the ntuples used by TOE/filters/hashfilters.

MFC after: 3 day

cxgbe(4): Update the filtering code for T7

There are new fields available and the width of the optional part has
changed. This affects the ntuples used by TOE/filters/hashfilters.

MFC after: 3 days
Sponsored by: Chelsio Communications

show more ...


# e19d8497 12-Feb-2025 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Add a new hw_all_ok() routine and use it to avoid hardware access in the
public control interfaces (ifnet ioctls, ifmedia ca

cxgbe(4): Block most access to the hardware as soon as the adapter stops.

Add a new hw_all_ok() routine and use it to avoid hardware access in the
public control interfaces (ifnet ioctls, ifmedia calls, etc.). Continue
to use hw_off_limits() in the private ioctls/sysctls and other debug
code. Retire adapter_stopped() as it's of no use by itself.

This fixes problems where ifnet slow-path operations would enter a
synch_op just before set_adapter_hwstatus(false) and touch the hardware
when it's not safe to do so.

MFC after: 1 week
Sponsored by: Chelsio Communications

show more ...


# 64a00f87 01-Apr-2023 Navdeep Parhar <np@FreeBSD.org>

cxgbe(4): Consolidate all mk_set_tcb_field_ulp in one place.

MFC after: 1 week
Sponsored by: Chelsio Communications


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


1234