aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-07-18 03:39:38 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-18 14:28:46 -0400
commitdc9059512c09d09b99de6cd3a8bc842507934cbb (patch)
treeb74ea66d7e0b80a359082e080a8ff4c5d0504970 /drivers/net/team/team.c
parentf150bd7f8cf742c4cdd0c929aa494ef72f7f5b13 (diff)
team: refine IFF_XMIT_DST_RELEASE capability
Cloned patch of Eric Dumazet for bonding. Some workloads greatly benefit of IFF_XMIT_DST_RELEASE capability on output net device, avoiding dirtying dst refcount. team currently disables IFF_XMIT_DST_RELEASE unconditionally. If all ports have the IFF_XMIT_DST_RELEASE bit set, then team dev can also have it in its priv_flags. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r--drivers/net/team/team.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 1a13470dee07..813e1319095f 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -733,12 +733,14 @@ static void __team_compute_features(struct team *team)
733 struct team_port *port; 733 struct team_port *port;
734 u32 vlan_features = TEAM_VLAN_FEATURES; 734 u32 vlan_features = TEAM_VLAN_FEATURES;
735 unsigned short max_hard_header_len = ETH_HLEN; 735 unsigned short max_hard_header_len = ETH_HLEN;
736 unsigned int flags, dst_release_flag = IFF_XMIT_DST_RELEASE;
736 737
737 list_for_each_entry(port, &team->port_list, list) { 738 list_for_each_entry(port, &team->port_list, list) {
738 vlan_features = netdev_increment_features(vlan_features, 739 vlan_features = netdev_increment_features(vlan_features,
739 port->dev->vlan_features, 740 port->dev->vlan_features,
740 TEAM_VLAN_FEATURES); 741 TEAM_VLAN_FEATURES);
741 742
743 dst_release_flag &= port->dev->priv_flags;
742 if (port->dev->hard_header_len > max_hard_header_len) 744 if (port->dev->hard_header_len > max_hard_header_len)
743 max_hard_header_len = port->dev->hard_header_len; 745 max_hard_header_len = port->dev->hard_header_len;
744 } 746 }
@@ -746,6 +748,9 @@ static void __team_compute_features(struct team *team)
746 team->dev->vlan_features = vlan_features; 748 team->dev->vlan_features = vlan_features;
747 team->dev->hard_header_len = max_hard_header_len; 749 team->dev->hard_header_len = max_hard_header_len;
748 750
751 flags = team->dev->priv_flags & ~IFF_XMIT_DST_RELEASE;
752 team->dev->priv_flags = flags | dst_release_flag;
753
749 netdev_change_features(team->dev); 754 netdev_change_features(team->dev);
750} 755}
751 756