diff options
| author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-07-08 18:52:02 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-11 01:20:28 -0400 |
| commit | d9fed18bf9090bd0682f3c611c40261a98a2842d (patch) | |
| tree | 91f8579e3613706dc219f0c0785be2763670836f | |
| parent | 2115a6432911b669bec037686066c7bbc70cc68e (diff) | |
ixgb: add copybreak parameter
copybreak code was already in the driver, allow the user to turn it
off if they don't like it.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| -rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index bd08e1992140..4e422c4cbe83 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
| @@ -40,6 +40,12 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; | |||
| 40 | const char ixgb_driver_version[] = DRV_VERSION; | 40 | const char ixgb_driver_version[] = DRV_VERSION; |
| 41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
| 42 | 42 | ||
| 43 | #define IXGB_CB_LENGTH 256 | ||
| 44 | static unsigned int copybreak __read_mostly = IXGB_CB_LENGTH; | ||
| 45 | module_param(copybreak, uint, 0644); | ||
| 46 | MODULE_PARM_DESC(copybreak, | ||
| 47 | "Maximum size of packet that is copied to a new buffer on receive"); | ||
| 48 | |||
| 43 | /* ixgb_pci_tbl - PCI Device ID Table | 49 | /* ixgb_pci_tbl - PCI Device ID Table |
| 44 | * | 50 | * |
| 45 | * Wildcard entries (PCI_ANY_ID) should come last | 51 | * Wildcard entries (PCI_ANY_ID) should come last |
| @@ -1976,8 +1982,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) | |||
| 1976 | /* code added for copybreak, this should improve | 1982 | /* code added for copybreak, this should improve |
| 1977 | * performance for small packets with large amounts | 1983 | * performance for small packets with large amounts |
| 1978 | * of reassembly being done in the stack */ | 1984 | * of reassembly being done in the stack */ |
| 1979 | #define IXGB_CB_LENGTH 256 | 1985 | if (length < copybreak) { |
| 1980 | if (length < IXGB_CB_LENGTH) { | ||
| 1981 | struct sk_buff *new_skb = | 1986 | struct sk_buff *new_skb = |
| 1982 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); | 1987 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); |
| 1983 | if (new_skb) { | 1988 | if (new_skb) { |
