On Wed, Jan 14, 2026 at 09:29:41AM +0000, Alisdair MacLeod wrote:
> 
> 
> > On 14 Jan 2026, at 09:23, David Gwynne <[email protected]> wrote:
> > 
> > can you tell if these Ofails are drops or errors by adding -e and -d to
> > the netstat command?
> 
> It looks like they are all drops:

cool.

> # netstat -edI aq0
> Name    Mtu   Network     Address              Ipkts Idrop    Opkts Odrop 
> Colls
> aq0     1500  <Link>      00:e2:59:01:7e:35        0     0    93799  7471     > 0
> 
> > kstat aq0::: would also be interesting.
> 
> aq0:0:rxq:0
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:1
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:2
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:3
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:4
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:5
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:6
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:rxq:7
>          packets: 0 packets
>            bytes: 0 bytes
>           fdrops: 0 packets
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>         enqueues: 0
>         dequeues: 0
> aq0:0:txq:0
>          packets: 8085 packets
>            bytes: 1172790 bytes
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>          maxqlen: 2048 packets
>          oactive: false
>         oactives: 0
> aq0:0:txq:1
>          packets: 14619 packets
>            bytes: 4416234 bytes
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>          maxqlen: 2048 packets
>          oactive: false
>         oactives: 0
> aq0:0:txq:2
>          packets: 4076 packets
>            bytes: 735756 bytes
>           qdrops: 285 packets
>           errors: 0 packets
>             qlen: 2048 packets

looks like i found some of the missing mbufs. there's 2048 packets
stuck in this transmit queue.

>          maxqlen: 2048 packets
>          oactive: true
>         oactives: 1
> aq0:0:txq:3
>          packets: 12637 packets
>            bytes: 4088727 bytes
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>          maxqlen: 2048 packets
>          oactive: false
>         oactives: 0
> aq0:0:txq:4
>          packets: 4082 packets
>            bytes: 1139174 bytes
>           qdrops: 4405 packets
>           errors: 0 packets
>             qlen: 2048 packets

and here.

>          maxqlen: 2048 packets
>          oactive: true
>         oactives: 1
> aq0:0:txq:5
>          packets: 4089 packets
>            bytes: 1182857 bytes
>           qdrops: 2781 packets
>           errors: 0 packets
>             qlen: 2048 packets

and here.

>          maxqlen: 2048 packets
>          oactive: true
>         oactives: 1
> aq0:0:txq:6
>          packets: 3556 packets
>            bytes: 286831 bytes
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 1539 packets

this one is accumulating mbufs.

>          maxqlen: 2048 packets
>          oactive: true
>         oactives: 1
> aq0:0:txq:7
>          packets: 42655 packets
>            bytes: 11614149 bytes
>           qdrops: 0 packets
>           errors: 0 packets
>             qlen: 0 packets
>          maxqlen: 2048 packets
>          oactive: false
>         oactives: 0
> 
> We are now somewhat beyond the limits of my understanding but
> I will try to recreate the previous error I had with aq0 in
> the hope that is also useful.

my guess is the aq hardware wont do anything with the packets it's been
asked to transmit while the link is down. a simple fix is to check the
link state in the transmit path.

Index: if_aq_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_aq_pci.c,v
diff -u -p -r1.33 if_aq_pci.c
--- if_aq_pci.c 11 Nov 2025 17:43:18 -0000      1.33
+++ if_aq_pci.c 14 Jan 2026 09:37:58 -0000
@@ -3262,6 +3262,11 @@ aq_start(struct ifqueue *ifq)
        uint32_t idx, free, used, ctl1, ctl2;
        int error, i;
 
+       if (!LINK_STATE_IS_UP(sc->sc_arpcom.ac_if.if_link_state)) {
+               ifq_purge(ifq);
+               return;
+       }
+
        idx = tx->tx_prod;
        free = tx->tx_cons + AQ_TXD_NUM - tx->tx_prod;
        used = 0;

Reply via email to