summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2011-06-15 00:03:01 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2011-06-15 00:03:01 +0000
commitbeaad27cfe37d51b0fa14d909a65611899eea62a (patch)
treeb51de478c6a3a728d6bcfea7b59c45c615a8c4ea /sys/dev/pci/if_ix.h
parenta1a09b596c0616ce46c113367e177885e17943f1 (diff)
if the system runs out of mbufs and cannot provide any when filling
the rx ring, schedule a timeout to keep trying until it gets some. a timeout is used here cos the chip doesnt have a way of reporting if its out of descriptors or when there's a ring overflow. we have to manage that ourselves in software. mikeb reported this issue on an ipsec gateway. ipsec would consume all the mbufs while they were stuck in crypto waiting for the cpu to catch up, by which time it was too late to give more to the hardware. without any rx descriptors the chip would never interrupt and we'd never try to fill the ring again. the fix was tested by and is ok mikeb@
Diffstat (limited to 'sys/dev/pci/if_ix.h')
-rw-r--r--sys/dev/pci/if_ix.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ix.h b/sys/dev/pci/if_ix.h
index 0bc365a7311..28d60656d33 100644
--- a/sys/dev/pci/if_ix.h
+++ b/sys/dev/pci/if_ix.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.h,v 1.12 2011/06/10 12:46:35 claudio Exp $ */
+/* $OpenBSD: if_ix.h,v 1.13 2011/06/15 00:03:00 dlg Exp $ */
/******************************************************************************
@@ -246,6 +246,7 @@ struct ix_softc {
struct ifmedia media;
struct timeout timer;
+ struct timeout rx_refill;
int msix;
int if_flags;