summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000/if_lem.h
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-08-28 00:34:22 +0000
committeryongari <yongari@FreeBSD.org>2010-08-28 00:34:22 +0000
commit8203781f0e877f100602ff4676f0e5da09890261 (patch)
treeafd3011d44393f04dc0215f819448c55b43cd532 /sys/dev/e1000/if_lem.h
parentc4045967a29d41b5ba3c97b74ba4a05831e19c48 (diff)
downloadFreeBSD-src-8203781f0e877f100602ff4676f0e5da09890261.zip
FreeBSD-src-8203781f0e877f100602ff4676f0e5da09890261.tar.gz
Do not allocate multicast array memory in multicast filter
configuration function. For failed memory allocations, em(4)/lem(4) called panic(9) which is not acceptable on production box. igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which consumed 768 bytes of stack memory which looks too big. To address these issues, allocate multicast array memory in device attach time and make multicast configuration success under any conditions. This change also removes the excessive use of memory in stack. Reviewed by: jfv
Diffstat (limited to 'sys/dev/e1000/if_lem.h')
-rw-r--r--sys/dev/e1000/if_lem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/e1000/if_lem.h b/sys/dev/e1000/if_lem.h
index 13c2cbc..0ada7df 100644
--- a/sys/dev/e1000/if_lem.h
+++ b/sys/dev/e1000/if_lem.h
@@ -339,6 +339,8 @@ struct adapter {
bool has_manage;
bool has_amt;
+ /* Multicast array memory */
+ u8 *mta;
/* Info about the board itself */
uint8_t link_active;
uint16_t link_speed;
OpenPOWER on IntegriCloud