aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000/if_em.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/e1000/if_em.h')
-rw-r--r--sys/dev/e1000/if_em.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h
index 244762e8ed0d..7219dc57c333 100644
--- a/sys/dev/e1000/if_em.h
+++ b/sys/dev/e1000/if_em.h
@@ -244,8 +244,15 @@
#define IGB_MEDIA_RESET (1 << 0)
/* Define the starting Interrupt rate per Queue */
-#define IGB_INTS_PER_SEC 8000
-#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2)
+#define EM_INTS_PER_SEC 8000
+#define EM_INTS_MULTIPLIER 256
+#define EM_ITR_DIVIDEND 1000000000
+#define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER))
+#define IGB_ITR_DIVIDEND 1000000
+#define IGB_ITR_SHIFT 2
+#define IGB_QVECTOR_MASK 0x7FFC
+#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \
+ IGB_ITR_SHIFT)
#define IGB_LINK_ITR 2000
#define I210_LINK_DELAY 1000