On Thu, Mar 17, 2022 at 01:01:11AM +0100, Hrvoje Popovski wrote: > On 16.3.2022. 20:00, Hrvoje Popovski wrote: > > Hi all, > > > > While opensbd box is under pressure and in that moment i run ifconfig > > bnxt0 down i get panic... it's not every time and it's that easy to > > trigger panic > > > > I'm sending traffic over ix interfaces and bnxt is for ssh and nothing > > else. > > > > I've compiled kernel with "option BNXT_DEBUG" and put debug in > > hostname.bnxt0 but i didn't saw any log regarding bnxt interfaces. > > > > I will try to trigger panic few more times and will post them here.. > > this is same panic but with snapshot kernel without debug options > > uvm_fault(0xfffffd904e3a9440, 0x0, 0, 1) -> e > kernel: page fault trap, code=0 > Stopped at bnxt_intr+0x195: movq 0(%r14,%r12,1),%rbx > TID PID UID PRFLAGS PFLAGS CPU COMMAND > *465591 26407 0 0x3 0 0K ifconfig > bnxt_intr(ffff8000002bc7c0) at bnxt_intr+0x195 > intr_handler(ffff800027d3d7b0,ffff800000269880) at intr_handler+0x6e > Xintr_ioapic_edge28_untramp() at Xintr_ioapic_edge28_untramp+0x18f > Xspllower() at Xspllower+0x19 > softintr_dispatch(0) at softintr_dispatch+0xdc > Xsoftclock() at Xsoftclock+0x1f > bnxt_ioctl(ffff8000002bc048,80206910,ffff800027d3dae0) at bnxt_ioctl+0x165 > ifioctl(fffffd8e5a4f13a8,80206910,ffff800027d3dae0,ffff800027d8da50) at > ifioctl+0x92b > soo_ioctl(fffffd904cc0b2e8,80206910,ffff800027d3dae0,ffff800027d8da50) > at soo_ioctl+0x161 > sys_ioctl(ffff800027d8da50,ffff800027d3dbf0,ffff800027d3dc40) at > sys_ioctl+0x2c4 > syscall(ffff800027d3dcb0) at syscall+0x374 > Xsyscall() at Xsyscall+0x128 > end of kernel > end trace frame: 0x7f7fffffaf30, count: 3 > https://www.openbsd.org/ddb.html describes the minimum info required in > bug reports. Insufficient info makes it difficult to find and fix bugs.
I don't have the device and don't know the code. But other drivers don't process rx and tx interrupts when the interface is not running. Maybe this helps. dlg@ and jmatthew@ should know better than me. bluhm Index: dev/pci/if_bnxt.c =================================================================== RCS file: /data/mirror/openbsd/cvs/src/sys/dev/pci/if_bnxt.c,v retrieving revision 1.36 diff -u -p -r1.36 if_bnxt.c --- dev/pci/if_bnxt.c 14 Mar 2022 23:41:42 -0000 1.36 +++ dev/pci/if_bnxt.c 17 Mar 2022 20:26:49 -0000 @@ -1543,6 +1543,7 @@ bnxt_intr(void *xq) { struct bnxt_queue *q = (struct bnxt_queue *)xq; struct bnxt_softc *sc = q->q_sc; + struct ifnet *ifp = &sc->sc_ac.ac_if; struct bnxt_cp_ring *cpr = &q->q_cp; struct bnxt_rx_queue *rx = &q->q_rx; struct bnxt_tx_queue *tx = &q->q_tx; @@ -1565,10 +1566,13 @@ bnxt_intr(void *xq) bnxt_handle_async_event(sc, cmpl); break; case CMPL_BASE_TYPE_RX_L2: - rollback = bnxt_rx(sc, rx, cpr, &ml, &rxfree, &agfree, cmpl); + if (ISSET(ifp->if_flags, IFF_RUNNING)) + rollback = bnxt_rx(sc, rx, cpr, &ml, &rxfree, + &agfree, cmpl); break; case CMPL_BASE_TYPE_TX_L2: - bnxt_txeof(sc, tx, &txfree, cmpl); + if (ISSET(ifp->if_flags, IFF_RUNNING)) + bnxt_txeof(sc, tx, &txfree, cmpl); break; default: printf("%s: unexpected completion type %u\n",