diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2015-12-11 12:27:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-14 16:16:45 -0500 |
commit | 577777359e1f47d0cb7dfc23aac0da867a14af00 (patch) | |
tree | 10a408827ce0e5509fd20d7f4062d2a6b092a483 /drivers/s390/net | |
parent | e5ebe63214d44d4dcf43df02edf3613e04d671b9 (diff) | |
download | op-kernel-dev-577777359e1f47d0cb7dfc23aac0da867a14af00.zip op-kernel-dev-577777359e1f47d0cb7dfc23aac0da867a14af00.tar.gz |
qeth: repair SBAL elements calculation
When sending skbs, qeth determines the number of qdio SBAL elements
required. If qeth sends a fragmented skb, the SBAL element number
calculation is wrong, because the fragmented data part is added
twice in qeth_l3_tso_elements(). This patch makes sure fragmented
data is handled in qeth_elements_for_frags() only, while
qeth_l3_tso_elements() starts calculation of qdio SBAL elements just
with the linear data part of the skb.
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 10d9d3e..7c8c68c 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2797,7 +2797,7 @@ static inline int qeth_l3_tso_elements(struct sk_buff *skb) { unsigned long tcpd = (unsigned long)tcp_hdr(skb) + tcp_hdr(skb)->doff * 4; - int tcpd_len = skb->len - (tcpd - (unsigned long)skb->data); + int tcpd_len = skb_headlen(skb) - (tcpd - (unsigned long)skb->data); int elements = PFN_UP(tcpd + tcpd_len - 1) - PFN_DOWN(tcpd); elements += qeth_get_elements_for_frags(skb); |