From 3fdddd859af235119bdfb09ccc886fe48b97fc72 Mon Sep 17 00:00:00 2001 From: dingtianhong Date: Mon, 12 May 2014 15:08:43 +0800 Subject: bonding: alloc the structure ad_info dynamically in per slave The struct ad_slave_info is very huge, and only be used for 802.3ad mode, so alloc the structure dynamically could save 356 Bits for every slave in non 802.3ad mode. Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Ding Tianhong Acked-by: Veaceslav Falico Signed-off-by: David S. Miller --- drivers/net/bonding/bond_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/bonding/bond_netlink.c') diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c index f847e165d252..0d06e751dff2 100644 --- a/drivers/net/bonding/bond_netlink.c +++ b/drivers/net/bonding/bond_netlink.c @@ -59,7 +59,7 @@ static int bond_fill_slave_info(struct sk_buff *skb, if (slave->bond->params.mode == BOND_MODE_8023AD) { const struct aggregator *agg; - agg = SLAVE_AD_INFO(slave).port.aggregator; + agg = SLAVE_AD_INFO(slave)->port.aggregator; if (agg) if (nla_put_u16(skb, IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, agg->aggregator_identifier)) -- cgit v1.2.3-59-g8ed1b