From 14d0263fea0613d4f83dc5e3ad4631f363d1689f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 26 Sep 2006 11:57:43 -0700 Subject: [PATCH] sky2: fragmented receive for large MTU Use hardware support for chained receive to break up large frames into multiple pages. This avoids having to do a mult-page allocation that can fail on a busy system due to fragmented memory. For normal size MTU, this code behaves the same. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- drivers/net/sky2.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/net/sky2.h') diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 403486a3831d..f66109a96d95 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h @@ -4,6 +4,8 @@ #ifndef _SKY2_H #define _SKY2_H +#define ETH_JUMBO_MTU 9000 /* Maximum MTU supported */ + /* PCI device specific config registers */ enum { PCI_DEV_REG1 = 0x40, @@ -1779,7 +1781,9 @@ struct tx_ring_info { struct rx_ring_info { struct sk_buff *skb; - dma_addr_t mapaddr; + dma_addr_t data_addr; + DECLARE_PCI_UNMAP_ADDR(data_size); + dma_addr_t frag_addr[ETH_JUMBO_MTU >> PAGE_SHIFT]; }; struct sky2_port { @@ -1804,7 +1808,9 @@ struct sky2_port { u16 rx_next; /* next re to check */ u16 rx_put; /* next le index to use */ u16 rx_pending; - u16 rx_bufsize; + u16 rx_data_size; + u16 rx_nfrags; + #ifdef SKY2_VLAN_TAG_USED u16 rx_tag; struct vlan_group *vlgrp; -- cgit v1.2.2