From: Jesse Gross <jesse@nicira.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/6] offloading: Accept NETIF_F_HW_CSUM for all protocols.
Date: Sun, 9 Jan 2011 08:23:30 -0800 [thread overview]
Message-ID: <1294590215-15541-1-git-send-email-jesse@nicira.com> (raw)
We currently only have software fallback for one type of checksum: the
TCP/UDP one's complement. This means that a protocol that uses hardware
offloading for a different type of checksum (FCoE, SCTP) must directly
check the device's features and do the right thing ahead of time. By
the time we get to dev_can_checksum(), we're only deciding whether to
apply the one algorithm in software or hardware. NETIF_F_HW_CSUM has the
same capabilities as the software version, so we should always use it if
present. The primary advantage of this is multiply tagged vlans can use
hardware checksumming.
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
net/core/dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index a215269..d8befd0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1734,7 +1734,7 @@ EXPORT_SYMBOL(netif_device_attach);
static bool can_checksum_protocol(unsigned long features, __be16 protocol)
{
- return ((features & NETIF_F_NO_CSUM) ||
+ return ((features & NETIF_F_GEN_CSUM) ||
((features & NETIF_F_V4_CSUM) &&
protocol == htons(ETH_P_IP)) ||
((features & NETIF_F_V6_CSUM) &&
--
1.7.1
next reply other threads:[~2011-01-09 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-09 16:23 Jesse Gross [this message]
2011-01-09 16:23 ` [PATCH 2/6] offloading: Generalize netif_get_vlan_features() Jesse Gross
2011-01-09 16:23 ` [PATCH 3/6] offloading: Pass features into netif_needs_gso() Jesse Gross
2011-01-09 16:23 ` [PATCH 4/6] offloading: Convert dev_gso_segment() to use precomputed features Jesse Gross
2011-01-09 16:23 ` [PATCH 5/6] offloading: Convert skb_need_linearize() " Jesse Gross
2011-01-09 16:23 ` [PATCH 6/6] offloading: Convert checksums to use centrally computed features Jesse Gross
2011-01-10 7:36 ` [PATCH 1/6] offloading: Accept NETIF_F_HW_CSUM for all protocols 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=1294590215-15541-1-git-send-email-jesse@nicira.com \
--to=jesse@nicira.com \
--cc=davem@davemloft.net \
--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 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).