Skip to contentSkip to conversation

qeth patches for 2.6.23

PATCH In review Ursula Braun 2 participants 4 messages Jul 12, 2007 – Jul 16, 2007

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

cover qeth patches for 2.6.23

--
second attempt to send qeth patches:
This time with corrected sender address - sorry for the confusion.

two qeth patches for 2.6.23:
- scatter-gather patch improves handling of large incoming packets
- barrier patch is required due to a recent removal of 'volatile' from atomic_t in include/asm-s390/atomic.h

#1 lore raw

PATCH 1/2 s390: scatter-gather for inbound traffic in qeth driver

From: Frank Blaschka <[email protected]>

For large incoming packets > PAGE_SIZE/2 qeth creates a fragmented skb by adding pointers to qdio pages to the fragment list of the skb. This avoids allocating big chunks of consecutive memory. Also copying data from the qdio buffer to the skb is economized.

---

 drivers/s390/net/qeth.h      |    9 ++
 drivers/s390/net/qeth_main.c |  182 +++++++++++++++++++++++++++++++++++--------
 drivers/s390/net/qeth_proc.c |    6 +
 3 files changed, 165 insertions(+), 32 deletions(-)
drivers/s390/net/qeth.h +9 -0
Index: linux-2.6-uschi/drivers/s390/net/qeth.h
===================================================================
@@ -211,6 +211,10 @@ struct qeth_perf_stats {
 	/* initial values when measuring starts */
 	unsigned long initial_rx_packets;
 	unsigned long initial_tx_packets;
+	/* inbound scatter gather data */
+	unsigned int sg_skbs_rx;
+	unsigned int sg_frags_rx;
+	unsigned int sg_alloc_page_rx;
 };
 
 /* Routing stuff */
@@ -341,6 +345,9 @@ qeth_is_ipa_enabled(struct qeth_ipa_info
 
 #define QETH_IP_HEADER_SIZE 40
 
+/* large receive scatter gather copy break */
+#define QETH_RX_SG_CB (PAGE_SIZE >> 1)
+
 struct qeth_hdr_layer3 {
 	__u8  id;
 	__u8  flags;
@@ -771,6 +778,7 @@ struct qeth_card_options {
 	int layer2;
 	enum qeth_large_send_types large_send;
 	int performance_stats;
+	int rx_sg_cb;
 };
 
 /*
@@ -828,6 +836,7 @@ struct qeth_card {
 	int (*orig_hard_header)(struct sk_buff *,struct net_device *,
 				unsigned short,void *,void *,unsigned);
 	struct qeth_osn_info osn_info;
+	atomic_t force_alloc_skb;
 };
 
 struct qeth_card_list_struct {
drivers/s390/net/qeth_main.c +150 -32

252 lines not on this page · raw message

drivers/s390/net/qeth_proc.c +6 -0
Index: linux-2.6-uschi/drivers/s390/net/qeth_proc.c
===================================================================
@@ -212,6 +212,12 @@ qeth_perf_procfile_seq_show(struct seq_f
 		      "  Skb fragments sent in SG mode          : %u\n\n",
 		      card->perf_stats.sg_skbs_sent,
 		      card->perf_stats.sg_frags_sent);
+	seq_printf(s, "  Skbs received in SG mode               : %u\n"
+		      "  Skb fragments received in SG mode      : %u\n"
+		      "  Page allocations for rx SG mode        : %u\n\n",
+		      card->perf_stats.sg_skbs_rx,
+		      card->perf_stats.sg_frags_rx,
+		      card->perf_stats.sg_alloc_page_rx);
 	seq_printf(s, "  large_send tx (in Kbytes)              : %u\n"
 		      "  large_send count                       : %u\n\n",
 		      card->perf_stats.large_send_bytes >> 10,
#3 lore raw

PATCH 2/2 s390: add barriers to qeth driver

In reply to Ursula Braun

From: Frank Blaschka <[email protected]>

Add barrier to loop where atomic variable is evaluated.

---

 drivers/s390/net/qeth_main.c |    1 +
 1 files changed, 1 insertion(+)
drivers/s390/net/qeth_main.c +1 -0
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
@@ -1935,6 +1935,7 @@ qeth_send_control_data(struct qeth_card 
 			atomic_inc(&reply->received);
 			wake_up(&reply->wait_q);
 		}
+		cpu_relax();
 	};
 	rc = reply->rc;
 	qeth_put_reply(reply);
#2 lore raw

Re: [patch 1/2] s390: scatter-gather for inbound traffic in qeth driver

In reply to Ursula Braun
Quoted 10 lines · Ursula Braun

From: Frank Blaschka <[email protected]>

For large incoming packets > PAGE_SIZE/2 qeth creates a fragmented skb by adding pointers to qdio pages to the fragment list of the skb. This avoids allocating big chunks of consecutive memory. Also copying data from the qdio buffer to the skb is economized.

Quoted 6 lines

---

 drivers/s390/net/qeth.h      |    9 ++
 drivers/s390/net/qeth_main.c |  182 +++++++++++++++++++++++++++++++++++--------
 drivers/s390/net/qeth_proc.c |    6 +
 3 files changed, 165 insertions(+), 32 deletions(-)

applied 1-2