aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-11-20 21:34:45 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-21 11:55:07 -0500
commit403f43c937d24832b18524f65415c0bbba6b5064 (patch)
treed4200f7ab5fc11ad0ca71cc11ce22e8e3ed4773b /drivers/net/team
parent0e376bd0b791ac6ac6bdb051492df0769c840848 (diff)
team: bcast: convert return value of team_dev_queue_xmit() to bool correctly
The thing is that team_dev_queue_xmit() returns NET_XMIT_* or -E*. bc_trasmit() should return true in case all went well. So use ! to get correct retval from team_dev_queue_xmit() result. This bug caused iface statistics to be badly computed. This bug was introduced by: team: add broadcast mode (5fc889911a99043a97da1daa0d010ad72cbc3042) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team_mode_broadcast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/team/team_mode_broadcast.c b/drivers/net/team/team_mode_broadcast.c
index 9db0171e9366..c5db428e73fa 100644
--- a/drivers/net/team/team_mode_broadcast.c
+++ b/drivers/net/team/team_mode_broadcast.c
@@ -29,8 +29,8 @@ static bool bc_transmit(struct team *team, struct sk_buff *skb)
29 if (last) { 29 if (last) {
30 skb2 = skb_clone(skb, GFP_ATOMIC); 30 skb2 = skb_clone(skb, GFP_ATOMIC);
31 if (skb2) { 31 if (skb2) {
32 ret = team_dev_queue_xmit(team, last, 32 ret = !team_dev_queue_xmit(team, last,
33 skb2); 33 skb2);
34 if (!sum_ret) 34 if (!sum_ret)
35 sum_ret = ret; 35 sum_ret = ret;
36 } 36 }
@@ -39,7 +39,7 @@ static bool bc_transmit(struct team *team, struct sk_buff *skb)
39 } 39 }
40 } 40 }
41 if (last) { 41 if (last) {
42 ret = team_dev_queue_xmit(team, last, skb); 42 ret = !team_dev_queue_xmit(team, last, skb);
43 if (!sum_ret) 43 if (!sum_ret)
44 sum_ret = ret; 44 sum_ret = ret;
45 } 45 }