From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Stefan Raspl <raspl@linux.ibm.com>,
Ursula Braun <ubraun@linux.ibm.com>,
Julian Wiedmann <jwi@linux.ibm.com>
Subject: [PATCH net-next 06/15] s390/qeth: fix up protocol headers early
Date: Mon, 17 Sep 2018 17:36:00 +0200 [thread overview]
Message-ID: <20180917153609.94628-7-jwi@linux.ibm.com> (raw)
In-Reply-To: <20180917153609.94628-1-jwi@linux.ibm.com>
When qeth_add_hw_header() falls back to the HW header cache, it also
copies over the necessary protocol headers. Thus any manipulation to
the protocol headers needs to happen before adding the HW header.
For current usage this doesn't matter, but it becomes relevant when
moving TSO transmission over to the faster code path.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_l3_main.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index d4a967077279..0c085f57f7e2 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2056,10 +2056,8 @@ 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) {
+ 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++;
}
@@ -2168,6 +2166,15 @@ static int qeth_l3_get_elements_no_tso(struct qeth_card *card,
return elements;
}
+static void qeth_l3_fixup_headers(struct sk_buff *skb)
+{
+ struct iphdr *iph = ip_hdr(skb);
+
+ /* this is safe, IPv6 traffic takes a different path */
+ if (skb->ip_summed == CHECKSUM_PARTIAL)
+ iph->check = 0;
+}
+
static int qeth_l3_xmit_offload(struct qeth_card *card, struct sk_buff *skb,
struct qeth_qdio_out_q *queue, int ipv,
int cast_type)
@@ -2188,6 +2195,7 @@ static int qeth_l3_xmit_offload(struct qeth_card *card, struct sk_buff *skb,
skb_pull(skb, ETH_HLEN);
frame_len = skb->len;
+ qeth_l3_fixup_headers(skb);
push_len = qeth_add_hw_header(card, skb, &hdr, hw_hdr_len, 0,
&elements);
if (push_len < 0)
--
2.16.4
next prev parent reply other threads:[~2018-09-17 15:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 15:35 [PATCH net-next 00/15] s390/qeth: updates 2018-09-17 Julian Wiedmann
2018-09-17 15:35 ` [PATCH net-next 01/15] s390/qeth: move L2 xmit code to core module Julian Wiedmann
2018-09-17 15:35 ` [PATCH net-next 02/15] s390/qeth: run non-offload L3 traffic over common xmit path Julian Wiedmann
2018-09-17 15:35 ` [PATCH net-next 03/15] s390/qeth: remove unused L3 xmit code Julian Wiedmann
2018-09-17 15:35 ` [PATCH net-next 04/15] s390/qeth: remove qeth_get_elements_no() Julian Wiedmann
2018-09-17 15:35 ` [PATCH net-next 05/15] s390/qeth: limit csum offload erratum to L3 devices Julian Wiedmann
2018-09-17 15:36 ` Julian Wiedmann [this message]
2018-09-17 15:36 ` [PATCH net-next 07/15] s390/qeth: check size of required HW header cache object Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 08/15] s390/qeth: prepare for copy-free TSO transmission Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 09/15] s390/qeth: speed up " Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 10/15] s390/qeth: remove qeth_hdr_chk_and_bounce() Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 11/15] s390/qeth: uninstall IRQ handler on device removal Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 12/15] s390/qeth: invoke softirqs after napi_schedule() Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 13/15] s390/qeth: fix typo in return value Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 14/15] s390/qeth: fine-tune spinlocks Julian Wiedmann
2018-09-17 15:36 ` [PATCH net-next 15/15] s390/qeth: reduce 0-initializing when building IPA cmds Julian Wiedmann
2018-09-17 16:10 ` [PATCH net-next 00/15] s390/qeth: updates 2018-09-17 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=20180917153609.94628-7-jwi@linux.ibm.com \
--to=jwi@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=ubraun@linux.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