Commit b9139800 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

qeth: omit upstream checksumming for HiperSockets

For HiperSocket devices receive-path checksumming is not required.
Thus NO_CHECKSUMMING is used as default for HiperSocket interfaces.
For layer3 devices configured with NO_CHECKSUMMING received skbs
should have set their ip_summed field to CHECKSUM_UNNECESSARY.
Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0666eb06
......@@ -1140,6 +1140,8 @@ static int qeth_setup_card(struct qeth_card *card)
card->ipato.enabled = 0;
card->ipato.invert4 = 0;
card->ipato.invert6 = 0;
if (card->info.type == QETH_CARD_TYPE_IQD)
card->options.checksum_type = NO_CHECKSUMMING;
/* init QDIO stuff */
qeth_init_qdio_info(card);
return 0;
......
......@@ -1920,8 +1920,14 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card,
hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]);
}
skb->ip_summed = card->options.checksum_type;
if (card->options.checksum_type == HW_CHECKSUMMING) {
switch (card->options.checksum_type) {
case SW_CHECKSUMMING:
skb->ip_summed = CHECKSUM_NONE;
break;
case NO_CHECKSUMMING:
skb->ip_summed = CHECKSUM_UNNECESSARY;
break;
case HW_CHECKSUMMING:
if ((hdr->hdr.l3.ext_flags &
(QETH_HDR_EXT_CSUM_HDR_REQ |
QETH_HDR_EXT_CSUM_TRANSP_REQ)) ==
......@@ -1929,7 +1935,7 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card,
QETH_HDR_EXT_CSUM_TRANSP_REQ))
skb->ip_summed = CHECKSUM_UNNECESSARY;
else
skb->ip_summed = SW_CHECKSUMMING;
skb->ip_summed = CHECKSUM_NONE;
}
return vlan_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment