aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4
diff options
context:
space:
mode:
authorDimitris Michailidis <dm@chelsio.com>2010-08-02 09:19:17 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-02 19:26:41 -0400
commitba5d3c66e02c3dac66a386b6af0dc9687a4dba67 (patch)
tree8193d85ea620f7322f1aeacfa2754fa7ff285fd5 /drivers/net/cxgb4
parent63bcceec6e3ba8ffe0e2a0bec75afcdf6403165c (diff)
cxgb4: don't offload Rx checksums for IPv6 fragments
The checksum provided by the device doesn't include the L3 headers, as IPv6 expects. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4')
-rw-r--r--drivers/net/cxgb4/sge.c7
-rw-r--r--drivers/net/cxgb4/t4_msg.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index 4388f72d586a..304302a71dbc 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,
1593 1593
1594 if (csum_ok && (pi->rx_offload & RX_CSO) && 1594 if (csum_ok && (pi->rx_offload & RX_CSO) &&
1595 (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) { 1595 (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
1596 if (!pkt->ip_frag) 1596 if (!pkt->ip_frag) {
1597 skb->ip_summed = CHECKSUM_UNNECESSARY; 1597 skb->ip_summed = CHECKSUM_UNNECESSARY;
1598 else { 1598 rxq->stats.rx_cso++;
1599 } else if (pkt->l2info & htonl(RXF_IP)) {
1599 __sum16 c = (__force __sum16)pkt->csum; 1600 __sum16 c = (__force __sum16)pkt->csum;
1600 skb->csum = csum_unfold(c); 1601 skb->csum = csum_unfold(c);
1601 skb->ip_summed = CHECKSUM_COMPLETE; 1602 skb->ip_summed = CHECKSUM_COMPLETE;
1603 rxq->stats.rx_cso++;
1602 } 1604 }
1603 rxq->stats.rx_cso++;
1604 } else 1605 } else
1605 skb->ip_summed = CHECKSUM_NONE; 1606 skb->ip_summed = CHECKSUM_NONE;
1606 1607
diff --git a/drivers/net/cxgb4/t4_msg.h b/drivers/net/cxgb4/t4_msg.h
index 623932b39b5d..a550d0c706f3 100644
--- a/drivers/net/cxgb4/t4_msg.h
+++ b/drivers/net/cxgb4/t4_msg.h
@@ -529,6 +529,8 @@ struct cpl_rx_pkt {
529 __be32 l2info; 529 __be32 l2info;
530#define RXF_UDP (1 << 22) 530#define RXF_UDP (1 << 22)
531#define RXF_TCP (1 << 23) 531#define RXF_TCP (1 << 23)
532#define RXF_IP (1 << 24)
533#define RXF_IP6 (1 << 25)
532 __be16 hdr_len; 534 __be16 hdr_len;
533 __be16 err_vec; 535 __be16 err_vec;
534}; 536};