diff options
author | Eric Dumazet <edumazet@google.com> | 2012-07-17 12:19:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-18 09:31:25 -0700 |
commit | b6fe83e9525a03b3141e5857eb7d8af219db94e5 (patch) | |
tree | abdd0d6dc72d1c9a30108f8be1e8dc9dcb5d315e /drivers/net/bonding/bond_main.c | |
parent | 1817e83d6ccf992164dd83522b2d1c22b1a85977 (diff) | |
download | op-kernel-dev-b6fe83e9525a03b3141e5857eb7d8af219db94e5.zip op-kernel-dev-b6fe83e9525a03b3141e5857eb7d8af219db94e5.tar.gz |
bonding: refine IFF_XMIT_DST_RELEASE capability
Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability
on output net device, avoiding dirtying dst refcount.
bonding currently disables IFF_XMIT_DST_RELEASE unconditionally.
If all slaves have the IFF_XMIT_DST_RELEASE bit set, then
bonding master can also have it in its priv_flags
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 1eb3979..3960b1b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1382,6 +1382,7 @@ static void bond_compute_features(struct bonding *bond) netdev_features_t vlan_features = BOND_VLAN_FEATURES; unsigned short max_hard_header_len = ETH_HLEN; int i; + unsigned int flags, dst_release_flag = IFF_XMIT_DST_RELEASE; read_lock(&bond->lock); @@ -1392,6 +1393,7 @@ static void bond_compute_features(struct bonding *bond) vlan_features = netdev_increment_features(vlan_features, slave->dev->vlan_features, BOND_VLAN_FEATURES); + dst_release_flag &= slave->dev->priv_flags; if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; } @@ -1400,6 +1402,9 @@ done: bond_dev->vlan_features = vlan_features; bond_dev->hard_header_len = max_hard_header_len; + flags = bond_dev->priv_flags & ~IFF_XMIT_DST_RELEASE; + bond_dev->priv_flags = flags | dst_release_flag; + read_unlock(&bond->lock); netdev_change_features(bond_dev); |