Skip to contentSkip to conversation

igb: add IntMode module parameter

PATCH In review Jeff Kirsher 2 participants 2 messages Mar 23, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: add IntMode module parameter

From: Nick Nunley <[email protected]>

This patch adds the IntMode module parameter to igb. This allows user selection of interrupt mode (MSI-X, MSI, legacy) on driver load.

---

 drivers/net/igb/Makefile    |    3 +
 drivers/net/igb/igb.h       |    7 ++
 drivers/net/igb/igb_main.c  |  125 ++++++++++++++++++++++++----------------
 drivers/net/igb/igb_param.c |  133 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 215 insertions(+), 53 deletions(-)
 create mode 100644 drivers/net/igb/igb_param.c
drivers/net/igb/Makefile +2 -1
index 8372cb9..049255e 100644
@@ -33,5 +33,6 @@
 obj-$(CONFIG_IGB) += igb.o
 
 igb-objs := igb_main.o igb_ethtool.o e1000_82575.o \
-	    e1000_mac.o e1000_nvm.o e1000_phy.o e1000_mbx.o
+	    e1000_mac.o e1000_nvm.o e1000_phy.o e1000_mbx.o \
+	    igb_param.o
 
drivers/net/igb/igb.h +7 -0
index a177570..78a9c28 100644
@@ -43,6 +43,11 @@ struct igb_adapter;
 /* ((1000000000ns / (6000ints/s * 1024ns)) << 2 = 648 */
 #define IGB_START_ITR 648
 
+/* Interrupt modes, as used by the IntMode paramter */
+#define IGB_INT_MODE_LEGACY                0
+#define IGB_INT_MODE_MSI                   1
+#define IGB_INT_MODE_MSIX                  2
+
 /* TX/RX descriptor defines */
 #define IGB_DEFAULT_TXD                  256
 #define IGB_MIN_TXD                       80
@@ -314,6 +319,7 @@ struct igb_adapter {
 	u16 rx_ring_count;
 	unsigned int vfs_allocated_count;
 	struct vf_data_storage *vf_data;
+	int int_mode;
 	u32 rss_queues;
 };
 
@@ -358,6 +364,7 @@ extern void igb_alloc_rx_buffers_adv(struct igb_ring *, int);
 extern void igb_update_stats(struct igb_adapter *);
 extern bool igb_has_link(struct igb_adapter *adapter);
 extern void igb_set_ethtool_ops(struct net_device *);
+extern void igb_check_options(struct igb_adapter *);
 extern void igb_power_up_link(struct igb_adapter *);
 
 static inline s32 igb_reset_phy(struct e1000_hw *hw)
drivers/net/igb/igb_main.c +73 -52

163 lines not on this page · raw message

drivers/net/igb/igb_param.c new file +133 -0

133 lines not on this page · raw message

maintainer
#1 lore raw

From: Jeff Kirsher <[email protected]>
Date: Mon, 22 Mar 2010 17:06:20 -0700

Quoted 8 lines

From: Nick Nunley <[email protected]>

This patch adds the IntMode module parameter to igb. This allows user selection of interrupt mode (MSI-X, MSI, legacy) on driver load.

And IGB is special and needs this for what reason?

If there are real interrupt issues then:

1) Diagnosing via verification of the problem can be simply performed by asking the user to pass the generic kernel boot option to globally disable MSI and friends.

2) Specifically disabling it for buggy parts belongs in the driver or in the PCI quirk tables.

So from just about any angle, this module option makes no sense.

So I'm not applying it, sorry.