From: Dimitris Michailidis <dm@chelsio.com>
To: netdev@vger.kernel.org
Cc: Dimitris Michailidis <dm@chelsio.com>
Subject: [PATCH net-next 2/9] cxgb4: don't offload Rx checksums for IPv6 fragments
Date: Mon, 2 Aug 2010 16:19:17 -0700 [thread overview]
Message-ID: <1280791164-14181-3-git-send-email-dm@chelsio.com> (raw)
In-Reply-To: <1280791164-14181-2-git-send-email-dm@chelsio.com>
The checksum provided by the device doesn't include the L3 headers,
as IPv6 expects.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
drivers/net/cxgb4/sge.c | 7 ++++---
drivers/net/cxgb4/t4_msg.h | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index 4388f72..304302a 100644
--- a/drivers/net/cxgb4/sge.c
+++ b/drivers/net/cxgb4/sge.c
@@ -1593,14 +1593,15 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
if (csum_ok && (pi->rx_offload & RX_CSO) &&
(pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
- if (!pkt->ip_frag)
+ if (!pkt->ip_frag) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
- else {
+ rxq->stats.rx_cso++;
+ } else if (pkt->l2info & htonl(RXF_IP)) {
__sum16 c = (__force __sum16)pkt->csum;
skb->csum = csum_unfold(c);
skb->ip_summed = CHECKSUM_COMPLETE;
+ rxq->stats.rx_cso++;
}
- rxq->stats.rx_cso++;
} else
skb->ip_summed = CHECKSUM_NONE;
diff --git a/drivers/net/cxgb4/t4_msg.h b/drivers/net/cxgb4/t4_msg.h
index 623932b..a550d0c 100644
--- a/drivers/net/cxgb4/t4_msg.h
+++ b/drivers/net/cxgb4/t4_msg.h
@@ -529,6 +529,8 @@ struct cpl_rx_pkt {
__be32 l2info;
#define RXF_UDP (1 << 22)
#define RXF_TCP (1 << 23)
+#define RXF_IP (1 << 24)
+#define RXF_IP6 (1 << 25)
__be16 hdr_len;
__be16 err_vec;
};
--
1.5.4
next prev parent reply other threads:[~2010-08-02 23:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 23:19 [PATCH net-next 0/9] cxgb4 updates Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 1/9] cxgb4: disable an interrupt that is neither used nor serviced Dimitris Michailidis
2010-08-02 23:19 ` Dimitris Michailidis [this message]
2010-08-02 23:19 ` [PATCH net-next 3/9] cxgb4: fix TSO descriptors Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 4/9] cxgb4: get on-chip queue info from FW and create a memory window for them Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 5/9] cxgb4: advertise NETIF_F_TSO_ECN Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 6/9] cxgb4: support running the driver on PCI functions besides 0 Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 7/9] cxgb4: fix wrong shift direction Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 8/9] cxgb4: add new PCI IDs Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 9/9] cxgb4: update driver version Dimitris Michailidis
2010-08-02 23:27 ` [PATCH net-next 0/9] cxgb4 updates 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=1280791164-14181-3-git-send-email-dm@chelsio.com \
--to=dm@chelsio.com \
--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).