Home | History | Annotate | Download | only in ixgbe
History log of /src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
RevisionDateAuthorComments
 1.17  25-Aug-2021  msaitoh Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.

- Before this commit, resource shortage was easily occurred because the total
number of the clusters is small.

- Reviewed by knakahara and ryo.
 1.16  30-Apr-2021  msaitoh Add missing __KERNEL_RCSID().
 1.15  25-Jun-2020  msaitoh branches: 1.15.6;
Reduce ixgbe's busy loop using with workqueue and kpause.

- Use workqueue instead of softint to make some functions sleepable.
- Use new workqueue and enqueue it in ixgbe_local_timer() and
ixgbe_recovery_mode_timer() to make them sleepable.
- Make new ixgbe_delay() and use it. This functions sleeps if the time is
more than equals 1 tick. If it's not, do delay().
 1.14  17-Apr-2020  msaitoh No functional change:
- modify comment
- whitespace fix
 1.13  01-Feb-2020  riastradh branches: 1.13.4;
Use atomic_load_acquire for FreeBSDish atomic_load_acq_uint shim.
 1.12  21-Jan-2020  msaitoh Fix the freeing code for some error paths. Found and tested by Patrick Welche.
 1.11  20-Jan-2020  msaitoh Free jumbo mem structure correctly. Found by yamaguchi@ using with LOCKDEBUG.
 1.10  04-Sep-2019  msaitoh branches: 1.10.2;
printf -> device_printf
 1.9  06-Dec-2018  msaitoh branches: 1.9.4;
Apply FreeBSD ix-3.3.6.tar.gz's change to NetBSD. Tested on C3000 and X550-T1,
but not tested on Xeon D:
- Add firmware recovery mode for X550, X550A(Xeon D) and X550EM (C3000):
- FreeBSD always set IXGBE_FEATURE_RECOVERY_MODE without checking the
NVM image version. We compare it against 2.0 to not to make new callout and
not to call extra atomic operations.
- In some FreeBSD's sysctl functions, atomic_load_acq_int() is called
before a null pointer check. We call it after null pointer check.
- Before calling atomic_load_acq_uint(), check adapter->feat_en flags
to save atomic operation call.
- We don't check recovery_mode in ixgbe_set_sysctl_value() because this
function doesn't touch any hardware register.
- NetBSD don't have FreeBSD's atomic_load_acq_int()-like function, so do it
with membar_sync(). Thanks riastradh@ for the advice.
- FreeBSD's ix-3.3.6 changed ixgbe_enable_aim from TRUE to FALSE, but we will
keep it as TRUE because we have already fixed some bugs.
- Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and removed in
ix-3.3.6.tar.gz.
- On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of
ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em() has
extra check (e.g. exclude 1G copper).
- if_sriov.c's change doesn't affect to NetBSD because we don't support
SR-IOV PF function.
 1.8  31-Jul-2018  msaitoh Make jcl allocation per queue to reduce mutex spin. Tested by me and
knakahara.
 1.7  25-Apr-2018  msaitoh branches: 1.7.2;
Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
 1.6  01-Jun-2017  chs branches: 1.6.2; 1.6.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.5  01-Dec-2016  msaitoh Update ixg(4) and ixv(4) up to FreeBSD r282299:
- Add support for X55x.
- ADD EEE support (not tested).
- Add WOL support (not tested).
- Add suspend/resume support (not testd).
- Add LPLU support (not tested).
- Add DMA Coalescing (note verified).
- Not tested well for sysctls.
- Fix ixgbe_set_advertise() a bit. At least, FreeBSD r294578 is required
to work hw.ixg0.advertise_speed sysctl correctly.
 1.4  01-Dec-2016  msaitoh Update ixg(4) and ixv(4) up to FreeBSD r280197:
- Add support for 82599_QSFP_SF_QP and X540T1.
- Add partial support for X55x. It's required to sync with FreeBSD r282299
to support X55x.
- Bugfixes.
 1.3  04-Feb-2015  msaitoh branches: 1.3.2;
Fix mutex related problem reported by Uwe Toenjes in PR#49328:
- Revert ixgbe_netbsd.c rev. 1.2
- make CORE_LOCK adaptive
- Release spin lock while reinitializing the jumb buffer structure.
 1.2  28-Jan-2015  christos PR/49328: Uwe Toenjes: This driver allocates memory always with NOWAIT, except
in the NetBSD-specific code. This happens from ioctl, and usually there is
enough memory there since we just freed our resources and we are getting them
back. We could even check and not do it again if sizes did not change, but
this is how the rest of the code is structured so we follow suit.
XXX: pullup-7
 1.1  12-Aug-2011  dyoung branches: 1.1.12; 1.1.30;
Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver
ported from FreeBSD.
 1.1.30.3  28-Aug-2017  skrll Sync with HEAD
 1.1.30.2  05-Dec-2016  skrll Sync with HEAD
 1.1.30.1  06-Apr-2015  skrll Sync with HEAD
 1.1.12.1  03-Dec-2017  jdolecek update from HEAD
 1.3.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.8.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.6.8.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.6.8.1  02-May-2018  pgoyette Synch with HEAD
 1.6.2.7  15-Sep-2021  martin Pull up the following (all via patch), requested by msaitoh in ticket #1696:

sysdev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sysdev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sysdev/pci/ixgbe/ix_txrx.c 1.68-1.93
sysdev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sysdev/pci/ixgbe/if_bypass.c 1.7-1.9
sysdev/pci/ixgbe/if_fdir.c 1.4-1.5
sysdev/pci/ixgbe/if_sriov.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_82598.c 1.16
sysdev/pci/ixgbe/ixgbe_82599.c 1.23
sysdev/pci/ixgbe/ixgbe_api.c 1.25
sysdev/pci/ixgbe/ixgbe_bypass.h 1.2
sysdev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sysdev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_dcb.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sysdev/pci/ixgbe/ixgbe_fdir.h 1.3
sysdev/pci/ixgbe/ixgbe_features.h 1.3
sysdev/pci/ixgbe/ixgbe_mbx.c 1.12
sysdev/pci/ixgbe/ixgbe_netbsd.c 1.16-1.17
sysdev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sysdev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sysdev/pci/ixgbe/ixgbe_netmap.h 1.2
sysdev/pci/ixgbe/ixgbe_osdep.c 1.7
sysdev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sysdev/pci/ixgbe/ixgbe_phy.c 1.24
sysdev/pci/ixgbe/ixgbe_rss.h 1.5
sysdev/pci/ixgbe/ixgbe_sriov.h 1.4
sysdev/pci/ixgbe/ixgbe_type.h 1.49
sysdev/pci/ixgbe/ixgbe_vf.c 1.27
sysdev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sysdev/pci/ixgbe/ixgbe_x540.h 1.9
sysdev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sysdev/pci/ixgbe/ixgbe_x550.h 1.6
sysdev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
Before this commit, resource shortage was easily occurred because
the total number of the clusters is small.
- Improve performance:
- Use m_adj(ETHER_ALIGN) more.
- Sprinkle __predict_false() in the RX path.
- Don't pre-allocate a cluster for RXCOPY case to improve short
packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change). This
change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
address. At least, this change is required for macppc
(sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
panic.
- Save the discard_multidesc state to not to forget the state by
exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
 1.6.2.6  05-Aug-2020  martin Pull up the following revisions, requested by msaitoh in ticket #1587:

sys/dev/pci/ixgbe/ix_txrx.c 1.62-1.63 via patch
sys/dev/pci/ixgbe/ixgbe.c 1.225, 1.228-1.229,
1.232 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.64, 1.66
sys/dev/pci/ixgbe/ixv.c 1.146, 1.148-1.150
via patch
sys/dev/pci/ixgbe/ixgbe_common.c 1.27
sys/dev/pci/ixgbe/ixgbe_vf.c 1.23
sys/dev/pci/ixgbe/ixgbe_82598.c 1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.18
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.14
sys/dev/pci/ixgbe/ixgbe_phy.c 1.21
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
was only on X550.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.
 1.6.2.5  24-Jan-2020  martin Pull up the following, requested by msaitoh in ticket #1490:

sys/dev/pci/ixgbe/if_bypass.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c 1.195,1.220-1.221 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c 1.24
sys/dev/pci/ixgbe/ixgbe_common.c 1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c 1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.122,1.142,1.144 via patch

- Use unsigned to avoid undefined behavior in
ix{gbe,v}_[un]register_vlan().
- Free RX structure correctly when detaching.
- Remove unused code.
- Remove extra spaces.
- Fix some typos in comment.
- KNF.
 1.6.2.4  05-Sep-2019  martin Apply patch, requested by msaitoh in ticket #1367, to pull up the following
revisions:

sys/dev/pci/ixgbe/ixgbe_x550.c 1.16
sys/dev/pci/ixgbe/ixgbe.c 1.180,1.203-1.204,
1.207-1.208 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.55
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.10
sys/dev/pci/ixgbe/ixgbe_common.c 1.25
sys/dev/pci/ixgbe/ixv.c 1.129-1.130

- X550EM supports QSFP, so check ixgbe_media_type_fiber_qsfp too.
- An interrupt might not arrive when a module is inserted. When an link
status change interrupt occurred and the driver still regard SFP as
unplugged, issue the module softint before issuing LSC softint.
- Add 10000BASE-LX media if it's 1000BASE-BX.
- printf -> device_printf
- Avoid undefined behavior of VLAN filter setting.
- Simplify code.
- Fix typo in unused code.
- Fix typo in comment. Found by Wataru Ashihara.
 1.6.2.3  22-Jul-2019  martin Pull up the following revisions (via patch), requested by msaitoh in
ticket #1301:

sys/dev/pci/ixgbe/if_sriov.c 1.5-1.6
sys/dev/pci/ixgbe/ix_txrx.c 1.53-1.54
sys/dev/pci/ixgbe/ixgbe_x550.h 1.5
sys/dev/pci/ixgbe/ixgbe.c 1.169-1.170,1.176,1.179,1.181,1.185-1.186,1.188-1.192 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.53,1.55
sys/dev/pci/ixgbe/ixgbe_82599.c 1.21
sys/dev/pci/ixgbe/ixgbe_api.c 1.22-1.23
sys/dev/pci/ixgbe/ixgbe_api.h 1.14-1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.14-1.15
sys/dev/pci/ixgbe/ixgbe_common.c 1.23
sys/dev/pci/ixgbe/ixgbe_common.h 1.14
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.11
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.2
sys/dev/pci/ixgbe/ixgbe_features.h 1.2
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.9
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.9-1.10
sys/dev/pci/ixgbe/ixgbe_phy.c 1.18
sys/dev/pci/ixgbe/ixgbe_type.h 1.37,1.39-1.40
sys/dev/pci/ixgbe/ixgbe_vf.c 1.18
sys/dev/pci/ixgbe/ixv.c 1.112-1.114,1.117,1.119 via patch

Sync ixgbe up to 20190717 except ETHERCAP or ixv's VLAN stuff:
- Add firmware recovery mode for X550, X550A(Xeon D) and X550EM(C3000).
- Remove IXGBE_DEV_ID_82599_LS(0x154f) support again.
- On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of
ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em()
has extra check (e.g. exclude 1G copper).
- It's not required to calculate unused queues' statistics.
- Remove ETHERCAP_VLAN_HWFILTER's definition.
- Match 82598_BX(0x1508), 82599_KR(0x1517), 82599_SFP_EM(0x1507),
X550EM_X_XFI(0x15b0), X550EM_A_QSFP(0x15ca) and
X550EM_A_QSFP_N(0x15cc)
- Add missing XFI support into ixgbe_get_link_capabilities_X550em().
- Other than IXGBE_VF_RESET should wait ACK, so use
ixgbevf_write_msg_read_ack() instead of write_posted() in
ixgbe_update_mc_addr_list_vf().
- When ixv_check_link() failed in the watchdog function, reset the
interface.
- Remove RXCSUM register modification in
ixv_initialize_receive_units(). It seems it's not required.
- Remove some debug printf in ixv_print_debug_info().
- Calculate vector's bit location correctly when the vector >= 31
in ixgbe_allocate_msix().
- Fix hung queue check when the queue number >= 31.
- On ENETRESET case, not continue and quit the ifflags_cb() function
because if_init() will do the same thing.
- Fix bugs in unused code.
- Fix typo in comment.
- Fix typo in unused code.
- Whitespace fixes. KNF.
 1.6.2.2  07-Aug-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #961):

sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe.h: revision 1.51
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.36
sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.23
sys/dev/pci/ixgbe/ixgbe_netbsd.c: revision 1.8
sys/dev/pci/ixgbe/ixgbe.c: revision 1.163
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.49

Add force_10_100_autonego sysctl. The default value is 0(false).

This sysctl is only for 550EM_a with PHY firmware for a while.

Make jcl allocation per queue to reduce mutex spin. Tested by me and
knakahara.
 1.6.2.1  09-Jun-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #864):

sys/dev/pci/ixgbe/ix_txrx.c 1.40-1.47 (patch)
sys/dev/pci/ixgbe/ixgbe.c 1.148,1.149,1.151,
1.152,1.154,
1.155,1.157-1.160 (patch)
sys/dev/pci/ixgbe/ixgbe.h 1.43,1.44,1.46,1.49 (patch)
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.7 (patch)
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.8 (patch)
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.22 (patch)
sys/dev/pci/ixgbe/ixv.c 1.100-1.104 (patch)
sys/dev/pci/ixgbe/ixv.c 1.94,1.95,1.99 (patch)

Remove unused structure entries. No functional change.
-
Remove unused IXGBE_FC_HI and IXGBE_FC_LO. The watermark of the flow control
is automatically calculated from the size of the packet buffer.
-
Use ixgbe_eitr_write() when writing the EITR for the link interrupt like
queue's EITR to write the register safely. This change is not relatively
so important than queue's EITR because link's EITR is written in if_init().
-
Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
-
Count some register correctly:
- QPRDC register is only for 82599 and newer.
- Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT].
The TQSMR register is not for receiving but for transmitting, so move the
initialization from ixgbe_initialize_receive_units() to
ixgbe_initialize_transmit_units(). No functional change.
-
Whitespace fix. No functional change.
-
Add rxd_nxck (Receive Descriptor next to check) read only sysctl.
Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor
with DD bit is worse than just processing the entry. And it's also racy to
check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING,
it would be better to do it in the upper layer.
Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922).
Add "bool txr_no_space" for TX descriptor shortage. Use it like IFF_OACTIVE.
Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without this,
interrupt mask state and EIMS may mismatch and if_init doesn't recover
from TX/RX stall problem.
This change itself doesn't fix PR#53294.
-
Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some registers
to console.
-
Constify several variables in ixgbe/ so that they land in .rodata (1038
bytes).
-
Don't call ixgbe_rearm_queues() in ixgbe_local_timer1().
ixgbe_enable_queue() and ixgbe_disable_queue() try to enable/disable queue
interrupt safely. It has the internal counter. When a queue's MSI-X is
received, ixgbe_msix_que() is called (IPL_NET). This function disable the
queue's interrupt by ixgbe_disable_queue() and issues an softint.
ixgbe_handle() queue is called by the softint (IPL_SOFTNET), process TX, RX
and call ixgbe_enable_queue() at the end.

ixgbe_local_timer1() is a callout and run always on CPU 0 (IPL_SOFTCLOCK).
When ixgbe_rearm_queues() called, an MSI-X interrupt is issued for a specific
queue. It may not CPU 0. If this interrupt's ixgbe_msix_que() is called and
sofint_schedule() is called before the last sofint's softint_execute() is not
called, the softint_schedule() fails because of SOFTINT_PENDING. It result
in breaking ixgbe_{enable,disable}_queue()'s internal counter.
ixgbe_local_timer1() is written not to call ixgbe_rearm_queues() if
the interrupt is disabled, but it's called because of unknown bug or a race.

One solution to avoid this problem is to not to use the internal counter,
but it's little difficult. Another solution is stop using
ixgbe_rearm_queues() at all. Essentially, ixgbe_rearm_queues() is not
required (it was added in ixgbe.c rev. 1.43 (2016/12/01)).
ixgbe_rearm_queues() helps for lost interrupt problem but I've never seen it
other than ixgbe_rearm_queues() problem.

XXX pullup-8.
 1.7.2.4  21-Apr-2020  martin Sync with HEAD
 1.7.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.2.1  10-Jun-2019  christos Sync with HEAD
 1.9.4.4  15-Sep-2021  martin Pull up the following (via patch), requested by msaitoh in ticket #1346:

sys/dev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.68-1.93
sys/dev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sys/dev/pci/ixgbe/if_bypass.c 1.7-1.9
sys/dev/pci/ixgbe/if_fdir.c 1.4-1.5
sys/dev/pci/ixgbe/if_sriov.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_82598.c 1.16
sys/dev/pci/ixgbe/ixgbe_82599.c 1.23
sys/dev/pci/ixgbe/ixgbe_api.c 1.25
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.2
sys/dev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.3
sys/dev/pci/ixgbe/ixgbe_features.h 1.3
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.12
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.13, 1.16-1.17
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sys/dev/pci/ixgbe/ixgbe_netmap.h 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.7
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sys/dev/pci/ixgbe/ixgbe_phy.c 1.24
sys/dev/pci/ixgbe/ixgbe_rss.h 1.5
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.4
sys/dev/pci/ixgbe/ixgbe_type.h 1.49
sys/dev/pci/ixgbe/ixgbe_vf.c 1.27
sys/dev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sys/dev/pci/ixgbe/ixgbe_x540.h 1.9
sys/dev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sys/dev/pci/ixgbe/ixgbe_x550.h 1.6
sys/dev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
Before this commit, resource shortage was easily occurred because
the total number of the clusters is small.
- Improve performance:
- Use m_adj(ETHER_ALIGN) more.
- Sprinkle __predict_false() in the RX path.
- Don't pre-allocate a cluster for RXCOPY case to improve short
packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change). This
change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
address. At least, this change is required for macppc
(sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
panic.
- Save the discard_multidesc state to not to forget the state by
exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
 1.9.4.3  10-Jul-2020  martin Pull up the following revisions, requested by msaitoh in ticket #997:

sys/dev/pci/ixgbe/ix_txrx.c 1.62-1.63 via patch
sys/dev/pci/ixgbe/ixgbe.c 1.225, 1.228-1.229,
1.232 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.64, 1.66
sys/dev/pci/ixgbe/ixv.c 1.146, 1.148-1.150
sys/dev/pci/ixgbe/ixgbe_common.c 1.27
sys/dev/pci/ixgbe/ixgbe_vf.c 1.23
sys/dev/pci/ixgbe/ixgbe_82598.c 1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.18
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.14
sys/dev/pci/ixgbe/ixgbe_phy.c 1.21
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
was only on X550*.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.
 1.9.4.2  26-Jan-2020  martin Pull up the following (via patch), requested by msaitoh in ticket #648

sys/dev/pci/ixgbe/if_bypass.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c 1.220-1.221
sys/dev/pci/ixgbe/ixgbe.h 1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c 1.24
sys/dev/pci/ixgbe/ixgbe_common.c 1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c 1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.142,1.144

- Free RX structure correctly when detaching.
- Remove unused code.
- Fix some typos in comment.
- Remove extra spaces.
- KNF.
 1.9.4.1  05-Sep-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #180):

sys/dev/pci/ixgbe/ixv.c: revision 1.130
sys/dev/pci/ixgbe/ixgbe.c: revision 1.207
sys/dev/pci/ixgbe/ixgbe.c: revision 1.208
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.55
sys/dev/pci/ixgbe/ixv.c: revision 1.129
sys/dev/pci/ixgbe/ixgbe_netbsd.c: revision 1.10

printf -> device_printf

Set IFM_1000_BX10 correctly.

Use aprint_*() in the attach function.
 1.10.2.2  29-Feb-2020  ad Sync with head.
 1.10.2.1  25-Jan-2020  ad Sync with head.
 1.13.4.1  20-Apr-2020  bouyer Sync with HEAD
 1.15.6.1  13-May-2021  thorpej Sync with HEAD.

RSS XML Feed