IFF_OACTIVE means the hardware ring is full, not if it is busy.

perhaps a better check is to see whether there are pending packets
on the send queue?

i could also argue we dont need the check at all, but this is less
of a semantic change.

ok?

Index: if_trunk.c
===================================================================
RCS file: /cvs/src/sys/net/if_trunk.c,v
retrieving revision 1.124
diff -u -p -r1.124 if_trunk.c
--- if_trunk.c  20 Nov 2015 05:33:54 -0000      1.124
+++ if_trunk.c  20 Nov 2015 05:35:07 -0000
@@ -296,7 +296,7 @@ trunk_port_create(struct trunk_softc *tr
                return (ENOSPC);
 
        /* New trunk port has to be in an idle state */
-       if (ifp->if_flags & IFF_OACTIVE)
+       if (!ifq_empty(&ifp->if_snd))
                return (EBUSY);
 
        /* Check if port has already been associated to a trunk */

Reply via email to