* [patch 0/5] s390: qeth patches for 2.6.32
@ 2009-08-26 12:01 frank.blaschka
2009-08-26 12:01 ` [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2 frank.blaschka
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2.
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
@ 2009-08-26 12:01 ` frank.blaschka
2009-08-27 7:05 ` Bastian Blank
2009-08-26 12:01 ` [patch 2/5] [PATCH] qeth: scheduling while atomic during ifconfig online sequence frank.blaschka
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Klaus-Dieter Wacker
[-- Attachment #1: 605-hipersockets-SIGA-retry.diff --]
[-- Type: text/plain, Size: 5778 bytes --]
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
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.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
---
drivers/s390/net/qeth_core.h | 9 +++++
drivers/s390/net/qeth_core_main.c | 60 ++++++++++++++++++++++++++++++++------
2 files changed, 61 insertions(+), 8 deletions(-)
Index: git_net-next/drivers/s390/net/qeth_core.h
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core.h
+++ 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;
Index: git_net-next/drivers/s390/net/qeth_core_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core_main.c
+++ git_net-next/drivers/s390/net/qeth_core_main.c
@@ -927,8 +927,8 @@ out:
return;
}
-static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
- struct qeth_qdio_out_buffer *buf)
+static void __qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
+ struct qeth_qdio_out_buffer *buf, unsigned int qeth_skip_skb)
{
int i;
struct sk_buff *skb;
@@ -937,11 +937,13 @@ static void qeth_clear_output_buffer(str
if (buf->buffer->element[0].flags & 0x40)
atomic_dec(&queue->set_pci_flags_count);
- skb = skb_dequeue(&buf->skb_list);
- while (skb) {
- atomic_dec(&skb->users);
- dev_kfree_skb_any(skb);
+ if (!qeth_skip_skb) {
skb = skb_dequeue(&buf->skb_list);
+ while (skb) {
+ atomic_dec(&skb->users);
+ dev_kfree_skb_any(skb);
+ skb = skb_dequeue(&buf->skb_list);
+ }
}
for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(queue->card); ++i) {
if (buf->buffer->element[i].addr && buf->is_header[i])
@@ -957,6 +959,12 @@ static void qeth_clear_output_buffer(str
atomic_set(&buf->state, QETH_QDIO_BUF_EMPTY);
}
+static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
+ struct qeth_qdio_out_buffer *buf)
+{
+ __qeth_clear_output_buffer(queue, buf, 0);
+}
+
void qeth_clear_qdio_buffers(struct qeth_card *card)
{
int i, j;
@@ -2685,6 +2693,13 @@ static int qeth_handle_send_error(struct
int sbalf15 = buffer->buffer->element[15].flags & 0xff;
QETH_DBF_TEXT(TRACE, 6, "hdsnderr");
+ if (card->info.type == QETH_CARD_TYPE_IQD) {
+ if (sbalf15 == 0) {
+ qdio_err = 0;
+ } else {
+ qdio_err = 1;
+ }
+ }
qeth_check_qdio_errors(buffer->buffer, qdio_err, "qouterr");
if (!qdio_err)
@@ -2817,6 +2832,7 @@ static void qeth_flush_buffers(struct qe
}
}
+ queue->sync_iqdio_error = 0;
queue->card->dev->trans_start = jiffies;
if (queue->card->options.performance_stats) {
queue->card->perf_stats.outbound_do_qdio_cnt++;
@@ -2832,6 +2848,10 @@ static void qeth_flush_buffers(struct qe
queue->card->perf_stats.outbound_do_qdio_time +=
qeth_get_micros() -
queue->card->perf_stats.outbound_do_qdio_start_time;
+ if (rc > 0) {
+ if (!(rc & QDIO_ERROR_SIGA_BUSY))
+ queue->sync_iqdio_error = rc & 3;
+ }
if (rc) {
queue->card->stats.tx_errors += count;
/* ignore temporary SIGA errors without busy condition */
@@ -2899,6 +2919,7 @@ void qeth_qdio_output_handler(struct ccw
struct qeth_qdio_out_q *queue = card->qdio.out_qs[__queue];
struct qeth_qdio_out_buffer *buffer;
int i;
+ unsigned qeth_send_err;
QETH_DBF_TEXT(TRACE, 6, "qdouhdl");
if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) {
@@ -2915,8 +2936,9 @@ void qeth_qdio_output_handler(struct ccw
}
for (i = first_element; i < (first_element + count); ++i) {
buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
- qeth_handle_send_error(card, buffer, qdio_error);
- qeth_clear_output_buffer(queue, buffer);
+ qeth_send_err = qeth_handle_send_error(card, buffer, qdio_error);
+ __qeth_clear_output_buffer(queue, buffer,
+ (qeth_send_err == QETH_SEND_ERROR_RETRY) ? 1 : 0);
}
atomic_sub(count, &queue->used_buffers);
/* check if we need to do something on this outbound queue */
@@ -3159,7 +3181,10 @@ int qeth_do_send_packet_fast(struct qeth
int offset, int hd_len)
{
struct qeth_qdio_out_buffer *buffer;
+ struct sk_buff *skb1;
+ struct qeth_skb_data *retry_ctrl;
int index;
+ int rc;
/* spin until we get the queue ... */
while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED,
@@ -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) {
+ skb1 = skb_dequeue(&buffer->skb_list);
+ while (skb1) {
+ atomic_dec(&skb1->users);
+ skb1 = skb_dequeue(&buffer->skb_list);
+ }
+ retry_ctrl = (struct qeth_skb_data *) &skb->cb[16];
+ if (retry_ctrl->magic != QETH_SKB_MAGIC) {
+ retry_ctrl->magic = QETH_SKB_MAGIC;
+ retry_ctrl->count = 0;
+ }
+ if (retry_ctrl->count < QETH_SIGA_CC2_RETRIES) {
+ retry_ctrl->count++;
+ rc = dev_queue_xmit(skb);
+ } else {
+ dev_kfree_skb_any(skb);
+ QETH_DBF_TEXT(QERR, 2, "qrdrop");
+ }
+ }
return 0;
out:
atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 2/5] [PATCH] qeth: scheduling while atomic during ifconfig online sequence
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
2009-08-26 12:01 ` [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2 frank.blaschka
@ 2009-08-26 12:01 ` frank.blaschka
2009-08-26 12:01 ` [patch 3/5] [PATCH] qeth: Cleanup for cast-type determination frank.blaschka
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
[-- Attachment #1: 606-qeth-online-sequence.diff --]
[-- Type: text/plain, Size: 1036 bytes --]
From: Frank Blaschka <frank.blaschka@de.ibm.com>
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.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/qeth_l3_main.c | 1 +
1 file changed, 1 insertion(+)
Index: git_net-next/drivers/s390/net/qeth_l3_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_l3_main.c
+++ 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);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 3/5] [PATCH] qeth: Cleanup for cast-type determination.
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
2009-08-26 12:01 ` [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2 frank.blaschka
2009-08-26 12:01 ` [patch 2/5] [PATCH] qeth: scheduling while atomic during ifconfig online sequence frank.blaschka
@ 2009-08-26 12:01 ` frank.blaschka
2009-08-26 12:01 ` [patch 4/5] [PATCH] qeth: display service_level info only when valid frank.blaschka
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Klaus-Dieter Wacker
[-- Attachment #1: 609-qeth-cast-type.diff --]
[-- Type: text/plain, Size: 7488 bytes --]
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Clear separation of cast-type determination (send path) for layer-2
resp. layer-3. Allowing to have inline functions for qeth layer-
discipline.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
---
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(-)
Index: git_net-next/drivers/s390/net/qeth_core.h
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core.h
+++ 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 *,
Index: git_net-next/drivers/s390/net/qeth_core_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core_main.c
+++ git_net-next/drivers/s390/net/qeth_core_main.c
@@ -2952,55 +2952,6 @@ void qeth_qdio_output_handler(struct ccw
}
EXPORT_SYMBOL_GPL(qeth_qdio_output_handler);
-int qeth_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
-{
- int cast_type = RTN_UNSPEC;
-
- if (card->info.type == QETH_CARD_TYPE_OSN)
- return cast_type;
-
- if (skb_dst(skb) && skb_dst(skb)->neighbour) {
- cast_type = skb_dst(skb)->neighbour->type;
- if ((cast_type == RTN_BROADCAST) ||
- (cast_type == RTN_MULTICAST) ||
- (cast_type == RTN_ANYCAST))
- return cast_type;
- else
- return RTN_UNSPEC;
- }
- /* try something else */
- if (skb->protocol == ETH_P_IPV6)
- return (skb_network_header(skb)[24] == 0xff) ?
- RTN_MULTICAST : 0;
- else if (skb->protocol == ETH_P_IP)
- return ((skb_network_header(skb)[16] & 0xf0) == 0xe0) ?
- RTN_MULTICAST : 0;
- /* ... */
- if (!memcmp(skb->data, skb->dev->broadcast, 6))
- return RTN_BROADCAST;
- else {
- u16 hdr_mac;
-
- hdr_mac = *((u16 *)skb->data);
- /* tr multicast? */
- switch (card->info.link_type) {
- case QETH_LINK_TYPE_HSTR:
- case QETH_LINK_TYPE_LANE_TR:
- if ((hdr_mac == QETH_TR_MAC_NC) ||
- (hdr_mac == QETH_TR_MAC_C))
- return RTN_MULTICAST;
- break;
- /* eth or so multicast? */
- default:
- if ((hdr_mac == QETH_ETH_MAC_V4) ||
- (hdr_mac == QETH_ETH_MAC_V6))
- return RTN_MULTICAST;
- }
- }
- return cast_type;
-}
-EXPORT_SYMBOL_GPL(qeth_get_cast_type);
-
int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb,
int ipv, int cast_type)
{
Index: git_net-next/drivers/s390/net/qeth_l2_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_l2_main.c
+++ git_net-next/drivers/s390/net/qeth_l2_main.c
@@ -216,36 +216,16 @@ static void qeth_l2_del_all_mc(struct qe
spin_unlock_bh(&card->mclock);
}
-static void qeth_l2_get_packet_type(struct qeth_card *card,
- struct qeth_hdr *hdr, struct sk_buff *skb)
+static inline int qeth_l2_get_cast_type(struct qeth_card *card,
+ struct sk_buff *skb)
{
- __u16 hdr_mac;
-
- if (!memcmp(skb->data + QETH_HEADER_SIZE,
- skb->dev->broadcast, 6)) {
- /* broadcast? */
- hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_BROADCAST;
- return;
- }
- hdr_mac = *((__u16 *)skb->data);
- /* tr multicast? */
- switch (card->info.link_type) {
- case QETH_LINK_TYPE_HSTR:
- case QETH_LINK_TYPE_LANE_TR:
- if ((hdr_mac == QETH_TR_MAC_NC) ||
- (hdr_mac == QETH_TR_MAC_C))
- hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_MULTICAST;
- else
- hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_UNICAST;
- break;
- /* eth or so multicast? */
- default:
- if ((hdr_mac == QETH_ETH_MAC_V4) ||
- (hdr_mac == QETH_ETH_MAC_V6))
- hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_MULTICAST;
- else
- hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_UNICAST;
- }
+ if (card->info.type == QETH_CARD_TYPE_OSN)
+ return RTN_UNSPEC;
+ if (is_broadcast_ether_addr(skb->data))
+ return RTN_BROADCAST;
+ if (is_multicast_ether_addr(skb->data))
+ return RTN_MULTICAST;
+ return RTN_UNSPEC;
}
static void qeth_l2_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
@@ -262,7 +242,7 @@ static void qeth_l2_fill_header(struct q
else if (cast_type == RTN_BROADCAST)
hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_BROADCAST;
else
- qeth_l2_get_packet_type(card, hdr, skb);
+ hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_UNICAST;
hdr->hdr.l2.pkt_length = skb->len-QETH_HEADER_SIZE;
/* VSWITCH relies on the VLAN
@@ -672,7 +652,7 @@ static int qeth_l2_hard_start_xmit(struc
struct qeth_card *card = dev->ml_priv;
struct sk_buff *new_skb = skb;
int ipv = qeth_get_ip_version(skb);
- int cast_type = qeth_get_cast_type(card, skb);
+ int cast_type = qeth_l2_get_cast_type(card, skb);
struct qeth_qdio_out_q *queue = card->qdio.out_qs
[qeth_get_priority_queue(card, skb, ipv, cast_type)];
int tx_bytes = skb->len;
Index: git_net-next/drivers/s390/net/qeth_l3_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_l3_main.c
+++ git_net-next/drivers/s390/net/qeth_l3_main.c
@@ -2525,6 +2525,51 @@ static int qeth_l3_do_ioctl(struct net_d
return rc;
}
+int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
+{
+ int cast_type = RTN_UNSPEC;
+
+ if (skb_dst(skb) && skb_dst(skb)->neighbour) {
+ cast_type = skb_dst(skb)->neighbour->type;
+ if ((cast_type == RTN_BROADCAST) ||
+ (cast_type == RTN_MULTICAST) ||
+ (cast_type == RTN_ANYCAST))
+ return cast_type;
+ else
+ return RTN_UNSPEC;
+ }
+ /* try something else */
+ if (skb->protocol == ETH_P_IPV6)
+ return (skb_network_header(skb)[24] == 0xff) ?
+ RTN_MULTICAST : 0;
+ else if (skb->protocol == ETH_P_IP)
+ return ((skb_network_header(skb)[16] & 0xf0) == 0xe0) ?
+ RTN_MULTICAST : 0;
+ /* ... */
+ if (!memcmp(skb->data, skb->dev->broadcast, 6))
+ return RTN_BROADCAST;
+ else {
+ u16 hdr_mac;
+
+ hdr_mac = *((u16 *)skb->data);
+ /* tr multicast? */
+ switch (card->info.link_type) {
+ case QETH_LINK_TYPE_HSTR:
+ case QETH_LINK_TYPE_LANE_TR:
+ if ((hdr_mac == QETH_TR_MAC_NC) ||
+ (hdr_mac == QETH_TR_MAC_C))
+ return RTN_MULTICAST;
+ break;
+ /* eth or so multicast? */
+ default:
+ if ((hdr_mac == QETH_ETH_MAC_V4) ||
+ (hdr_mac == QETH_ETH_MAC_V6))
+ return RTN_MULTICAST;
+ }
+ }
+ return cast_type;
+}
+
static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
struct sk_buff *skb, int ipv, int cast_type)
{
@@ -2650,7 +2695,7 @@ static int qeth_l3_hard_start_xmit(struc
struct qeth_card *card = dev->ml_priv;
struct sk_buff *new_skb = NULL;
int ipv = qeth_get_ip_version(skb);
- int cast_type = qeth_get_cast_type(card, skb);
+ int cast_type = qeth_l3_get_cast_type(card, skb);
struct qeth_qdio_out_q *queue = card->qdio.out_qs
[qeth_get_priority_queue(card, skb, ipv, cast_type)];
int tx_bytes = skb->len;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 4/5] [PATCH] qeth: display service_level info only when valid.
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
` (2 preceding siblings ...)
2009-08-26 12:01 ` [patch 3/5] [PATCH] qeth: Cleanup for cast-type determination frank.blaschka
@ 2009-08-26 12:01 ` frank.blaschka
2009-08-26 12:01 ` [patch 5/5] [PATCH] qeth: display "undefined" value of sysfs-attribute "layer2" frank.blaschka
2009-08-27 0:35 ` [patch 0/5] s390: qeth patches for 2.6.32 David Miller
5 siblings, 0 replies; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Klaus-Dieter Wacker
[-- Attachment #1: 610-qeth-service-level.diff --]
[-- Type: text/plain, Size: 1076 bytes --]
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
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.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: git_net-next/drivers/s390/net/qeth_core_main.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core_main.c
+++ 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)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 5/5] [PATCH] qeth: display "undefined" value of sysfs-attribute "layer2"
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
` (3 preceding siblings ...)
2009-08-26 12:01 ` [patch 4/5] [PATCH] qeth: display service_level info only when valid frank.blaschka
@ 2009-08-26 12:01 ` frank.blaschka
2009-08-27 0:35 ` [patch 0/5] s390: qeth patches for 2.6.32 David Miller
5 siblings, 0 replies; 9+ messages in thread
From: frank.blaschka @ 2009-08-26 12:01 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Ursula Braun
[-- Attachment #1: 612-qeth-layer2-attribute.diff --]
[-- Type: text/plain, Size: 985 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
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.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
---
drivers/s390/net/qeth_core_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: git_net-next/drivers/s390/net/qeth_core_sys.c
===================================================================
--- git_net-next.orig/drivers/s390/net/qeth_core_sys.c
+++ 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,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 0/5] s390: qeth patches for 2.6.32
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
` (4 preceding siblings ...)
2009-08-26 12:01 ` [patch 5/5] [PATCH] qeth: display "undefined" value of sysfs-attribute "layer2" frank.blaschka
@ 2009-08-27 0:35 ` David Miller
5 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-08-27 0:35 UTC (permalink / raw)
To: frank.blaschka; +Cc: netdev, linux-s390
From: frank.blaschka@de.ibm.com
Date: Wed, 26 Aug 2009 14:01:05 +0200
> 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
Looks good, all applied to net-next-2.6, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2.
2009-08-26 12:01 ` [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2 frank.blaschka
@ 2009-08-27 7:05 ` Bastian Blank
2009-08-27 8:05 ` Frank Blaschka
0 siblings, 1 reply; 9+ messages in thread
From: Bastian Blank @ 2009-08-27 7:05 UTC (permalink / raw)
To: frank.blaschka; +Cc: davem, netdev, linux-s390, Klaus-Dieter Wacker
On Wed, Aug 26, 2009 at 02:01:06PM +0200, frank.blaschka@de.ibm.com 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.
> @@ -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
--
... The prejudices people feel about each other disappear when they get
to know each other.
-- Kirk, "Elaan of Troyius", stardate 4372.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2.
2009-08-27 7:05 ` Bastian Blank
@ 2009-08-27 8:05 ` Frank Blaschka
0 siblings, 0 replies; 9+ messages in thread
From: Frank Blaschka @ 2009-08-27 8:05 UTC (permalink / raw)
To: Bastian Blank, davem, netdev, linux-s390, Klaus-Dieter Wacker
Bastian Blank schrieb:
> On Wed, Aug 26, 2009 at 02:01:06PM +0200, frank.blaschka@de.ibm.com 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.
>> @@ -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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-08-27 8:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 12:01 [patch 0/5] s390: qeth patches for 2.6.32 frank.blaschka
2009-08-26 12:01 ` [patch 1/5] [PATCH] qeth: HiperSockets SIGA retry support on CC=2 frank.blaschka
2009-08-27 7:05 ` Bastian Blank
2009-08-27 8:05 ` Frank Blaschka
2009-08-26 12:01 ` [patch 2/5] [PATCH] qeth: scheduling while atomic during ifconfig online sequence frank.blaschka
2009-08-26 12:01 ` [patch 3/5] [PATCH] qeth: Cleanup for cast-type determination frank.blaschka
2009-08-26 12:01 ` [patch 4/5] [PATCH] qeth: display service_level info only when valid frank.blaschka
2009-08-26 12:01 ` [patch 5/5] [PATCH] qeth: display "undefined" value of sysfs-attribute "layer2" frank.blaschka
2009-08-27 0:35 ` [patch 0/5] s390: qeth patches for 2.6.32 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).