diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-07-13 12:39:23 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-07-13 12:39:23 +0000 |
commit | bf8127e4a65737f54016c4523bd63ba85a6d5f8e (patch) | |
tree | da6bd69e53ecedae72bbc4cbe7a638e09a5496fb /sys | |
parent | 3b86c193d95e633ff0e65671513fc1a762e8d569 (diff) |
make the send queue one slot long. this forces packets off the virtual
interfaces down to the queue on the physical interface immediately.
this avoids having the tx mitigation code wasting cpu time dicking around
with simply shuffling packets off virtual interface queues and lets it
do its job of ammortising the cost of calling a real interfaces start
routine.
it also prevents an artificial inflation of the physical interfaces queue
length where packets could hide on the virtual interfaces queues during
softnet before being dumped en masse onto the hardware. this will smooth
out the rate at which packets are submitted to the hardware.
kjc@ says this has no impact on altq. ya henning@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_trunk.c | 4 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index c335dfa3332..b1fc9014914 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.65 2009/01/27 16:40:54 naddy Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.66 2009/07/13 12:39:22 dlg Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -197,7 +197,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 49d9092abb3..43fd6b13af1 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.78 2009/01/27 15:56:58 naddy Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.79 2009/07/13 12:39:22 dlg Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -133,7 +133,7 @@ vlan_clone_create(struct if_clone *ifc, int unit) ifp->if_start = vlan_start; ifp->if_ioctl = vlan_ioctl; ifp->if_output = ether_output; - 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); |