]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qeth: core code should alloc headroom for LLC protocol
authorFrank Blaschka <frank.blaschka@de.ibm.com>
Tue, 1 Apr 2008 08:26:59 +0000 (10:26 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Apr 2008 00:41:41 +0000 (20:41 -0400)
Allocate headroom for TR_HLEN but using only ETH_HLEN causes rx
performance degradation. Allocate ETH_HLEN for ethernet and
TR_HLEN for token ring (layer 3 mode).

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/s390/net/qeth_core_main.c

index 5cfe0ef7719ab919254b58de2f2aa0720b232827..055f5c3e7b563fc8f73e65dc141ef91915375008 100644 (file)
@@ -4002,7 +4002,11 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card,
                }
        } else {
                skb_len = (*hdr)->hdr.l3.length;
-               headroom = max((int)ETH_HLEN, (int)TR_HLEN);
+               if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
+                   (card->info.link_type == QETH_LINK_TYPE_HSTR))
+                       headroom = TR_HLEN;
+               else
+                       headroom = ETH_HLEN;
        }
 
        if (!skb_len)