Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_ixl.c
RevisionDateAuthorComments
 1.100  25-Mar-2025  christos Don't return random value from interrupt. (coverity)
 1.99  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.98  09-Feb-2024  andvar fix spelling mistakes, mainly in comments and log messages.
 1.97  05-Feb-2024  andvar fix various typos in comments.
 1.96  20-Dec-2023  skrll Remove unnecssary #include
 1.95  13-Oct-2023  yamaguchi ixl(4): limit receive frame size upto 9600 even if ETHERCAP_VLAN_MTU is enabled
 1.94  13-Oct-2023  yamaguchi ixl(4): added ETHERCAP_VLAN_MTU support

PR kern/57652
 1.93  11-Oct-2023  rin ixl(4): Print device info on attach

Without PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: vendor 8086 product 1572 (rev. 0x01)

With PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: Intel XL710 SFP+ Ethernet (SFI) (rev. 0x01)

OK yamaguchi@
 1.92  11-Oct-2023  yamaguchi ixl(4): update link status in workqueue
 1.91  11-Oct-2023  yamaguchi ixl(4): use cv_broadcast to wakeup ioctl and workqueue context.

Commands may be issued at the same time from the both context.
 1.90  11-Oct-2023  yamaguchi ixl(4): skip getting link status if the last command is running
 1.89  26-Mar-2023  andvar fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
 1.88  16-Sep-2022  knakahara branches: 1.88.4;
Add ALWAYS_TXDEFER option to ixl(4), too.
 1.87  28-Aug-2022  skrll Empty if_watchdog functions are useless and now waste resources. Let's
remove them.
 1.86  25-Aug-2022  knakahara Tune number of Rx descriptors for ixl(4), ok'ed by yamaguchi@n.o.

In some tunneling measurement cases, that improve performance.
In other cases, that keep up performance.
 1.85  17-Jun-2022  yamaguchi ixl(4): fix typo
 1.84  17-Jun-2022  yamaguchi ixl(4), iavf(4): fix endian bug in vlan tag
 1.83  23-May-2022  rin Audit unload/unmap v.s. free against DMA buffer for sys/dev/pci;
make sure that bus_dmamap_unload(9) [or bus_dmamap_destroy(9)] or
bus_dmamem_unmap(9) are preceding to freeing DMA buffer, if it is
loaded or mapped, respectively.

This is mandatory for some archs. See, e.g.:

http://www.nerv.org/netbsd/?q=id:20210511T013030Z.013443cc790088147e4beed43f53dedabeaf9312
http://www.nerv.org/netbsd/?q=id:20220511T172220Z.561179f0b6fcc5b9cd73e274f69d74e2ce9e4c93

XXX XXX XXX
Compile test only (for amd64/ALL).

Thanks riastradh@ for double check.
 1.82  31-Mar-2022  yamaguchi call detach functions before stopping the interrupt for atq
 1.81  31-Mar-2022  yamaguchi Use xc_barrier to wait for finish of the interrupt handler

poited out by riastradh@n.o, thanks.
 1.80  31-Mar-2022  yamaguchi ixl(4): remove unnecessary lock acquirement

Running interrupt handlers is finished while accessing to
I40E_Q[TR]X_ENA register. Therefore, it is not need to acquire
locks to wait for the finish.

pointed out by riastradh@n.o, thanks.
 1.79  24-Mar-2022  yamaguchi ixl(4): Added Intel V710 for 5000BaseT support
 1.78  16-Mar-2022  yamaguchi ixl: Added support for Intel ethernet X710-T*L
 1.77  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.76  09-Feb-2021  jakllsch branches: 1.76.4;
Zero interrupt handles upon allocation.

Might prevent detach-time bugs.
 1.75  08-Sep-2020  yamaguchi branches: 1.75.2;
Added iavf(4) that is based on OpenBSD's iavf(4) implementation

reviewed by msaitoh@n.o and knakahara@n.o
 1.74  19-Aug-2020  yamaguchi Make descriptor_num in ixl(4) readonly
because ixl(4) does not support reallocating related resources

pointed out by knakahara@, thanks.
 1.73  19-Aug-2020  yamaguchi Adjust the default descriptor sizes for ixl(4)

These decreasements has no impact for throughput
while forwarding 64-1518 byte packets.
 1.72  19-Aug-2020  yamaguchi whitespace fix

From msaitoh@, thanks.
 1.71  31-Jul-2020  yamaguchi Use if_initialize() and if_register()
 1.70  31-Jul-2020  yamaguchi Added sysctl nodes for the number of descriptors in ixl(4)
 1.69  31-Jul-2020  yamaguchi Added sysctl nodes for ixl(4) Interrupt throttling(ITR)
 1.68  16-Jul-2020  yamaguchi Set PCI_COMMAND_MASTER_ENABLE and PCI_COMMAND_MEM_ENABLE
to activate the pci devices

This configuration is needed when BIOS or UEFI do not make them set.
 1.67  11-Jun-2020  thorpej Update for proplib(3) API changes.
 1.66  14-May-2020  msaitoh Remove extra semicolon.
 1.65  19-Mar-2020  yamaguchi branches: 1.65.2;
Fix panic due to aquire an adaptive mutex with spin mutex held

The panic is caused by the spin mutex held in ifmedia before
calling callbacks. ixl(4) registers the adaptive mutex used in
the callbacks at initialization to prevent the panic.
 1.64  13-Mar-2020  yamaguchi Use I40E_PFINT_ITRN registers to enable ITR for MSI-X interrupts
 1.63  13-Mar-2020  yamaguchi Fix locking against myself at ixl_link_state_update()
called by ixl_get_link_status()

Though the timing to call the function is change,
there is no order to get link status at initialization.
 1.62  12-Mar-2020  yamaguchi hold the lock for struct ixl_softc during read or write to sc->sc_media_*

OKed by knakahara@n.o
 1.61  12-Mar-2020  yamaguchi remove unnecessary code because IFM_ACTIVE is setted
in ixl_set_link_status()

OKed by knakahara@n.o
 1.60  03-Mar-2020  yamaguchi Send packets even if link state is not up

ixl(4) has not the limitation that it must not send packet when
link is down. And most of the other NIC drivers do not refer to it
when sending packets.

reviewed by knakahara@n.o, thanks.
 1.59  03-Mar-2020  yamaguchi Use ixl_atq_exec for waiting the Get link status response of ixl(4)
not to send the same command at once

reviewed by knakahara@n.o., thanks.
 1.58  03-Mar-2020  yamaguchi Added KASSERT
 1.57  03-Mar-2020  yamaguchi Fix the crash when ixl(4) sends Get link status command
and receives Get link status response in parallel

sc->sc_link_state_atq.iatq_fn is used in ixl_atq_done_locked()
with sc->sc_atq_lock, but it was cleared in ixl_get_link_status()
without the lock.
 1.56  25-Feb-2020  yamaguchi Add a comment about RSS and remove a wrong comment

pointed out and reviewed by knakahara@n.o., thanks
 1.55  25-Feb-2020  yamaguchi Use IFM_25G_ACC

pointed out and reviewed by msaitoh@n.o., thanks
 1.54  25-Feb-2020  yamaguchi Use kmem_alloc instead of malloc

pointed out and reviewed by knakahar@n.o., thanks
 1.53  25-Feb-2020  yamaguchi Change the number of retry to be the same as FreeBSD and Linux

pointed out and reviewed by knakahara@n.o., thanks.
 1.52  25-Feb-2020  yamaguchi Disable all queues before waiting for the completion
on each queue to reduce the number of delays

pointed out and reviewed by knakahara@n.o., thanks
 1.51  25-Feb-2020  yamaguchi Use callout_halt() instead of callout_stop for safety

pointed out and reviewed by knakahara@n.o., thanks
 1.50  25-Feb-2020  yamaguchi Stop callout for statistics while the interface is not running
 1.49  25-Feb-2020  yamaguchi Change position of the cpuid::ixl_hmc_txq
to be same with ixl_hmc_pack_txq[]

This has no functionality impact because the position on memory
is defined in ixl_hmc_pack_txq[].

pointed out and reviewed by knakahara@n.o., thanks
 1.48  25-Feb-2020  yamaguchi Hold per-queue locks when clearing config of queues for safety
 1.47  25-Feb-2020  yamaguchi Add defines for the max number of queue

pointed out and reviewed by knakahara@n.o., thanks
 1.46  25-Feb-2020  yamaguchi Set 0 to txr_{prod,cons} and rxr_{prod,cons} when HMC objects
are cleared

Those values should be the same as head and tail in an HMC object
 1.45  25-Feb-2020  yamaguchi Use workqueue API directly, without the wrapper in ixl(4)
to improve performace by removing atomic_ops(3)

pointed out and reviewed by knakahara@n.o., thanks
 1.44  25-Feb-2020  yamaguchi Remove WQ_PERCPU flag for the workqueue that does configurations
such as link up and down

And added kpreempt_disable and kpreempt_enable around
workqueue_enqueue to call it in non-WQ_PERCPU thread context.

pointed out and reviewed by knakahara@n.o., thanks.
 1.43  25-Feb-2020  yamaguchi Added __KERNEL_RCSID
 1.42  12-Feb-2020  yamaguchi Remove wrong KASSERTs because mutex_owned for a spin lock doesn't check
that a lock is held in the current context.
 1.41  12-Feb-2020  yamaguchi Use Set RSS key command and Set LUT command to enable RSS on X722
 1.40  12-Feb-2020  yamaguchi xl(4) should use the aq command to access RX control registers
if the device is X722 or others whose API version is upper than 1.5
 1.39  12-Feb-2020  yamaguchi Fix a wrong comment in ixl(4)
 1.38  12-Feb-2020  yamaguchi Change the command sequence and timing to prevent EIO
in "Get PHY Abilities" command

The error has been appeared on X722 attaching an SFP module
without link up.
 1.37  07-Feb-2020  yamaguchi Use if_link_state_change() even if ixl(4) is attaching
 1.36  04-Feb-2020  thorpej Use ifmedia_fini().
 1.35  01-Feb-2020  thorpej Adopt <net/if_stats.h>.
 1.34  31-Jan-2020  yamaguchi Revert r1.32 because some documents say that the device supports SFP+ SX/LX

I referred the document #332191-024 "Intel Ethernet Controller
X710/XXV710/XL710 Feature Support Matrix"

pointed out by msaitoh@, thanks.
 1.33  31-Jan-2020  yamaguchi Fix missing kpreempt_disabe()
 1.32  31-Jan-2020  yamaguchi Remove unsupported media on ixl(4)
 1.31  31-Jan-2020  yamaguchi Add media and flow changes support for ixl(4)
 1.30  31-Jan-2020  yamaguchi Fix a wrong return code from ixl_get_phy_types()
 1.29  30-Jan-2020  yamaguchi Add SIOCSIFMTU support for ixl(4)
 1.28  27-Jan-2020  yamaguchi Add TX checksum offload supports for ixl(4)
 1.27  27-Jan-2020  yamaguchi Fix missing PCI_INTR_MPSAFE settings in ixl(4)
 1.26  17-Jan-2020  yamaguchi Print nvm version of ixl(4) when attaching

reviewed by msaitoh
 1.25  17-Jan-2020  yamaguchi Use flags instead of bool that changes behavior related to
adminq command of ixl(4)
 1.24  17-Jan-2020  yamaguchi Fix the wrong expression in ixl(4)

Closes PR/54860.
 1.23  16-Jan-2020  yamaguchi Fix wrong usage of PCI_PRODUCT(), ixl(4)
 1.22  16-Jan-2020  yamaguchi Fix ixl(4) not to assign interrupts to cpu #0
if ncpu > queue pairs
 1.21  16-Jan-2020  yamaguchi Use def{flag,param} for parameters in ixl(4)
 1.20  15-Jan-2020  yamaguchi Fix typo (s/txr_opackets/txr_obytes/)

pointed out by ryo@n.o, thanks.
 1.19  09-Jan-2020  yamaguchi Make some parametes in ixl(4) be able to change when loading
for debugging

- nomsix(boolean)
- disable msix support
- stats_interval(signed integer)
- change interval for collecting statistic counters
- nqps_limit(signed integer)
- limitation for the number of queue pairs
- {tx,rx}_ndescs(unsigned integer)
- the number of discriptors in txqueue or rxqueue
 1.18  09-Jan-2020  yamaguchi ixl(4) supports in-chip statistic counters per VSI
 1.17  09-Jan-2020  yamaguchi ixl(4) supports in-chip statistic counters per port
 1.16  08-Jan-2020  yamaguchi branches: 1.16.2;
Not stop kpreempt if unnecessary, ixl(4)
 1.15  26-Dec-2019  yamaguchi Fix lack of of sysctl_teardown() in ixl(4)
 1.14  26-Dec-2019  yamaguchi ixl(4) supports IFCAP_CSUM_*_Rx

OKed by msaitoh@n.o.
 1.13  26-Dec-2019  yamaguchi Improve DDPRINTF for ixl(4)
 1.12  20-Dec-2019  yamaguchi ixl(4) supports ETHERCAP_VLAN_HWFILTER
the feature is disable by default.

reviewed by msaitoh and knakahara
 1.11  20-Dec-2019  yamaguchi ixl(4) supports ETHERCAP_VLAN_HWTAGGING
It is enabled by defualt

The features is realized by the following operations:
- internal switch
- use "0b00: Show VLAN, DEI and UP in descriptor" mode
- TX
- set VLAN tag and IL2TAG1 flag to each descriptor
- RX
- use 32byte descriptor to use SHOWIV and L2SEL flag
included in RX queue configuration
- VLAN tags are not stored in descriptor without these config.
- get VLAN tags from L2TAG1 field included in RX descriptor
and set them to mbuf

reviewed by msaitoh and knakahara
 1.10  20-Dec-2019  yamaguchi enable other interrupt even if ixl(4) is down
 1.9  20-Dec-2019  yamaguchi Do IXL_AQ_OP_SET_VSI_PROMISC in ixl_ifflags_cb() for
applying IFF_PROMISC
 1.8  20-Dec-2019  yamaguchi Fix ixl(4) to set ENETRESET when IFF_ALLMULTI is changed
 1.7  20-Dec-2019  yamaguchi Fix ixl_{add|remove}_macvlan() to return errno
instead of command status
 1.6  20-Dec-2019  yamaguchi Fix softint leak in ixl(4) when detaching
 1.5  20-Dec-2019  yamaguchi Use name of variable instead of that of data structure
 1.4  11-Dec-2019  yamaguchi Fix to detect link state down

Link status event that is used to update link status sometimes
is not notified when link down. So, use Get Link Status response
that has the same information with the event.
The handling of the event is needed to detect link state
up because the response sometimes does not notify link up.
 1.3  11-Dec-2019  yamaguchi Fix build error related to ixl(4) on i386
 1.2  11-Dec-2019  yamaguchi Not use _LP64 but sizeof(bus_addr_t) for getting size of address
It makes ixl(4) be able to work on ILP32

pointed out by thorpej@. thanks.
 1.1  10-Dec-2019  yamaguchi Ported driver for Intel Ethernet 700 series

reviewed by msaitoh and knakahara
 1.16.2.2  29-Feb-2020  ad Sync with head.
 1.16.2.1  17-Jan-2020  ad Sync with head.
 1.65.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.65.2.1  19-Mar-2020  martin file if_ixl.c was added on branch phil-wifi on 2020-04-08 14:08:09 +0000
 1.75.2.1  03-Apr-2021  thorpej Sync with HEAD.
 1.76.4.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.88.4.2  18-Oct-2023  martin Pull up following revision(s) (requested by yamaguchi in ticket #417):

sys/dev/pci/if_ixl.c: revision 1.94
sys/dev/pci/if_ixl.c: revision 1.95

ixl(4): added ETHERCAP_VLAN_MTU support
PR kern/57652

ixl(4): limit receive frame size upto 9600 even if ETHERCAP_VLAN_MTU is enabled
 1.88.4.1  14-Oct-2023  martin Pull up following revision(s) (requested by yamaguchi in ticket #409):

sys/dev/pci/if_ixl.c: revision 1.90
sys/dev/pci/if_ixl.c: revision 1.91
sys/dev/pci/if_ixl.c: revision 1.92
sys/dev/pci/if_ixl.c: revision 1.93
sys/arch/evbarm/conf/GENERIC64: revision 1.214

ixl(4): skip getting link status if the last command is running

ixl(4): use cv_broadcast to wakeup ioctl and workqueue context.
Commands may be issued at the same time from the both context.

ixl(4): update link status in workqueue

ixl(4): Print device info on attach
Without PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: vendor 8086 product 1572 (rev. 0x01)
With PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: Intel XL710 SFP+ Ethernet (SFI) (rev. 0x01)
OK yamaguchi@

aarch64/GENERIC64: Add ixl(4)
Works just fine for little-endian on LX2K with UEFI firmware.
Not tested for big-endian yet; attach fails on ROCKPro64 due to
host controller problem.
OK yamaguchi@

RSS XML Feed