Skip to contentSkip to conversation

s390: qeth patches for 2.6.32

PATCH In review [email protected] 4 participants 9 messages Aug 26, 2009 – Aug 27, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover s390: qeth patches for 2.6.32

Hi Dave,

here are a couple of qeth patches for 2.6.32 (net-next).

shortlog:
Klaus-Dieter Wacker (3)
qeth: HiperSockets SIGA retry support on CC=2.
qeth: Cleanup for cast-type determination.
qeth: display service_level info only when valid.

Ursula Braun (1)
qeth: display "undefined" value of sysfs-attribute "layer2"

Frank Blaschka (1)
qeth: scheduling while atomic during ifconfig online sequence

Thanks,
Frank

#1 lore raw

PATCH 1/5 qeth: HiperSockets SIGA retry support on CC=2.

From: Klaus-Dieter Wacker <[email protected]>

Qeth HiperSockets support now retries sending of packets when the IBM System z signals a temporary resource shortage (e.g. target buffer full). The packet is enqueued into the device queue. After 3 times of unsuccessful send the packet is dropped.

---

 drivers/s390/net/qeth_core.h      |    9 +++++
 drivers/s390/net/qeth_core_main.c |   60 ++++++++++++++++++++++++++++++++------
 2 files changed, 61 insertions(+), 8 deletions(-)
drivers/s390/net/qeth_core.h +9 -0
Index: git_net-next/drivers/s390/net/qeth_core.h
===================================================================
@@ -435,6 +435,7 @@ struct qeth_qdio_out_q {
 	 * index of buffer to be filled by driver; state EMPTY or PACKING
 	 */
 	int next_buf_to_fill;
+	int sync_iqdio_error;
 	/*
 	 * number of buffers that are currently filled (PRIMED)
 	 * -> these buffers are hardware-owned
@@ -685,6 +686,14 @@ struct qeth_mc_mac {
 	int is_vmac;
 };
 
+struct qeth_skb_data {
+	__u32 magic;
+	int count;
+};
+
+#define QETH_SKB_MAGIC 0x71657468
+#define QETH_SIGA_CC2_RETRIES 3
+
 struct qeth_card {
 	struct list_head list;
 	enum qeth_card_states state;
drivers/s390/net/qeth_core_main.c +52 -8

122 lines not on this page · raw message

#2 lore raw

Re: [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2.

Quoted 4 lines · On Wed, Aug 26, 2009 at 02:01:06PM +0200, [email protected] wrote:

Qeth HiperSockets support now retries sending of packets when the IBM System z signals a temporary resource shortage (e.g. target buffer full). The packet is enqueued into the device queue. After 3 times of unsuccessful send the packet is dropped.

What is the reason for that? How large is the timeout for each retry? Usually the upper layers should already handle dropped packages fine and adding another retry below can produce retry multiplication.

drivers/s390/net/qeth_core_main.c int qeth_do_send_packet_fast(struct qeth · line 3206

Quoted 5 lines
drivers/s390/net/qeth_core_main.c +1 -0
@@ -3178,6 +3203,25 @@ int qeth_do_send_packet_fast(struct qeth
 	atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
 	qeth_fill_buffer(queue, buffer, skb, hdr, offset, hd_len);
 	qeth_flush_buffers(queue, index, 1);
+	if (queue->sync_iqdio_error == 2) {

Is this a magic constant?

Bastian

Signature · 3 lines
... The prejudices people feel about each other disappear when they get
to know each other.
		-- Kirk, "Elaan of Troyius", stardate 4372.5
#3 lore raw

Re: [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2.

Quoted 10 lines · Bastian Blank
Quoted 4 lines · On Wed, Aug 26, 2009 at 02:01:06PM +0200, [email protected] wrote:

Qeth HiperSockets support now retries sending of packets when the IBM System z signals a temporary resource shortage (e.g. target buffer full). The packet is enqueued into the device queue. After 3 times of unsuccessful send the packet is dropped.

What is the reason for that? How large is the timeout for each retry? Usually the upper layers should already handle dropped packages fine and adding another retry below can produce retry multiplication.

HiperSocket is very different from usual network hardware. Microcode can notify the driver the target of an xmit can not receive the packet because of a target buffer full condition (this is the queue->sync_iqdio_error == 2 error code). The buffer full condition is only for the target of the xmit not the senders hardware. There is no timeout for the retry. The retry is more or less immediately. If the target buffer full is only a temporary(short) condition we can stay at a higher throughput level because TCP congestion does not kick in.

Quoted 10 lines

drivers/s390/net/qeth_core_main.c int qeth_do_send_packet_fast(struct qeth · line 3206

Quoted 5 lines
drivers/s390/net/qeth_core_main.c +1 -0
@@ -3178,6 +3203,25 @@ int qeth_do_send_packet_fast(struct qeth
 	atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
 	qeth_fill_buffer(queue, buffer, skb, hdr, offset, hd_len);
 	qeth_flush_buffers(queue, index, 1);
+	if (queue->sync_iqdio_error == 2) {

Is this a magic constant?

Bastian

#4 lore raw

PATCH 2/5 qeth: scheduling while atomic during ifconfig online sequence

In reply to [email protected]

From: Frank Blaschka <[email protected]>

In case the IP address list contains entries (not removed when the device was set offline) this entries should be registered next time the device is brought online. In the past this was done implicitly with the device open call but since we wait in the set IPv4 IPA and the device open common code holds various locks this does not work any longer.

---

 drivers/s390/net/qeth_l3_main.c |    1 +
 1 file changed, 1 insertion(+)
drivers/s390/net/qeth_l3_main.c +1 -0
Index: git_net-next/drivers/s390/net/qeth_l3_main.c
===================================================================
@@ -3180,6 +3180,7 @@ static int __qeth_l3_set_online(struct c
 	netif_carrier_on(card->dev);
 
 	qeth_set_allowed_threads(card, 0xffffffff, 0);
+	qeth_l3_set_ip_addr_list(card);
 	if (recover_flag == CARD_STATE_RECOVER) {
 		if (recovery_mode)
 			qeth_l3_open(card->dev);
#5 lore raw

PATCH 3/5 qeth: Cleanup for cast-type determination.

In reply to [email protected]

From: Klaus-Dieter Wacker <[email protected]>

Clear separation of cast-type determination (send path) for layer-2 resp. layer-3. Allowing to have inline functions for qeth layer- discipline.

---

 drivers/s390/net/qeth_core.h      |    1 
 drivers/s390/net/qeth_core_main.c |   49 --------------------------------------
 drivers/s390/net/qeth_l2_main.c   |   42 ++++++++------------------------
 drivers/s390/net/qeth_l3_main.c   |   47 +++++++++++++++++++++++++++++++++++-
 4 files changed, 57 insertions(+), 82 deletions(-)
drivers/s390/net/qeth_core.h +0 -1
Index: git_net-next/drivers/s390/net/qeth_core.h
===================================================================
@@ -843,7 +843,6 @@ int qeth_default_setadapterparms_cb(stru
 int qeth_send_control_data(struct qeth_card *, int, struct qeth_cmd_buffer *,
 	int (*reply_cb)(struct qeth_card *, struct qeth_reply*, unsigned long),
 	void *reply_param);
-int qeth_get_cast_type(struct qeth_card *, struct sk_buff *);
 int qeth_get_priority_queue(struct qeth_card *, struct sk_buff *, int, int);
 int qeth_get_elements_no(struct qeth_card *, void *, struct sk_buff *, int);
 int qeth_do_send_packet_fast(struct qeth_card *, struct qeth_qdio_out_q *,
drivers/s390/net/qeth_core_main.c +0 -49

55 lines not on this page · raw message

drivers/s390/net/qeth_l2_main.c +11 -31

61 lines not on this page · raw message

drivers/s390/net/qeth_l3_main.c +46 -1

59 lines not on this page · raw message

#6 lore raw

PATCH 4/5 qeth: display service_level info only when valid.

In reply to [email protected]

From: Klaus-Dieter Wacker <[email protected]>

qeth displayed an entry in /proc/service_level even when no valid MCL-string was available (the MCL info is blank). The change is to create an entry in /proc/service_level only when MCL-string is non-zero.

---

 drivers/s390/net/qeth_core_main.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_core_main.c +3 -2
Index: git_net-next/drivers/s390/net/qeth_core_main.c
===================================================================
@@ -1160,8 +1160,9 @@ static void qeth_core_sl_print(struct se
 {
 	struct qeth_card *card = container_of(slr, struct qeth_card,
 					qeth_service_level);
-	seq_printf(m, "qeth: %s firmware level %s\n", CARD_BUS_ID(card),
-			card->info.mcl_level);
+	if (card->info.mcl_level[0])
+		seq_printf(m, "qeth: %s firmware level %s\n",
+			CARD_BUS_ID(card), card->info.mcl_level);
 }
 
 static struct qeth_card *qeth_alloc_card(void)
#7 lore raw

PATCH 5/5 qeth: display "undefined" value of sysfs-attribute "layer2"

In reply to [email protected]

From: Ursula Braun <[email protected]>

If nothing has been written into the qeth sysfs-attribute layer2, its value is "-1" meaning "not yet defined". But the value is displayed as "1" meaning "layer2 selected". The patch changes the reading of this "-1"-value to "-1" to make clear the layer2-attribute has not yet been defined.

---

 drivers/s390/net/qeth_core_sys.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/net/qeth_core_sys.c +1 -1
Index: git_net-next/drivers/s390/net/qeth_core_sys.c
===================================================================
@@ -364,7 +364,7 @@ static ssize_t qeth_dev_layer2_show(stru
 	if (!card)
 		return -EINVAL;
 
-	return sprintf(buf, "%i\n", card->options.layer2 ? 1:0);
+	return sprintf(buf, "%i\n", card->options.layer2);
 }
 
 static ssize_t qeth_dev_layer2_store(struct device *dev,
maintainer
#8 lore raw
In reply to [email protected]

From: [email protected]
Date: Wed, 26 Aug 2009 14:01:05 +0200

Quoted 8 lines

here are a couple of qeth patches for 2.6.32 (net-next).

shortlog:
Klaus-Dieter Wacker (3)
qeth: HiperSockets SIGA retry support on CC=2.
qeth: Cleanup for cast-type determination.
qeth: display service_level info only when valid.

Quoted 5 lines

Ursula Braun (1)
qeth: display "undefined" value of sysfs-attribute "layer2"

Frank Blaschka (1)
qeth: scheduling while atomic during ifconfig online sequence

Looks good, all applied to net-next-2.6, thanks!