From aa617aa9568e5fc80103194f5a6da2977c305f10 Mon Sep 17 00:00:00 2001 From: Frank Blaschka Date: Thu, 12 Jul 2007 12:51:34 +0200 Subject: s390: scatter-gather for inbound traffic in qeth driver 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 Signed-off-by: Ursula Braun Signed-off-by: Frank Pavlic Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/s390/net/qeth.h') diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index b34eb82edd9..ec18bae05df 100644 --- a/drivers/s390/net/qeth.h +++ b/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 *ipa, enum qeth_ipa_funcs func) #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 { -- cgit v1.2.3