[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 <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
2bb8c26242
commit
14d0263fea
@@ -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;
|
||||
|
Reference in New Issue
Block a user