Skip to contentSkip to conversation

s390: network patches for net-next

PATCH In review [email protected] 2 participants 7 messages Jun 24, 2013 – Jun 25, 2013

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

cover s390: network patches for net-next

Hi Dave,

here are some s390 related patches for net-next

shortlog:

Andy Shevchenko (1)
netiucv: remove unused macro

Stefan Raspl (2)
qeth: Increase default MTU for OSA devices
qeth: Fix crash on initial MTU size change

Ursula Braun (1)
qeth: change default standard blkt settings for OSA

Sebastian Ott (1)
qeth: use default napi weight

Thanks,
Frank

#1 lore raw

PATCH 1/5 netiucv: remove unused macro

From: Andy Shevchenko <[email protected]>

If someone is interested to dump something they may consider to use print_hex_dump() or print_hex_dump_bytes() kernel helpers.

---
 drivers/s390/net/netiucv.c |   20 --------------------
 1 file changed, 20 deletions(-)
drivers/s390/net/netiucv.c +0 -20
@@ -130,26 +130,6 @@ static inline int iucv_dbf_passes(debug_
 /**
  * some more debug stuff
  */
-#define IUCV_HEXDUMP16(importance,header,ptr) \
-PRINT_##importance(header "%02x %02x %02x %02x  %02x %02x %02x %02x  " \
-		   "%02x %02x %02x %02x  %02x %02x %02x %02x\n", \
-		   *(((char*)ptr)),*(((char*)ptr)+1),*(((char*)ptr)+2), \
-		   *(((char*)ptr)+3),*(((char*)ptr)+4),*(((char*)ptr)+5), \
-		   *(((char*)ptr)+6),*(((char*)ptr)+7),*(((char*)ptr)+8), \
-		   *(((char*)ptr)+9),*(((char*)ptr)+10),*(((char*)ptr)+11), \
-		   *(((char*)ptr)+12),*(((char*)ptr)+13), \
-		   *(((char*)ptr)+14),*(((char*)ptr)+15)); \
-PRINT_##importance(header "%02x %02x %02x %02x  %02x %02x %02x %02x  " \
-		   "%02x %02x %02x %02x  %02x %02x %02x %02x\n", \
-		   *(((char*)ptr)+16),*(((char*)ptr)+17), \
-		   *(((char*)ptr)+18),*(((char*)ptr)+19), \
-		   *(((char*)ptr)+20),*(((char*)ptr)+21), \
-		   *(((char*)ptr)+22),*(((char*)ptr)+23), \
-		   *(((char*)ptr)+24),*(((char*)ptr)+25), \
-		   *(((char*)ptr)+26),*(((char*)ptr)+27), \
-		   *(((char*)ptr)+28),*(((char*)ptr)+29), \
-		   *(((char*)ptr)+30),*(((char*)ptr)+31));
-
 #define PRINTK_HEADER " iucv: "       /* for debugging */
 
 /* dummy device to make sure netiucv_pm functions are called */
#2 lore raw

PATCH 2/5 qeth: Increase default MTU for OSA devices

In reply to [email protected]

From: Stefan Raspl <[email protected]>

Increase the default MTU for real OSA devices in layer 2 mode to 1500 Bytes for increased compatibility.

---
 drivers/s390/net/qeth_core_main.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/s390/net/qeth_core_main.c +4 -3
@@ -2198,11 +2198,11 @@ static inline int qeth_get_initial_mtu_f
 		case QETH_LINK_TYPE_LANE_TR:
 			return 2000;
 		default:
-			return 1492;
+			return card->options.layer2 ? 1500 : 1492;
 		}
 	case QETH_CARD_TYPE_OSM:
 	case QETH_CARD_TYPE_OSX:
-		return 1492;
+		return card->options.layer2 ? 1500 : 1492;
 	default:
 		return 1500;
 	}
@@ -2275,9 +2275,10 @@ static int qeth_ulp_enable_cb(struct qet
 		card->info.max_mtu = mtu;
 		card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE;
 	} else {
-		card->info.initial_mtu = qeth_get_initial_mtu_for_card(card);
 		card->info.max_mtu = *(__u16 *)QETH_ULP_ENABLE_RESP_MAX_MTU(
 			iob->data);
+		card->info.initial_mtu = min(card->info.max_mtu,
+					qeth_get_initial_mtu_for_card(card));
 		card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
 	}
 
#3 lore raw

PATCH 3/5 qeth: change default standard blkt settings for OSA

In reply to [email protected]

From: Ursula Braun <[email protected]>

blkt settings (or LAN idle settings) for an OSA Express card determine when and how often an OSA Express card tells the operating system about new incoming packets. The semantic of these settings has changed starting with OSA Express3. Currently the qeth standard settings apply to OSA Express2 and older generations of OSA Express cards, while new generations of OSA Express cards require extra coding of their reasonable default.

To cover future OSA Express generations the qeth default standard blkt setting is now the desired setting for OSA generations starting with OSA Express3, while the fixed set of older OSA Express cards receives its blkt settings explicitly.

---
 drivers/s390/net/qeth_core_main.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/s390/net/qeth_core_main.c +5 -5
@@ -1729,14 +1729,14 @@ static void qeth_configure_blkt_default(
 	QETH_DBF_TEXT(SETUP, 2, "cfgblkt");
 
 	if (prcd[74] == 0xF0 && prcd[75] == 0xF0 &&
-	    (prcd[76] == 0xF5 || prcd[76] == 0xF6)) {
-		card->info.blkt.time_total = 250;
-		card->info.blkt.inter_packet = 5;
-		card->info.blkt.inter_packet_jumbo = 15;
-	} else {
+	    prcd[76] >= 0xF1 && prcd[76] <= 0xF4) {
 		card->info.blkt.time_total = 0;
 		card->info.blkt.inter_packet = 0;
 		card->info.blkt.inter_packet_jumbo = 0;
+	} else {
+		card->info.blkt.time_total = 250;
+		card->info.blkt.inter_packet = 5;
+		card->info.blkt.inter_packet_jumbo = 15;
 	}
 }
 
#4 lore raw

PATCH 4/5 qeth: Fix crash on initial MTU size change

In reply to [email protected]

From: Stefan Raspl <[email protected]>

When the initial MTU size is changed prior to any activity on the device (e.g. by attaching a z/VM vNIC already configured in Linux to a guestLAN), we call dev_kfree_skb_irq(NULL) which results in a kernel panic. Adding a proper check for NULL pointers to address this issue.

---
 drivers/s390/net/qeth_core_main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_core_main.c +4 -2
@@ -1282,8 +1282,10 @@ static void qeth_free_qdio_buffers(struc
 
 	qeth_free_cq(card);
 	cancel_delayed_work_sync(&card->buffer_reclaim_work);
-	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
-		dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
+	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
+		if (card->qdio.in_q->bufs[j].rx_skb)
+			dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
+	}
 	kfree(card->qdio.in_q);
 	card->qdio.in_q = NULL;
 	/* inbound buffer pool */
#5 lore raw

PATCH 5/5 qeth: use default napi weight

In reply to [email protected]

From: Sebastian Ott <[email protected]>

Since commit 82dc3c63c692b1e1d59378ecee948ac88e034aad "net: introduce NAPI_POLL_WEIGHT" network drivers receive a warning when they use napi weight higher than NAPI_POLL_WEIGHT. This patch reduces QETH_NAPI_WEIGHT from 128 to 64 (NAPI_POLL_WEIGHT).

---
 drivers/s390/net/qeth_core.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/net/qeth_core.h +1 -1
@@ -738,7 +738,7 @@ struct qeth_rx {
 	int qdio_err;
 };
 
-#define QETH_NAPI_WEIGHT 128
+#define QETH_NAPI_WEIGHT NAPI_POLL_WEIGHT
 
 struct qeth_card {
 	struct list_head list;