From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, jeff@garzik.org, gospo@redhat.com,
Alexander Duyck <alexander.h.duyck@intel.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH 3/6] igb: cleanup incorrect comment and set IP Checksum Enable
Date: Thu, 12 Feb 2009 20:17:42 -0800 [thread overview]
Message-ID: <20090213041742.3848.64015.stgit@lost.foo-projects.org> (raw)
In-Reply-To: <20090213041654.3848.39227.stgit@lost.foo-projects.org>
From: Alexander Duyck <alexander.h.duyck@intel.com>
IP Checksum enable doesn't need packet split in order to function. It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_main.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 8701330..5a6bcef 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1934,17 +1934,11 @@ static void igb_configure_rx(struct igb_adapter *adapter)
} else {
/* Enable Receive Checksum Offload for TCP and UDP */
rxcsum = rd32(E1000_RXCSUM);
- if (adapter->rx_csum) {
- rxcsum |= E1000_RXCSUM_TUOFL;
+ if (adapter->rx_csum)
+ rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE;
+ else
+ rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE);
- /* Enable IPv4 payload checksum for UDP fragments
- * Must be used in conjunction with packet-split. */
- if (adapter->rx_ps_hdr_size)
- rxcsum |= E1000_RXCSUM_IPPCSE;
- } else {
- rxcsum &= ~E1000_RXCSUM_TUOFL;
- /* don't need to clear IPPCSE as it defaults to 0 */
- }
wr32(E1000_RXCSUM, rxcsum);
}
next prev parent reply other threads:[~2009-02-13 4:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 4:16 [net-next PATCH 1/6] igb: misc whitespace/formatting cleanups Jeff Kirsher
2009-02-13 4:17 ` [net-next PATCH 2/6] igb: reduce size required to trigger low latency Jeff Kirsher
2009-02-16 8:06 ` David Miller
2009-02-13 4:17 ` Jeff Kirsher [this message]
2009-02-16 8:06 ` [net-next PATCH 3/6] igb: cleanup incorrect comment and set IP Checksum Enable David Miller
2009-02-13 4:18 ` [net-next PATCH 4/6] igb: misc cleanup to combine one if statement and set last_rx Jeff Kirsher
2009-02-13 13:23 ` Ben Hutchings
2009-02-14 5:43 ` David Miller
2009-02-13 4:18 ` [net-next PATCH 5/6] igb: remove unused defines Jeff Kirsher
2009-02-16 8:06 ` David Miller
2009-02-13 4:18 ` [net-next PATCH 6/6] igb: transition driver to only using advanced descriptors Jeff Kirsher
2009-02-16 8:07 ` David Miller
2009-02-16 8:06 ` [net-next PATCH 1/6] igb: misc whitespace/formatting cleanups David Miller
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=20090213041742.3848.64015.stgit@lost.foo-projects.org \
--to=jeffrey.t.kirsher@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).