Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba5d3c66 authored by Dimitris Michailidis's avatar Dimitris Michailidis Committed by David S. Miller
Browse files

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: default avatarDimitris Michailidis <dm@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63bcceec
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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++;
		}
	} else
		skb->ip_summed = CHECKSUM_NONE;

+2 −0
Original line number Diff line number Diff line
@@ -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;
};