History log of /freebsd/sys/net/iflib.c (Results 1 – 25 of 367)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0fc7bdc9 29-Nov-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #transport, cy, glebius, #iflib, kbowling
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47063

show more ...


Revision tags: release/14.2.0
# 81610008 07-Oct-2024 Zhenlei Huang <zlei@FreeBSD.org>

iflib: Make iflib_stop() static

It is declared as static. Make the definition consistent with the
declaration.

This follows 7ff9ae90f0bd and partially reverts 09f6ff4f1a47.

Reviewed by: erj
MFC af

iflib: Make iflib_stop() static

It is declared as static. Make the definition consistent with the
declaration.

This follows 7ff9ae90f0bd and partially reverts 09f6ff4f1a47.

Reviewed by: erj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46185

show more ...


# 36a00192 25-Sep-2024 Krzysztof Galazka <krzysztof.galazka@intel.com>

iflib: Simplify iflib_legacy_setup

Follow the pattern from iflib_irq_alloc_generic function and use
iflib_fast_intr as a handler for RX only interrupts.

Also remove some intermediate variables and

iflib: Simplify iflib_legacy_setup

Follow the pattern from iflib_irq_alloc_generic function and use
iflib_fast_intr as a handler for RX only interrupts.

Also remove some intermediate variables and use consistent
way for referencing queue's structures.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D46061

show more ...


# fa7045f9 22-Sep-2024 Zhenlei Huang <zlei@FreeBSD.org>

iflib: Many style fixes

MFC after: 3 days


# b90ba458 22-Sep-2024 Zhenlei Huang <zlei@FreeBSD.org>

iflib: Prefer C99's __func__ over GCC's __FUNCTION__

MFC after: 3 days


# 767723dd 19-Sep-2024 Mark Johnston <markj@FreeBSD.org>

iflib: Use if_alloc_dev() to allocate the ifnet

This ensures that the ifnet's NUMA affinity is accurate.

Reviewed by: kbowling
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: ht

iflib: Use if_alloc_dev() to allocate the ifnet

This ensures that the ifnet's NUMA affinity is accurate.

Reviewed by: kbowling
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D46667

show more ...


Revision tags: release/13.4.0
# aa386085 28-Jun-2024 Zhenlei Huang <zlei@FreeBSD.org>

net: Remove unneeded NULL check for the allocated ifnet

Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().

No functiona

net: Remove unneeded NULL check for the allocated ifnet

Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().

No functional change intended.

Reviewed by: kp, imp, glebius, stevek
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45740

show more ...


Revision tags: release/14.1.0, release/13.3.0, release/14.0.0, release/13.2.0
# ed34a6b6 18-Jan-2023 Eric Joyner <erj@FreeBSD.org>

iflib: Add subinterface interrupt allocation function

The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method f

iflib: Add subinterface interrupt allocation function

The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method for the subinterface to request hardware interrupt resources
from the base interface.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39930

show more ...


# 3c7da27a 22-Mar-2023 Eric Joyner <erj@FreeBSD.org>

iflib: Add sysctl to request extra MSIX vectors on driver load

Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need t

iflib: Add sysctl to request extra MSIX vectors on driver load

Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need to have
spare MSI-X interrupts already allocated for them on driver load.

This sysctl is marked as a tunable since it will need to be set before
the driver is loaded since MSI-X interrupt allocation and setup is
done during the attach process.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41326

show more ...


# e4a0c92e 16-Apr-2024 Stephen J. Kiernan <stevek@FreeBSD.org>

iflib: Correct indentation according to style(9)

The indentation style for the SYSCTL_* macros used was not matching KNF.

Reported by: jhb
Differential Revision: https://reviews.freebsd.org/D44811


# 303dea74 03-Apr-2024 Stephen J. Kiernan <stevek@FreeBSD.org>

iflib: Fix compiler warnings

Some of the QUAD sysctls are actually for unsigned quad values.
Switch to using UQUAD instead, as that is meant for unsigned.

Reviewed by: erj, jhb
Obtained from: Junip

iflib: Fix compiler warnings

Some of the QUAD sysctls are actually for unsigned quad values.
Switch to using UQUAD instead, as that is meant for unsigned.

Reviewed by: erj, jhb
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D44620

show more ...


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

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

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


# d2dd3d5a 04-Aug-2023 Eric Joyner <erj@FreeBSD.org>

iflib: Remove redundant variable

In iflib_init_locked(), sctx and scctx both point to the same value,
which is the ifc_softc_ctx field in the iflib softc. Remove the
declaration and assignment to sc

iflib: Remove redundant variable

In iflib_init_locked(), sctx and scctx both point to the same value,
which is the ifc_softc_ctx field in the iflib softc. Remove the
declaration and assignment to sctx since scctx can be used instead, and
the name of scctx follows the naming convention used for local variables
that point to ifc_softc_ctx.

In theory there should be no functional impact with this change.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by: kbowling@
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41325

show more ...


# 7f527d48 04-Aug-2023 Eric Joyner <erj@FreeBSD.org>

iflib: Fix white space and reduce some line lengths

This helps align some of the code with the rest of the style used in
iflib, but as marius@ points out, this is not style(9).

Signed-off-by: Eric

iflib: Fix white space and reduce some line lengths

This helps align some of the code with the rest of the style used in
iflib, but as marius@ points out, this is not style(9).

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by: kbowling@
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41324

show more ...


# 7ff9ae90 03-Aug-2023 Marius Strobl <marius@FreeBSD.org>

iflib(9): Remove support for cloning pseudo interfaces

This code was used by the first incarnation of wg(4) and is dead ever
since f187d6dfbf633665ba6740fe22742aec60ce02a2 has removed the latter
aga

iflib(9): Remove support for cloning pseudo interfaces

This code was used by the first incarnation of wg(4) and is dead ever
since f187d6dfbf633665ba6740fe22742aec60ce02a2 has removed the latter
again. Moreover, this code matched iflib(4) like a square peg fits in
a round hole, was incomplete and despite some hacks still tailored to
VPC and wg(4) but not generic. In effect, this reverts the following:
09f6ff4f1a47c3009dc16fdc609a44f2341bc7ac (w/ its "ancillary changes")
9aeca21324f481f57f2ecb7009f461f4f51b62b3
1f93e931d9f0c688f43f98ef777e04636a325526
0f9544d03e89d180f94a7a84b110ec7d2b6c625a
0dd691b41276ce13d25ffb1443af27f85038aa3f

Reviewed by: erj, kbowling
Differential Revision: <https://reviews.freebsd.org/D41196>

show more ...


# 04d4e345 28-Jul-2023 Przemyslaw Lewandowski <przemyslawx.lewandowski@intel.com>

iflib: Fix panic during driver reload stress test

During a driver reload stress test, after 50-300 reloads a panic occurs.
After adding sleeps in between loading and unloading the driver, the
issue

iflib: Fix panic during driver reload stress test

During a driver reload stress test, after 50-300 reloads a panic occurs.
After adding sleeps in between loading and unloading the driver, the
issue does not occur. It's possible that loading/unloading too fast may
cause the gt_taskqueue pointer to be freed earlier than expected;
checking for a null pointer first fixes it.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by: erj@
Tested by: jeffrey.e.pieper@intel.com
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39457

show more ...


# a52f23f4 20-Jul-2023 Eric Joyner <erj@FreeBSD.org>

iflib: Unlock ctx lock around call to ether_ifattach()

Panic occurs during loading driver using kldload. It exists since netlink is
enabled. There is problem with double locking ctx. This fix allow

iflib: Unlock ctx lock around call to ether_ifattach()

Panic occurs during loading driver using kldload. It exists since netlink is
enabled. There is problem with double locking ctx. This fix allows to call
ether_ifattach() without locked ctx.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

PR: 271768
Reviewed by: erj@, jhb@
MFC after: 1 day
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D40557

show more ...


# a6b55ee6 17-Apr-2023 Gleb Smirnoff <glebius@FreeBSD.org>

net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH

Expect that drivers call into the network stack with the net epoch
entered. This has already been the fact since early 2020. The net
interrupts, that

net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH

Expect that drivers call into the network stack with the net epoch
entered. This has already been the fact since early 2020. The net
interrupts, that are marked with INTR_TYPE_NET, were entering epoch
since 511d1afb6bf. For the taskqueues there is NET_TASK_INIT() and
all drivers that were known back in 2020 we marked with it in
6c3e93cb5a4. However in e87c4940156 we took conservative approach
and preferred to opt-in rather than opt-out for the epoch.

This change not only reverts e87c4940156 but adds a safety belt to
avoid panicing with INVARIANTS if there is a missed driver. With
INVARIANTS we will run in_epoch() check, print a warning and enter
the net epoch. A driver that prints can be quickly fixed with the
IFF_NEEDSEPOCH flag, but better be augmented to properly enter the
epoch itself.

Note on TCP LRO: it is a backdoor to enter the TCP stack bypassing
some layers of net stack, ignoring either old IFF_KNOWSEPOCH or the
new IFF_NEEDSEPOCH. But the tcp_lro_flush_all() asserts the presence
of network epoch. Indeed, all NIC drivers that support LRO already
provide the epoch, either with help of INTR_TYPE_NET or just running
NET_EPOCH_ENTER() in their code.

Reviewed by: zlei, gallatin, erj
Differential Revision: https://reviews.freebsd.org/D39510

show more ...


# 25c92cd2 06-Mar-2023 Justin Hibbits <jhibbits@FreeBSD.org>

iflib: Further convert to use IfAPI accessors

Summary:
When iflib was first converted some IfAPI APIs were not yet present, so
were tagged with "XXX" comments. Finish the conversion by using these

iflib: Further convert to use IfAPI accessors

Summary:
When iflib was first converted some IfAPI APIs were not yet present, so
were tagged with "XXX" comments. Finish the conversion by using these
new APIs.

Reviewed by: gallatin, erj
Sponsored by: Juniper Networks, Inc
Differential Revision: https://reviews.freebsd.org/D38928

show more ...


# 5f7bea29 28-Feb-2023 Gleb Smirnoff <glebius@FreeBSD.org>

iflib: fix regression with new pfil(9) KPI

Do not pass the pointer to our valid mbuf to pfil(9). Pass an
uninitialized one only. This was unsafe with the old KPI, too,
but for some reason didn't f

iflib: fix regression with new pfil(9) KPI

Do not pass the pointer to our valid mbuf to pfil(9). Pass an
uninitialized one only. This was unsafe with the old KPI, too,
but for some reason didn't fail.

Fixes: caf32b260ad46b17a4c1a8ce6383e37ac489f023

show more ...


# caf32b26 14-Feb-2023 Gleb Smirnoff <glebius@FreeBSD.org>

pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks()

The 0b70e3e78b0 changed the original design of a single entry point
into pfil(9) chains providing separate functions for the filtering
point

pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks()

The 0b70e3e78b0 changed the original design of a single entry point
into pfil(9) chains providing separate functions for the filtering
points that always provide mbufs and know the direction of a flow.
The motivation was to reduce branching. The logical continuation
would be to do the same for the filtering points that always provide
a memory pointer and retire the single entry point.

o Hooks now provide two functions: one for mbufs and optional for
memory pointers.
o pfil_hook_args() has a new member and pfil_add_hook() has a
requirement to zero out uninitialized data. Bump PFIL_VERSION.
o As it was before, a hook function for a memory pointer may realloc
into an mbuf. Such mbuf would be returned via a pointer that must
be provided in argument.
o The only hook that supports memory pointers is ipfw:default-link.
It is rewritten to provide two functions.
o All remaining uses of pfil_run_hooks() are converted to
pfil_mem_in().
o Transparent union of pfil_packet_t and tricks to fix pointer
alignment are retired. Internal pfil_realloc() reduces down to
m_devget() and thus is retired, too.

Reviewed by: mjg, ocochard
Differential revision: https://reviews.freebsd.org/D37977

show more ...


# 9147969b 25-Jan-2023 Przemyslaw Lewandowski <przemyslawx.lewandowski@intel.com>

iflib: Add null check to iflib_stop()

Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic
occurs when the ice(4) driver is in recovery mode. Queues are not
initialized in this mo

iflib: Add null check to iflib_stop()

Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic
occurs when the ice(4) driver is in recovery mode. Queues are not
initialized in this mode, so gt_taskqueue is not initialized, and
gtaskqueue_drain() will panic.

Fix this by only doing a drain if an RX queue's gt_taskqueue is
initialized.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by: erj@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D37892

show more ...


# 2c2b37ad 13-Jan-2023 Justin Hibbits <jhibbits@FreeBSD.org>

ifnet/API: Move struct ifnet definition to a <net/if_private.h>

Hide the ifnet structure definition, no user serviceable parts inside,
it's a netstack implementation detail. Include it temporarily

ifnet/API: Move struct ifnet definition to a <net/if_private.h>

Hide the ifnet structure definition, no user serviceable parts inside,
it's a netstack implementation detail. Include it temporarily in
<net/if_var.h> until all drivers are updated to use the accessors
exclusively.

Reviewed by: glebius
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38046

show more ...


Revision tags: release/12.4.0, release/13.1.0, release/12.3.0
# 402810d3 20-Oct-2021 Justin Hibbits <jhibbits@FreeBSD.org>

Convert iflib(4) and iflib-based drivers to the DrvAPI

Summary:
Convert iflib(4) and the following drivers:
* axgbe
* em
* ice
* ixl
* vmxnet

Sponsored by: Juniper Networks, Inc.
Reviewed by: kbowl

Convert iflib(4) and iflib-based drivers to the DrvAPI

Summary:
Convert iflib(4) and the following drivers:
* axgbe
* em
* ice
* ixl
* vmxnet

Sponsored by: Juniper Networks, Inc.
Reviewed by: kbowling, #iflib
Differential Revision: https://reviews.freebsd.org/D37768

show more ...


# 9c950139 17-Oct-2022 Eric Joyner <erj@FreeBSD.org>

iflib: Introduce v2 of TX Queue Select Functionality

For v2, iflib will parse packet headers before queueing a packet.

This commit also adds a new field in the structure that holds parsed
header in

iflib: Introduce v2 of TX Queue Select Functionality

For v2, iflib will parse packet headers before queueing a packet.

This commit also adds a new field in the structure that holds parsed
header information from packets; it stores the IP ToS/traffic class
field found in the IPv4/IPv6 header.

To help, it will only partially parse header packets before queueing
them by using a new header parsing function that does less than the
current parsing header function; for our purposes we only need up to the
minimal IP header in order to get the IP ToS infromation and don't need
to pull up more data.

For now, v1 and v2 co-exist in this patch; v1 still offers a
less-invasive method where none of the packet is parsed in iflib before
queueing.

This also bumps the sys/param.h version.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Tested by: IntelNetworking
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D34742

show more ...


12345678910>>...15