aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-11-28 21:57:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:26 -0500
commit5d8949448b68b3b355036c8061e3282388826ec5 (patch)
treef76f15805679c78b863efec79ff78a347f936944 /drivers/net/pasemi_mac.c
parent7e9916e9ddf23cd08107ed1a7fac429eea619313 (diff)
pasemi_mac: Remove SKB copy/recycle logic
pasemi_mac: Remove SKB copy/recycle logic It doesn't really buy us much, since copying is about as expensive as the allocation in the first place. Just remove it for now. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pasemi_mac.c')
-rw-r--r--drivers/net/pasemi_mac.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index ca773580cc51..07475bb7d860 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -503,13 +503,8 @@ static void pasemi_mac_replenish_rx_ring(const struct net_device *dev,
503 /* Entry in use? */ 503 /* Entry in use? */
504 WARN_ON(*buff); 504 WARN_ON(*buff);
505 505
506 /* skb might still be in there for recycle on short receives */ 506 skb = dev_alloc_skb(BUF_SIZE);
507 if (info->skb) 507 skb_reserve(skb, LOCAL_SKB_ALIGN);
508 skb = info->skb;
509 else {
510 skb = dev_alloc_skb(BUF_SIZE);
511 skb_reserve(skb, LOCAL_SKB_ALIGN);
512 }
513 508
514 if (unlikely(!skb)) 509 if (unlikely(!skb))
515 break; 510 break;
@@ -666,21 +661,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx,
666 goto next; 661 goto next;
667 } 662 }
668 663
669 if (len < 256) { 664 info->skb = NULL;
670 struct sk_buff *new_skb;
671
672 new_skb = netdev_alloc_skb(mac->netdev,
673 len + LOCAL_SKB_ALIGN);
674 if (new_skb) {
675 skb_reserve(new_skb, LOCAL_SKB_ALIGN);
676 memcpy(new_skb->data, skb->data, len);
677 /* save the skb in buffer_info as good */
678 skb = new_skb;
679 }
680 /* else just continue with the old one */
681 } else
682 info->skb = NULL;
683
684 info->dma = 0; 665 info->dma = 0;
685 666
686 if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) { 667 if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) {