diff options
-rw-r--r-- | drivers/net/cxgb4/sge.c | 7 | ||||
-rw-r--r-- | 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 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 | }; |