aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-11-06 19:43:04 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-11-06 19:43:04 +0000
commit6d3a3ab73503e1e4a32a90ecaf6cc769e7fc983d (patch)
treee40528f09019df701f53fa6334cf691e4b1f270a /sys/net/if_vlan.c
parentb5b548a6bcb9799af3796a906b115bca42a541d4 (diff)
downloadsrc-6d3a3ab73503e1e4a32a90ecaf6cc769e7fc983d.tar.gz
src-6d3a3ab73503e1e4a32a90ecaf6cc769e7fc983d.zip
- Do not raise IFF_DRV_OACTIVE flag in vlan_start, because this
can lead to stalled interface - Explain this fact in a comment. Reviewed by: rwatson, thompsa, yar
Notes
Notes: svn path=/head/; revision=152139
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 009d0ca4f9ed..15a2a7900ecb 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -465,6 +465,14 @@ vlan_ifinit(void *foo)
}
+/*
+ * The if_start method for vlan(4) interface. It doesn't
+ * raises the IFF_DRV_OACTIVE flag, since it is called
+ * only from IFQ_HANDOFF() macro in ether_output_frame().
+ * If the interface queue is full, and vlan_start() is
+ * not called, the queue would never get emptied and
+ * interface would stall forever.
+ */
static void
vlan_start(struct ifnet *ifp)
{
@@ -477,7 +485,6 @@ vlan_start(struct ifnet *ifp)
ifv = ifp->if_softc;
p = ifv->ifv_p;
- ifp->if_drv_flags |= IFF_DRV_OACTIVE;
for (;;) {
IF_DEQUEUE(&ifp->if_snd, m);
if (m == 0)
@@ -561,7 +568,6 @@ vlan_start(struct ifnet *ifp)
else
ifp->if_oerrors++;
}
- ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
}
static void