All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] s390 network patches
@ 2015-12-11 11:27 Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 1/8] iucv: prevent information leak in iucv_message Ursula Braun
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

Hi Dave,

here are some s390 related patches for net-next. Most important is
the skb_linearize af_iucv patch from Eugene solving traffic problems
in certain scenarios. The remaining patches are minor improvements.

Thanks, Ursula

Eugene Crosser (2):
  iucv: prevent information leak in iucv_message
  iucv: call skb_linearize() when needed

Markus Elfring (1):
  s390-ctcm: Delete unnecessary checks before the function call
    "channel_remove"

Rasmus Villemoes (1):
  qeth: get rid of redundant 0-termination

Thomas Richter (1):
  qeth use common function qeth_get_setassparms_cmd

Ursula Braun (3):
  MAINTAINERS: switch to alternate IBM mail address
  qeth: initialize net_device with carrier off
  qeth: repair SBAL elements calculation

 MAINTAINERS                       |  4 ++--
 drivers/s390/net/ctcm_main.c      |  7 ++-----
 drivers/s390/net/qeth_core.h      |  4 ++++
 drivers/s390/net/qeth_core_main.c | 11 +++++------
 drivers/s390/net/qeth_l2_main.c   |  1 +
 drivers/s390/net/qeth_l3_main.c   | 40 ++++++++++-----------------------------
 net/iucv/af_iucv.c                | 22 +++++++++++++++------
 7 files changed, 40 insertions(+), 49 deletions(-)

-- 
2.3.9

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net-next 1/8] iucv: prevent information leak in iucv_message
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 2/8] iucv: call skb_linearize() when needed Ursula Braun
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

From: Eugene Crosser <Eugene.Crosser@ru.ibm.com>

Initialize storage for the future IUCV header that will be included
in the transmitted packet. Some of the header fields are unused with
HiperSockets transport, and will contain data left from some other
functions.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
---
 net/iucv/af_iucv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 3ea4c98..5bc473b 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1031,7 +1031,7 @@ static int iucv_sock_sendmsg(struct socket *sock, struct msghdr *msg,
 	struct sock *sk = sock->sk;
 	struct iucv_sock *iucv = iucv_sk(sk);
 	struct sk_buff *skb;
-	struct iucv_message txmsg;
+	struct iucv_message txmsg = {0};
 	struct cmsghdr *cmsg;
 	int cmsg_done;
 	long timeo;
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 2/8] iucv: call skb_linearize() when needed
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 1/8] iucv: prevent information leak in iucv_message Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 3/8] MAINTAINERS: switch to alternate IBM mail address Ursula Braun
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

From: Eugene Crosser <Eugene.Crosser@ru.ibm.com>

When the linear buffer of the received sk_buff is shorter than
the header, use skb_linearize(). sk_buffs with short linear buffer
happen on the sending side under high traffic, and some kernel
configurations, when allocated buffer starts just before page
boundary, and IUCV transport has to send it as two separate QDIO
buffer elements, with fist element shorter than the header.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 net/iucv/af_iucv.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 5bc473b..ef50a94 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -2084,11 +2084,7 @@ static int afiucv_hs_callback_rx(struct sock *sk, struct sk_buff *skb)
 		return NET_RX_SUCCESS;
 	}
 
-		/* write stuff from iucv_msg to skb cb */
-	if (skb->len < sizeof(struct af_iucv_trans_hdr)) {
-		kfree_skb(skb);
-		return NET_RX_SUCCESS;
-	}
+	/* write stuff from iucv_msg to skb cb */
 	skb_pull(skb, sizeof(struct af_iucv_trans_hdr));
 	skb_reset_transport_header(skb);
 	skb_reset_network_header(skb);
@@ -2119,6 +2115,20 @@ static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,
 	char nullstring[8];
 	int err = 0;
 
+	if (skb->len < (ETH_HLEN + sizeof(struct af_iucv_trans_hdr))) {
+		WARN_ONCE(1, "AF_IUCV too short skb, len=%d, min=%d",
+			  (int)skb->len,
+			  (int)(ETH_HLEN + sizeof(struct af_iucv_trans_hdr)));
+		kfree_skb(skb);
+		return NET_RX_SUCCESS;
+	}
+	if (skb_headlen(skb) < (ETH_HLEN + sizeof(struct af_iucv_trans_hdr)))
+		if (skb_linearize(skb)) {
+			WARN_ONCE(1, "AF_IUCV skb_linearize failed, len=%d",
+				  (int)skb->len);
+			kfree_skb(skb);
+			return NET_RX_SUCCESS;
+		}
 	skb_pull(skb, ETH_HLEN);
 	trans_hdr = (struct af_iucv_trans_hdr *)skb->data;
 	EBCASC(trans_hdr->destAppName, sizeof(trans_hdr->destAppName));
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 3/8] MAINTAINERS: switch to alternate IBM mail address
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 1/8] iucv: prevent information leak in iucv_message Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 2/8] iucv: call skb_linearize() when needed Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 4/8] s390-ctcm: Delete unnecessary checks before the function call "channel_remove" Ursula Braun
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8eba565..ab79736 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9125,7 +9125,7 @@ F:	drivers/s390/block/dasd*
 F:	block/partitions/ibm.c
 
 S390 NETWORK DRIVERS
-M:	Ursula Braun <ursula.braun@de.ibm.com>
+M:	Ursula Braun <ubraun@linux.vnet.ibm.com>
 L:	linux-s390@vger.kernel.org
 W:	http://www.ibm.com/developerworks/linux/linux390/
 S:	Supported
@@ -9155,7 +9155,7 @@ S:	Supported
 F:	drivers/s390/scsi/zfcp_*
 
 S390 IUCV NETWORK LAYER
-M:	Ursula Braun <ursula.braun@de.ibm.com>
+M:	Ursula Braun <ubraun@linux.vnet.ibm.com>
 L:	linux-s390@vger.kernel.org
 W:	http://www.ibm.com/developerworks/linux/linux390/
 S:	Supported
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 4/8] s390-ctcm: Delete unnecessary checks before the function call "channel_remove"
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (2 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 3/8] MAINTAINERS: switch to alternate IBM mail address Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 5/8] qeth use common function qeth_get_setassparms_cmd Ursula Braun
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

From: Markus Elfring <elfring@users.sourceforge.net>

The channel_remove() function tests whether its argument is NULL
and then returns immediately. Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 drivers/s390/net/ctcm_main.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 05c37d6..c3e2252 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1677,11 +1677,8 @@ static int ctcm_shutdown_device(struct ccwgroup_device *cgdev)
 
 	ccw_device_set_offline(cgdev->cdev[1]);
 	ccw_device_set_offline(cgdev->cdev[0]);
-
-	if (priv->channel[CTCM_READ])
-		channel_remove(priv->channel[CTCM_READ]);
-	if (priv->channel[CTCM_WRITE])
-		channel_remove(priv->channel[CTCM_WRITE]);
+	channel_remove(priv->channel[CTCM_READ]);
+	channel_remove(priv->channel[CTCM_WRITE]);
 	priv->channel[CTCM_READ] = priv->channel[CTCM_WRITE] = NULL;
 
 	return 0;
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 5/8] qeth use common function qeth_get_setassparms_cmd
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (3 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 4/8] s390-ctcm: Delete unnecessary checks before the function call "channel_remove" Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 6/8] qeth: initialize net_device with carrier off Ursula Braun
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

From: Thomas Richter <tmricht@linux.vnet.ibm.com>

There have been 2 identical versions of function
qeth_get_setassparms_cmd() for layer 2 and layer 3.
Remove the layer 3 function qeth_l3_get_setassparms_cmd()
and call the common one named qeth_get_setassparms_cmd()
located in qeth_core_main.c

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
---
 drivers/s390/net/qeth_core.h      |  4 ++++
 drivers/s390/net/qeth_core_main.c |  9 +++++----
 drivers/s390/net/qeth_l3_main.c   | 37 ++++++++-----------------------------
 3 files changed, 17 insertions(+), 33 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 1766a20..ec2e014 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -981,6 +981,10 @@ int qeth_send_setassparms(struct qeth_card *, struct qeth_cmd_buffer *, __u16,
 			  int (*reply_cb)(struct qeth_card *,
 					  struct qeth_reply *, unsigned long),
 			  void *);
+struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *,
+						 enum qeth_ipa_funcs,
+						 __u16, __u16,
+						 enum qeth_prot_versions);
 int qeth_start_ipa_tx_checksum(struct qeth_card *);
 int qeth_set_rx_csum(struct qeth_card *, int);
 
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 31ac53f..fe1845a 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -5297,10 +5297,10 @@ static int qeth_setassparms_cb(struct qeth_card *card,
 	return 0;
 }
 
-static struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
-						  enum qeth_ipa_funcs ipa_func,
-						  __u16 cmd_code, __u16 len,
-						  enum qeth_prot_versions prot)
+struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
+						 enum qeth_ipa_funcs ipa_func,
+						 __u16 cmd_code, __u16 len,
+						 enum qeth_prot_versions prot)
 {
 	struct qeth_cmd_buffer *iob;
 	struct qeth_ipa_cmd *cmd;
@@ -5319,6 +5319,7 @@ static struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
 
 	return iob;
 }
+EXPORT_SYMBOL_GPL(qeth_get_setassparms_cmd);
 
 int qeth_send_setassparms(struct qeth_card *card,
 			  struct qeth_cmd_buffer *iob, __u16 len, long data,
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 543960e..e2eb88c 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1043,28 +1043,6 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
 	return 0;
 }
 
-static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd(
-	struct qeth_card *card, enum qeth_ipa_funcs ipa_func, __u16 cmd_code,
-	__u16 len, enum qeth_prot_versions prot)
-{
-	struct qeth_cmd_buffer *iob;
-	struct qeth_ipa_cmd *cmd;
-
-	QETH_CARD_TEXT(card, 4, "getasscm");
-	iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot);
-
-	if (iob) {
-		cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
-		cmd->data.setassparms.hdr.assist_no = ipa_func;
-		cmd->data.setassparms.hdr.length = 8 + len;
-		cmd->data.setassparms.hdr.command_code = cmd_code;
-		cmd->data.setassparms.hdr.return_code = 0;
-		cmd->data.setassparms.hdr.seq_no = 0;
-	}
-
-	return iob;
-}
-
 #ifdef CONFIG_QETH_IPV6
 static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
 		enum qeth_ipa_funcs ipa_func, __u16 cmd_code)
@@ -1073,7 +1051,7 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
 	struct qeth_cmd_buffer *iob;
 
 	QETH_CARD_TEXT(card, 4, "simassp6");
-	iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
+	iob = qeth_get_setassparms_cmd(card, ipa_func, cmd_code,
 				       0, QETH_PROT_IPV6);
 	if (!iob)
 		return -ENOMEM;
@@ -2344,10 +2322,11 @@ static int qeth_l3_query_arp_cache_info(struct qeth_card *card,
 
 	QETH_CARD_TEXT_(card, 3, "qarpipv%i", prot);
 
-	iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
-			IPA_CMD_ASS_ARP_QUERY_INFO,
-			sizeof(struct qeth_arp_query_data) - sizeof(char),
-			prot);
+	iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
+				       IPA_CMD_ASS_ARP_QUERY_INFO,
+				       sizeof(struct qeth_arp_query_data)
+						- sizeof(char),
+				       prot);
 	if (!iob)
 		return -ENOMEM;
 	cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
@@ -2439,7 +2418,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
 		return -EOPNOTSUPP;
 	}
 
-	iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
+	iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
 				       IPA_CMD_ASS_ARP_ADD_ENTRY,
 				       sizeof(struct qeth_arp_cache_entry),
 				       QETH_PROT_IPV4);
@@ -2480,7 +2459,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
 		return -EOPNOTSUPP;
 	}
 	memcpy(buf, entry, 12);
-	iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
+	iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
 				       IPA_CMD_ASS_ARP_REMOVE_ENTRY,
 				       12,
 				       QETH_PROT_IPV4);
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 6/8] qeth: initialize net_device with carrier off
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (4 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 5/8] qeth use common function qeth_get_setassparms_cmd Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 7/8] qeth: repair SBAL elements calculation Ursula Braun
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

/sys/class/net/<interface>/operstate for an active qeth network
interface offen shows "unknown", which translates to "state UNKNOWN
in output of "ip link show". It is caused by a missing initialization
of the __LINK_STATE_NOCARRIER bit in the net_device state field.
This patch adds a netif_carrier_off() invocation when creating the
net_device for a qeth device.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reference-ID: Bugzilla 133209
---
 drivers/s390/net/qeth_l2_main.c | 1 +
 drivers/s390/net/qeth_l3_main.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 8f1b091..80b1979 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1126,6 +1126,7 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
 	qeth_l2_request_initial_mac(card);
 	SET_NETDEV_DEV(card->dev, &card->gdev->dev);
 	netif_napi_add(card->dev, &card->napi, qeth_l2_poll, QETH_NAPI_WEIGHT);
+	netif_carrier_off(card->dev);
 	return register_netdev(card->dev);
 }
 
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index e2eb88c..10d9d3e 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3199,6 +3199,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
 
 	SET_NETDEV_DEV(card->dev, &card->gdev->dev);
 	netif_napi_add(card->dev, &card->napi, qeth_l3_poll, QETH_NAPI_WEIGHT);
+	netif_carrier_off(card->dev);
 	return register_netdev(card->dev);
 }
 
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 7/8] qeth: repair SBAL elements calculation
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (5 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 6/8] qeth: initialize net_device with carrier off Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-11 11:27 ` [PATCH net-next 8/8] qeth: get rid of redundant 0-termination Ursula Braun
  2015-12-14 21:17 ` [PATCH net-next 0/8] s390 network patches David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

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>
---
 drivers/s390/net/qeth_l3_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 8/8] qeth: get rid of redundant 0-termination
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (6 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 7/8] qeth: repair SBAL elements calculation Ursula Braun
@ 2015-12-11 11:27 ` Ursula Braun
  2015-12-14 21:17 ` [PATCH net-next 0/8] s390 network patches David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2015-12-11 11:27 UTC (permalink / raw)
  To: davem, mschwid2, heicars2, netdev, linux-s390; +Cc: ubraunu

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>

0-termination is redundant, since sprintf has done that.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index fe1845a..7871537 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2684,8 +2684,6 @@ void qeth_print_status_message(struct qeth_card *card)
 			sprintf(card->info.mcl_level, "%02x%02x",
 				card->info.mcl_level[2],
 				card->info.mcl_level[3]);
-
-			card->info.mcl_level[QETH_MCL_LENGTH] = 0;
 			break;
 		}
 		/* fallthrough */
-- 
2.3.9

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next 0/8] s390 network patches
  2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
                   ` (7 preceding siblings ...)
  2015-12-11 11:27 ` [PATCH net-next 8/8] qeth: get rid of redundant 0-termination Ursula Braun
@ 2015-12-14 21:17 ` David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2015-12-14 21:17 UTC (permalink / raw)
  To: ubraun; +Cc: mschwid2, heicars2, netdev, linux-s390, ubraunu

From: Ursula Braun <ubraun@linux.vnet.ibm.com>
Date: Fri, 11 Dec 2015 12:27:49 +0100

> here are some s390 related patches for net-next. Most important is
> the skb_linearize af_iucv patch from Eugene solving traffic problems
> in certain scenarios. The remaining patches are minor improvements.

Series applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-12-14 21:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 11:27 [PATCH net-next 0/8] s390 network patches Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 1/8] iucv: prevent information leak in iucv_message Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 2/8] iucv: call skb_linearize() when needed Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 3/8] MAINTAINERS: switch to alternate IBM mail address Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 4/8] s390-ctcm: Delete unnecessary checks before the function call "channel_remove" Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 5/8] qeth use common function qeth_get_setassparms_cmd Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 6/8] qeth: initialize net_device with carrier off Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 7/8] qeth: repair SBAL elements calculation Ursula Braun
2015-12-11 11:27 ` [PATCH net-next 8/8] qeth: get rid of redundant 0-termination Ursula Braun
2015-12-14 21:17 ` [PATCH net-next 0/8] s390 network patches David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.