From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, davem@davemloft.net,
akpm@linux-foundation.org, Bruce Allan <bruce.w.allan@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 2/7] e1000e: Set InterruptThrottleRate to default when invalid value used
Date: Fri, 08 Aug 2008 18:35:51 -0700 [thread overview]
Message-ID: <20080809013551.23913.68807.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080809013544.23913.47157.stgit@localhost.localdomain>
From: Bruce Allan <bruce.w.allan@intel.com>
During module load, seting the InterruptThrottleRate parameter to an
invalid value would result in the itr/itr_setting pair being set to
unexpected values which would result in poor performance.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/param.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index 8effc31..b0499f2 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -327,11 +327,26 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
e1000_validate_option(&adapter->itr, &opt,
adapter);
/*
- * save the setting, because the dynamic bits
- * change itr. clear the lower two bits
- * because they are used as control
+ * Save the setting, because the dynamic bits
+ * change itr.
*/
- adapter->itr_setting = adapter->itr & ~3;
+ if (e1000_validate_option(&adapter->itr, &opt,
+ adapter) &&
+ (adapter->itr == 3)) {
+ /*
+ * In case of invalid user value,
+ * default to conservative mode.
+ */
+ adapter->itr_setting = adapter->itr;
+ adapter->itr = 20000;
+ } else {
+ /*
+ * Clear the lower two bits because
+ * they are used as control.
+ */
+ adapter->itr_setting =
+ adapter->itr & ~3;
+ }
break;
}
} else {
next prev parent reply other threads:[~2008-08-09 1:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 1:35 [PATCH 1/7] e1000e: Return 1 instead of a non-zero value for link up indication Jeff Kirsher
2008-08-09 1:35 ` Jeff Kirsher [this message]
2008-08-09 1:35 ` [PATCH 3/7] e1000e: Use skb_copy_to_linear_data_offset introduced in 2.6.22 Jeff Kirsher
2008-08-09 1:36 ` [PATCH 4/7] e1000e: Increase Tx timeout factor for 10Mbps Jeff Kirsher
2008-08-09 1:36 ` [PATCH 5/7] e1000e: increase minimum frame size allowed Jeff Kirsher
2008-08-09 1:36 ` [PATCH 6/7] e1000e: test for unusable MSI support Jeff Kirsher
2008-08-09 1:36 ` [PATCH 7/7] e1000e: remove unnecessary snippet missed in prior check_options update Jeff Kirsher
2008-08-14 8:46 ` [PATCH 1/7] e1000e: Return 1 instead of a non-zero value for link up indication Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080809013551.23913.68807.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.