Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 403f43c9 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

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 (5fc88991)

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e376bd0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ static bool bc_transmit(struct team *team, struct sk_buff *skb)
			if (last) {
				skb2 = skb_clone(skb, GFP_ATOMIC);
				if (skb2) {
					ret = team_dev_queue_xmit(team, last,
					ret = !team_dev_queue_xmit(team, last,
								   skb2);
					if (!sum_ret)
						sum_ret = ret;
@@ -39,7 +39,7 @@ static bool bc_transmit(struct team *team, struct sk_buff *skb)
		}
	}
	if (last) {
		ret = team_dev_queue_xmit(team, last, skb);
		ret = !team_dev_queue_xmit(team, last, skb);
		if (!sum_ret)
			sum_ret = ret;
	}