summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2014-08-14 11:38:14 +0000
committermikeb <mikeb@openbsd.org>2014-08-14 11:38:14 +0000
commit02f326cfe5ebb048025e29387c159be75bd69387 (patch)
tree97e62f71c361e87a97f06bd9e58ef987194854df
parentSync with httpd, including the following change from doug@: (diff)
downloadwireguard-openbsd-02f326cfe5ebb048025e29387c159be75bd69387.tar.xz
wireguard-openbsd-02f326cfe5ebb048025e29387c159be75bd69387.zip
Compare number of allocated clusters with a low watermark, not
a magic number 4 since sometimes we can't fit a single packet (jumbo frame) into 4 clusters. OK dlg
-rw-r--r--sys/net/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 3425b77f82c..92c2d167c65 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.298 2014/08/11 13:51:07 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.299 2014/08/14 11:38:14 mikeb Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -2412,7 +2412,7 @@ if_rxr_adjust_cwm(struct if_rxring *rxr)
rxr->rxr_cwm--;
else
return;
- } else if (rxr->rxr_alive > 4)
+ } else if (rxr->rxr_alive >= rxr->rxr_lwm)
return;
else if (rxr->rxr_cwm < rxr->rxr_hwm)
rxr->rxr_cwm++;