Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: re(4) bpf-related assert



Hi,

On Fri, Feb 17, 2017 at 7:40 PM,  <coypu%sdf.org@localhost> wrote:
> Hi,
>
> I'm using:
> re0 at pci8 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x06)
>
> while using -current I got:
> System panicked: kernel diagnostic assertion "!cpu_intr_p()" failed: file "/usr/src/sys/net/bpf.c", line 1577
>
> _KERNEL_OPT_NARCNET() at 0
> ?() at ffff80001d563000
> vpanic() at vpanic+0x149
> ch_voltag_convert_in() at ch_voltag_convert_in
> _bpf_mtap() at _bpf_mtap+0x48f
> re_start() at re_start+0x3d8
> re_intr() at re_intr+0x176
> intr_biglock_wrapper() at intr_biglock_wrapper+0x1d
> Xintr_ioapic_edge18() at Xintr_ioapic_edge18+0xee
> --- interrupt ---
> Xspllower() at Xspllower+0xe
> callout_softclock() at callout_softclock+0x41c
> softint_dispatch() at softint_dispatch+0xda
>
> how should bpf_mtap callers be adjusted in this case?
>
> thanks.

Sorry, I forgot to make re use the deferred if_start mechanism.

Could you try the patch?
  ozaki-r

diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c
index 691afa4..d262af1 100644
--- a/sys/dev/ic/rtl8169.c
+++ b/sys/dev/ic/rtl8169.c
@@ -869,6 +869,7 @@ re_attach(struct rtk_softc *sc)
         * Call MI attach routine.
         */
        if_attach(ifp);
+       if_deferred_start_init(ifp, NULL);
        ether_ifattach(ifp, eaddr);

        rnd_attach_source(&sc->rnd_source, device_xname(sc->sc_dev),
@@ -1496,8 +1497,8 @@ re_intr(void *arg)
                }
        }

-       if (handled && !IFQ_IS_EMPTY(&ifp->if_snd))
-               re_start(ifp);
+       if (handled)
+               if_schedule_deferred_start(ifp);

        rnd_add_uint32(&sc->rnd_source, status);


Home | Main Index | Thread Index | Old Index