aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team_mode_loadbalance.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-04-20 00:42:05 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-21 16:26:33 -0400
commit19a0b58e506b06fd41659d8734bba6a3e87980f4 (patch)
treef9844eaf9d1471c6fcd98c850b1ed6cd57f2bce3 /drivers/net/team/team_mode_loadbalance.c
parent4c78bb845bd2aaf1f7136e75314c7d034cfd120f (diff)
team: allow to enable/disable ports
This patch changes content of hashlist (used to get port struct by computed index (0...en_port_count-1)). Now the hash list contains only enabled ports so userspace will be able to say what ports can be used for tx/rx. This becomes handy when userspace will need to disable ports which does not belong to active aggregator. By default, newly added port is enabled. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team_mode_loadbalance.c')
-rw-r--r--drivers/net/team/team_mode_loadbalance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index 438d5b87163..86e8183c8e3 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -38,7 +38,7 @@ static bool lb_transmit(struct team *team, struct sk_buff *skb)
38 if (unlikely(!fp)) 38 if (unlikely(!fp))
39 goto drop; 39 goto drop;
40 hash = SK_RUN_FILTER(fp, skb); 40 hash = SK_RUN_FILTER(fp, skb);
41 port_index = hash % team->port_count; 41 port_index = hash % team->en_port_count;
42 port = team_get_port_by_index_rcu(team, port_index); 42 port = team_get_port_by_index_rcu(team, port_index);
43 if (unlikely(!port)) 43 if (unlikely(!port))
44 goto drop; 44 goto drop;