summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em_hw.h
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-03-23 15:02:51 +0000
committermpi <mpi@openbsd.org>2020-03-23 15:02:51 +0000
commite44a31d21aa41dc62f73b05ac33724dc49dba5cb (patch)
treea12ea033f7c8aaf20e0c8b0694afa80c87db3c78 /sys/dev/pci/if_em_hw.h
parentMake it possible to use ix(4) with MSI-X, currently disabled by default. (diff)
downloadwireguard-openbsd-e44a31d21aa41dc62f73b05ac33724dc49dba5cb.tar.xz
wireguard-openbsd-e44a31d21aa41dc62f73b05ac33724dc49dba5cb.zip
Make it possible to use em(4) with MSI-X, currently disabled by default.
The current implementation still uses a single queue but already establishes a different handler for link interrupts. This is done in preparation for multi-queues support. Based on a bigger diff from haesbaert@ and on the FreeBSD code. Tested by Hrvoje Popovski and jmatthew@, ok jmatthew@
Diffstat (limited to 'sys/dev/pci/if_em_hw.h')
-rw-r--r--sys/dev/pci/if_em_hw.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em_hw.h b/sys/dev/pci/if_em_hw.h
index 0e9b0d65166..9286a5a16c1 100644
--- a/sys/dev/pci/if_em_hw.h
+++ b/sys/dev/pci/if_em_hw.h
@@ -31,7 +31,7 @@
*******************************************************************************/
-/* $OpenBSD: if_em_hw.h,v 1.81 2020/03/08 11:43:43 mpi Exp $ */
+/* $OpenBSD: if_em_hw.h,v 1.82 2020/03/23 15:02:51 mpi Exp $ */
/* $FreeBSD: if_em_hw.h,v 1.15 2005/05/26 23:32:02 tackerman Exp $ */
/* if_em_hw.h
@@ -2033,6 +2033,11 @@ struct em_hw {
#define E1000_RXDCTL_THRESH_UNIT_DESC 0x1000000
#define E1000_RXDCTL_QUEUE_ENABLE 0x2000000
+#define E1000_EITR_ITR_INT_MASK 0x0000FFFF
+/* E1000_EITR_CNT_IGNR is only for 82576 and newer */
+#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */
+#define E1000_EITR_INTERVAL 0x00007FFC
+
/* Transmit Descriptor Control */
#define E1000_TXDCTL_PTHRESH 0x000000FF /* TXDCTL Prefetch Threshold */
#define E1000_TXDCTL_HTHRESH 0x0000FF00 /* TXDCTL Host Threshold */