qeth patches for 2.6.23
Subsystems (4)
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
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
@@ -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
@@ -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,
Re: [patch 1/2] s390: scatter-gather for inbound traffic in qeth driver
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.
Signed-off-by Frank Blaschka <[email protected]>Signed-off-by Ursula Braun <[email protected]>Signed-off-by Frank Pavlic <[email protected]>
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
PATCH 2/2 s390: add barriers to qeth driver
In reply to Ursula BraunFrom: 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
@@ -1935,6 +1935,7 @@ qeth_send_control_data(struct qeth_cardatomic_inc (&reply->received);wake_up (&reply->wait_q); } +cpu_relax (); }; rc = reply->rc;qeth_put_reply (reply);