summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-12 01:36:34 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-12 01:36:34 +0000
commit623f44d6c383db9dbed403de744d605cdccadeca (patch)
tree7b9ab63f5848dd71b59a7abde31fd49b0c34bda8
parentfc840dc83f8642bc1a6baaac576f4190e99b4e12 (diff)
set the length of the send queue to 1.
this prevents the ultimate length of the queue of the underlying interface from being artificially inflated while hte vlan/trunk queue is filled and then dumped wholesale on the underlying interface, which will dump its massive queue wholesale on the chip. tx mitigation is only triggered on real interfaces now (which is where the cost is) ok beck@ original diff ok kjc@ henning@
-rw-r--r--sys/net/if_trunk.c4
-rw-r--r--sys/net/if_vlan.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 407a3c8f3ff..7c40d604c1c 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.70 2009/11/18 02:09:59 deraadt Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.71 2010/01/12 01:36:33 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -194,7 +194,7 @@ trunk_clone_create(struct if_clone *ifc, int unit)
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST;
ifp->if_capabilities = trunk_capabilities(tr);
- IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
+ IFQ_SET_MAXLEN(&ifp->if_snd, 1);
IFQ_SET_READY(&ifp->if_snd);
snprintf(ifp->if_xname, sizeof(ifp->if_xname), "%s%d",
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 85a6435f24e..6c08dbbce0e 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.81 2009/11/18 02:09:59 deraadt Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.82 2010/01/12 01:36:33 dlg Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -132,7 +132,7 @@ vlan_clone_create(struct if_clone *ifc, int unit)
ifp->if_start = vlan_start;
ifp->if_ioctl = vlan_ioctl;
- IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
+ IFQ_SET_MAXLEN(&ifp->if_snd, 1);
IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
ether_ifattach(ifp);