netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 4/5] [PATCH] qeth: omit upstream checksumming for HiperSockets
Date: Wed, 20 May 2009 09:38:40 +0200	[thread overview]
Message-ID: <20090520073928.073471000@de.ibm.com> (raw)
In-Reply-To: 20090520073836.897878000@de.ibm.com

[-- Attachment #1: 615-qeth-checksum-hipersocket.diff --]
[-- Type: text/plain, Size: 2392 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

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: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_core_main.c |    2 ++
 drivers/s390/net/qeth_l3_main.c   |   20 +++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff -urpN linux-2.6/drivers/s390/net/qeth_core_main.c linux-2.6-patched/drivers/s390/net/qeth_core_main.c
--- linux-2.6/drivers/s390/net/qeth_core_main.c	2009-05-20 08:56:25.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/qeth_core_main.c	2009-05-20 08:56:43.000000000 +0200
@@ -1140,6 +1140,8 @@ static int qeth_setup_card(struct qeth_c
 	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;
diff -urpN linux-2.6/drivers/s390/net/qeth_l3_main.c linux-2.6-patched/drivers/s390/net/qeth_l3_main.c
--- linux-2.6/drivers/s390/net/qeth_l3_main.c	2009-05-20 08:56:42.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/qeth_l3_main.c	2009-05-20 08:56:43.000000000 +0200
@@ -1920,16 +1920,22 @@ static inline __u16 qeth_l3_rebuild_skb(
 		 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)) ==
-		     (QETH_HDR_EXT_CSUM_HDR_REQ |
-		      QETH_HDR_EXT_CSUM_TRANSP_REQ))
+		    (QETH_HDR_EXT_CSUM_HDR_REQ |
+		     QETH_HDR_EXT_CSUM_TRANSP_REQ)) ==
+		    (QETH_HDR_EXT_CSUM_HDR_REQ |
+		     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;


  parent reply	other threads:[~2009-05-20  7:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20  7:38 [patch 0/5] s390: qeth/ctcm patches for 2.6.31 frank.blaschka
2009-05-20  7:38 ` [patch 1/5] [PATCH] qeth: avoid crash after detach of replugged device frank.blaschka
2009-05-20  7:38 ` [patch 2/5] [PATCH] ctcm: avoid crash in ctcm_remove_device frank.blaschka
2009-05-20  7:38 ` [patch 3/5] [PATCH] qeth: support z/VM VSWITCH Port Isolation frank.blaschka
2009-05-20  7:38 ` frank.blaschka [this message]
2009-05-20  7:38 ` [patch 5/5] [PATCH] qeth: Clear SBALF15 in any case for output buffers frank.blaschka
2009-05-21  0:37 ` [patch 0/5] s390: qeth/ctcm patches for 2.6.31 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090520073928.073471000@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ursula.braun@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).