aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1
diff options
context:
space:
mode:
authorDan Aloni <da-x@monatomic.org>2007-03-02 23:44:51 -0500
committerDavid S. Miller <davem@davemloft.net>2007-03-02 23:44:51 -0500
commit5c15bdec5c38f4ccf73ef2585fc80a6164de9554 (patch)
treec99084e96238eb9ce40e8d9d90e0097c4e92111d /drivers/net/atl1
parentb5284e5aa94be2f88dc92b29e97aff3da0c45f9f (diff)
[VLAN]: Avoid a 4-order allocation.
This patch splits the vlan_group struct into a multi-allocated struct. On x86_64, the size of the original struct is a little more than 32KB, causing a 4-order allocation, which is prune to problems caused by buddy-system external fragmentation conditions. I couldn't just use vmalloc() because vfree() cannot be called in the softirq context of the RCU callback. Signed-off-by: Dan Aloni <da-x@monatomic.org> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1')
-rw-r--r--drivers/net/atl1/atl1_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 65673485bb6b..88d4f70035bb 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -1252,8 +1252,7 @@ static void atl1_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
1252 1252
1253 spin_lock_irqsave(&adapter->lock, flags); 1253 spin_lock_irqsave(&adapter->lock, flags);
1254 /* atl1_irq_disable(adapter); */ 1254 /* atl1_irq_disable(adapter); */
1255 if (adapter->vlgrp) 1255 vlan_group_set_device(adapter->vlgrp, vid, NULL);
1256 adapter->vlgrp->vlan_devices[vid] = NULL;
1257 /* atl1_irq_enable(adapter); */ 1256 /* atl1_irq_enable(adapter); */
1258 spin_unlock_irqrestore(&adapter->lock, flags); 1257 spin_unlock_irqrestore(&adapter->lock, flags);
1259 /* We don't do Vlan filtering */ 1258 /* We don't do Vlan filtering */
@@ -1266,7 +1265,7 @@ static void atl1_restore_vlan(struct atl1_adapter *adapter)
1266 if (adapter->vlgrp) { 1265 if (adapter->vlgrp) {
1267 u16 vid; 1266 u16 vid;
1268 for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { 1267 for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
1269 if (!adapter->vlgrp->vlan_devices[vid]) 1268 if (!vlan_group_get_device(adapter->vlgrp, vid))
1270 continue; 1269 continue;
1271 atl1_vlan_rx_add_vid(adapter->netdev, vid); 1270 atl1_vlan_rx_add_vid(adapter->netdev, vid);
1272 } 1271 }