netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc
@ 2011-11-15 12:31 frank.blaschka
  2011-11-15 12:31 ` [patch 1/5] [PATCH] qeth: return with -EPERM if sniffing is not enabled frank.blaschka
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

Hi Dave,

here are a couple of s390 network driver bug fixes for 3.2.0 next rc

shortlog:

Ursula Braun (2)
qeth: return with -EPERM if sniffing is not enabled
netiucv: reinsert dev_alloc_name for device naming

Frank Blaschka (1)
qeth: l3 fix rcu splat in xmit

Christian Borntraeger (1)
qeth: remove WARN_ON leftover

Einar Lueck (1)
qeth: Reduce CPU consumption through less SIGA-r calls

Thanks,
        Frank

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

* [patch 1/5] [PATCH] qeth: return with -EPERM if sniffing is not enabled
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
@ 2011-11-15 12:31 ` frank.blaschka
  2011-11-15 12:31 ` [patch 2/5] [PATCH] qeth: remove WARN_ON leftover frank.blaschka
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun

[-- Attachment #1: 619-qeth-eperm-hs.diff --]
[-- Type: text/plain, Size: 956 bytes --]

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

Without appropriate configuration at the SE, a HiperSockets device
cannot be used for sniffing. Setting the sniffer attribute is rejected
with -EPERM.

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

 drivers/s390/net/qeth_l3_sys.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -urpN linux-2.6/drivers/s390/net/qeth_l3_sys.c linux-2.6-patched/drivers/s390/net/qeth_l3_sys.c
--- linux-2.6/drivers/s390/net/qeth_l3_sys.c	2011-11-14 18:26:56.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/qeth_l3_sys.c	2011-11-14 18:27:16.000000000 +0100
@@ -335,10 +335,10 @@ static ssize_t qeth_l3_dev_sniffer_store
 					QETH_IN_BUF_COUNT_MAX)
 				qeth_realloc_buffer_pool(card,
 					QETH_IN_BUF_COUNT_MAX);
-			break;
 		} else
 			rc = -EPERM;
-	default:   /* fall through */
+		break;
+	default:
 		rc = -EINVAL;
 	}
 out:

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

* [patch 2/5] [PATCH] qeth: remove WARN_ON leftover
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
  2011-11-15 12:31 ` [patch 1/5] [PATCH] qeth: return with -EPERM if sniffing is not enabled frank.blaschka
@ 2011-11-15 12:31 ` frank.blaschka
  2011-11-15 12:31 ` [patch 3/5] [PATCH] netiucv: reinsert dev_alloc_name for device naming frank.blaschka
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Christian Borntraeger

[-- Attachment #1: 620-qeth-warnon.diff --]
[-- Type: text/plain, Size: 1052 bytes --]

From: Christian Borntraeger <borntraeger@de.ibm.com>

The patch "qeth: exploit asynchronous delivery of storage blocks"
added a WARN_ON in qeth_schedule_recovery. A device recovery should
not cause a kernel warning. This is obviously a debugging  left-over
that we forgot to remove.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_core_main.c |    1 -
 1 file changed, 1 deletion(-)

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	2011-11-14 18:26:56.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/qeth_core_main.c	2011-11-14 18:27:17.000000000 +0100
@@ -881,7 +881,6 @@ EXPORT_SYMBOL_GPL(qeth_do_run_thread);
 void qeth_schedule_recovery(struct qeth_card *card)
 {
 	QETH_CARD_TEXT(card, 2, "startrec");
-	WARN_ON(1);
 	if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)
 		schedule_work(&card->kernel_thread_starter);
 }

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

* [patch 3/5] [PATCH] netiucv: reinsert dev_alloc_name for device naming
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
  2011-11-15 12:31 ` [patch 1/5] [PATCH] qeth: return with -EPERM if sniffing is not enabled frank.blaschka
  2011-11-15 12:31 ` [patch 2/5] [PATCH] qeth: remove WARN_ON leftover frank.blaschka
@ 2011-11-15 12:31 ` frank.blaschka
  2011-11-15 12:31 ` [patch 4/5] [PATCH] qeth: l3 fix rcu splat in xmit frank.blaschka
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun

[-- Attachment #1: 621-netiucv-dev-alloc-name.diff --]
[-- Type: text/plain, Size: 957 bytes --]

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

Invocation of dev_alloc_name() is re-inserted, because the created
net_device name is used to create the device name for the iucv bus.
This device is created before the register_netdev call.

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

 drivers/s390/net/netiucv.c |    2 ++
 1 file changed, 2 insertions(+)

diff -urpN linux-2.6/drivers/s390/net/netiucv.c linux-2.6-patched/drivers/s390/net/netiucv.c
--- linux-2.6/drivers/s390/net/netiucv.c	2011-10-24 09:10:05.000000000 +0200
+++ linux-2.6-patched/drivers/s390/net/netiucv.c	2011-11-14 18:27:17.000000000 +0100
@@ -1994,6 +1994,8 @@ static struct net_device *netiucv_init_n
 			   netiucv_setup_netdevice);
 	if (!dev)
 		return NULL;
+	if (dev_alloc_name(dev, dev->name) < 0)
+		goto out_netdev;
 
 	privptr = netdev_priv(dev);
 	privptr->fsm = init_fsm("netiucvdev", dev_state_names,

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

* [patch 4/5] [PATCH] qeth: l3 fix rcu splat in xmit
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
                   ` (2 preceding siblings ...)
  2011-11-15 12:31 ` [patch 3/5] [PATCH] netiucv: reinsert dev_alloc_name for device naming frank.blaschka
@ 2011-11-15 12:31 ` frank.blaschka
  2011-11-15 12:31 ` [patch 5/5] [PATCH] qeth: Reduce CPU consumption through less SIGA-r calls frank.blaschka
  2011-11-16 22:47 ` [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

[-- Attachment #1: 622-qeth-rcu-xmit-splat.diff --]
[-- Type: text/plain, Size: 2689 bytes --]

From: Frank Blaschka <frank.blaschka@de.ibm.com>

when use dst_get_neighbour to get neighbour, we need
rcu_read_lock to protect, since dst_get_neighbour uses
rcu_dereference.

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
include/net/dst.h:91 invoked rcu_dereference_check() without protection!
   ...
Call Trace:
([<0000000000011ad8>] show_trace+0x158/0x15c)
 [<00000000003c395a>] qeth_l3_hard_start_xmit+0x212/0xb2c
 [<00000000004006ac>] dev_hard_start_xmit+0x444/0x9bc
 [<000000000041effa>] sch_direct_xmit+0xd2/0x328
 [<000000000041f32a>] __qdisc_run+0xda/0x198
 [<00000000003f84b6>] net_tx_action+0x152/0x360
 [<000000000005798e>] __do_softirq+0xee/0x3b0
 [<0000000000021330>] do_softirq+0xac/0x100
([<00000000000212f2>] do_softirq+0x6e/0x100)
 [<0000000000057142>] local_bh_enable_ip+0x11a/0x120
 [<000000000043ff50>] tcp_sendmsg+0x21c/0xe08
 [<00000000003dfcdc>] sock_sendmsg+0xc8/0x100
 [<00000000003e3d98>] SyS_sendto+0x108/0x140
 [<00000000003e3e1c>] SyS_send+0x4c/0x5c
 [<00000000003e4b62>] SyS_socketcall+0x206/0x348
 [<00000000004e95ca>] sysc_noemu+0x16/0x1c
 [<0000004a2a87dbb0>] 0x4a2a87dbb0
INFO: lockdep is turned off.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_l3_main.c |    7 +++++++
 1 file changed, 7 insertions(+)

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	2011-11-14 18:26:56.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/qeth_l3_main.c	2011-11-14 18:27:18.000000000 +0100
@@ -2756,11 +2756,13 @@ int inline qeth_l3_get_cast_type(struct
 	struct neighbour *n = NULL;
 	struct dst_entry *dst;
 
+	rcu_read_lock();
 	dst = skb_dst(skb);
 	if (dst)
 		n = dst_get_neighbour(dst);
 	if (n) {
 		cast_type = n->type;
+		rcu_read_unlock();
 		if ((cast_type == RTN_BROADCAST) ||
 		    (cast_type == RTN_MULTICAST) ||
 		    (cast_type == RTN_ANYCAST))
@@ -2768,6 +2770,8 @@ int inline qeth_l3_get_cast_type(struct
 		else
 			return RTN_UNSPEC;
 	}
+	rcu_read_unlock();
+
 	/* try something else */
 	if (skb->protocol == ETH_P_IPV6)
 		return (skb_network_header(skb)[24] == 0xff) ?
@@ -2847,6 +2851,8 @@ static void qeth_l3_fill_header(struct q
 	}
 
 	hdr->hdr.l3.length = skb->len - sizeof(struct qeth_hdr);
+
+	rcu_read_lock();
 	dst = skb_dst(skb);
 	if (dst)
 		n = dst_get_neighbour(dst);
@@ -2893,6 +2899,7 @@ static void qeth_l3_fill_header(struct q
 				QETH_CAST_UNICAST | QETH_HDR_PASSTHRU;
 		}
 	}
+	rcu_read_unlock();
 }
 
 static inline void qeth_l3_hdr_csum(struct qeth_card *card,

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

* [patch 5/5] [PATCH] qeth: Reduce CPU consumption through less SIGA-r calls
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
                   ` (3 preceding siblings ...)
  2011-11-15 12:31 ` [patch 4/5] [PATCH] qeth: l3 fix rcu splat in xmit frank.blaschka
@ 2011-11-15 12:31 ` frank.blaschka
  2011-11-16 22:47 ` [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: frank.blaschka @ 2011-11-15 12:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Einar Lueck

[-- Attachment #1: 623-qeth-reduce-siga.diff --]
[-- Type: text/plain, Size: 1166 bytes --]

From: Einar Lueck <elelueck@de.ibm.com>

Patch avoids SIGA-r calls in case of SIGA-r required. It only calls
SIGA-r if a threshold of free buffer is reached. CPU consumption is
reduced as a consequence.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_core.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -urpN linux-2.6/drivers/s390/net/qeth_core.h linux-2.6-patched/drivers/s390/net/qeth_core.h
--- linux-2.6/drivers/s390/net/qeth_core.h	2011-11-14 18:26:56.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/qeth_core.h	2011-11-14 18:27:18.000000000 +0100
@@ -236,8 +236,7 @@ static inline int qeth_is_ipa_enabled(st
 #define QETH_IN_BUF_COUNT_MAX 128
 #define QETH_MAX_BUFFER_ELEMENTS(card) ((card)->qdio.in_buf_size >> 12)
 #define QETH_IN_BUF_REQUEUE_THRESHOLD(card) \
-		((card)->ssqd.qdioac1 & AC1_SIGA_INPUT_NEEDED ? 1 : \
-		 ((card)->qdio.in_buf_pool.buf_count / 2))
+		 ((card)->qdio.in_buf_pool.buf_count / 2)
 
 /* buffers we have to be behind before we get a PCI */
 #define QETH_PCI_THRESHOLD_A(card) ((card)->qdio.in_buf_pool.buf_count+1)

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

* Re: [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc
  2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
                   ` (4 preceding siblings ...)
  2011-11-15 12:31 ` [patch 5/5] [PATCH] qeth: Reduce CPU consumption through less SIGA-r calls frank.blaschka
@ 2011-11-16 22:47 ` David Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-11-16 22:47 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390

From: frank.blaschka@de.ibm.com
Date: Tue, 15 Nov 2011 13:31:11 +0100

> here are a couple of s390 network driver bug fixes for 3.2.0 next rc

All applied, thanks.

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

end of thread, other threads:[~2011-11-16 22:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 12:31 [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc frank.blaschka
2011-11-15 12:31 ` [patch 1/5] [PATCH] qeth: return with -EPERM if sniffing is not enabled frank.blaschka
2011-11-15 12:31 ` [patch 2/5] [PATCH] qeth: remove WARN_ON leftover frank.blaschka
2011-11-15 12:31 ` [patch 3/5] [PATCH] netiucv: reinsert dev_alloc_name for device naming frank.blaschka
2011-11-15 12:31 ` [patch 4/5] [PATCH] qeth: l3 fix rcu splat in xmit frank.blaschka
2011-11-15 12:31 ` [patch 5/5] [PATCH] qeth: Reduce CPU consumption through less SIGA-r calls frank.blaschka
2011-11-16 22:47 ` [patch 0/5] s390: network driver bug fixes for 3.2.0 next rc David Miller

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).