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

Skip to content
Commit 21d9629a authored by Alex Sidorenko's avatar Alex Sidorenko Committed by David S. Miller
Browse files

Fixing a bug in team driver due to incorrect 'unsigned int' to 'int' conversion



Roundrobin runner of team driver uses 'unsigned int' variable to count
the number of sent_packets. Later it is passed to a subroutine
team_num_to_port_index(struct team *team, int num) as 'num' and when
we reach MAXINT (2**31-1), 'num' becomes negative.

This leads to using incorrect hash-bucket for port lookup
and as a result, packets are dropped. The fix consists of changing
'int num' to 'unsigned int num'. Testing of a fixed kernel shows that
there is no packet drop anymore.

Signed-off-by: default avatarAlex Sidorenko <alexandre.sidorenko@hpe.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d3cfc36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment