Commit f231dc9d authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller
Browse files

s390/qeth: limit csum offload erratum to L3 devices



Combined L3+L4 csum offload is only required for some L3 HW. So for
L2 devices, don't offload the IP header csum calculation.

Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reference-ID: JUP 394553
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 40e6a225
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -892,11 +892,6 @@ static inline void qeth_tx_csum(struct sk_buff *skb, u8 *flags, int ipv)
	if ((ipv == 4 && ip_hdr(skb)->protocol == IPPROTO_UDP) ||
	    (ipv == 6 && ipv6_hdr(skb)->nexthdr == IPPROTO_UDP))
		*flags |= QETH_HDR_EXT_UDP;
	if (ipv == 4) {
		/* some HW requires combined L3+L4 csum offload: */
		*flags |= QETH_HDR_EXT_CSUM_HDR_REQ;
		ip_hdr(skb)->check = 0;
	}
}

static inline void qeth_put_buffer_pool_entry(struct qeth_card *card,
+5 −0
Original line number Diff line number Diff line
@@ -2055,6 +2055,11 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,

	if (!skb_is_gso(skb) && skb->ip_summed == CHECKSUM_PARTIAL) {
		qeth_tx_csum(skb, &hdr->hdr.l3.ext_flags, ipv);
		/* some HW requires combined L3+L4 csum offload: */
		if (ipv == 4) {
			hdr->hdr.l3.ext_flags |= QETH_HDR_EXT_CSUM_HDR_REQ;
			ip_hdr(skb)->check = 0;
		}
		if (card->options.performance_stats)
			card->perf_stats.tx_csum++;
	}