Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_iavf.c
RevisionDateAuthorComments
 1.20  23-Mar-2025  joe avoid NULL pointer dereference on failed memory allocation for sc_ihs
 1.19  25-Feb-2025  joe initialize post to 0

this prevents the use of unitialized variable when we hit an error branch
on the first attempt/iteration that will cause it to break out of the do while
loop
 1.18  29-Jun-2024  riastradh if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377
 1.17  02-Jun-2024  andvar s/interuppts/interrupts/ and s/intruppts/interrupts/ in comment and log message.
 1.16  17-Jun-2022  yamaguchi ixl(4), iavf(4): fix endian bug in vlan tag
 1.15  06-Nov-2021  andvar s/invlaid/invalid/
 1.14  16-Jun-2021  riastradh if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around. And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail. (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint. This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken. However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.
 1.13  05-Mar-2021  yamaguchi branches: 1.13.4;
Fix missing IFM_FDX
 1.12  09-Feb-2021  jakllsch Zero interrupt handles upon allocation.

Might prevent detach-time bugs.
 1.11  10-Dec-2020  yamaguchi Add a string literal for IAVF_VC_OP_CONFIG_RSS_LUT
 1.10  10-Dec-2020  yamaguchi remove unnecessary lock acquire and release
 1.9  10-Dec-2020  yamaguchi Fix a wrong value about HENA configuration
 1.8  08-Dec-2020  yamaguchi Change the default interrupt-affinity of iavf(4)
 1.7  01-Dec-2020  yamaguchi Dequeue aqb from sc_atq_live even when the last command is failed

iavf(4) didn't dequeue aqb from sc_atq_live that is a list for
buffer in use when a command is failed by ETIMEDOUT.

This causes a panic in the following sequence:

1. enqueue an aqb to sc_atq_live at iavf_aqb_post()
2. the last command is failed by ETIMEDOUT
3. enqueue the aqb used in the failed command to sc_atq_idle
at an error handling in iavf_attach()
4. dequeue the same aqb from sc_atq_live and enqueue sc_atq_idle
again at iavf_cleanup_admin_queue()
- sc_atq_idle is broken at that time
5. free the aqb in sc_atq_idle more than once

Fix PR/55822

reviewed by knakahara@n.o.
 1.6  17-Sep-2020  yamaguchi branches: 1.6.2;
Fix a panic caused while detaching iavf(4)

The sequence of the panic is follow:
1. failed to disable queues in iavf_stop()
2. release ec->ec_lock in ether_ifdetach()
3. do reset scheduled at iavf_stop()
4. acquire ec->ec_lock in iavf_reset_finish()
- panic

reviewed by knakahara@n.o, thanks.
 1.5  10-Sep-2020  yamaguchi Fix a possible deadlock in iavf(4)
 1.4  09-Sep-2020  yamaguchi Added the explain about locking order in iavf(4)
 1.3  09-Sep-2020  jakllsch fix bad conditional in iavf_parse_modprop()

found by clang
 1.2  08-Sep-2020  jakllsch iaq_datalen is 16-bit, always use htole16

fixes build failure on big endian
 1.1  08-Sep-2020  yamaguchi Added iavf(4) that is based on OpenBSD's iavf(4) implementation

reviewed by msaitoh@n.o and knakahara@n.o
 1.6.2.2  03-Apr-2021  thorpej Sync with HEAD.
 1.6.2.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.13.4.1  17-Jun-2021  thorpej Sync w/ HEAD.

RSS XML Feed