bonding: Add helper function to get the xmit slave in rr mode
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 30 Apr 2020 19:21:36 +0000 (22:21 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 May 2020 19:15:37 +0000 (12:15 -0700)
commit29d5bbccb3a171eb146c94efeb3d752fad3ddf7d
tree1d2db7995f0a56250d659289aaa452f2510fa55e
parentc071d91d2a89b0dac1354673810b36453aed62c4
bonding: Add helper function to get the xmit slave in rr mode

Add helper function to get the xmit slave when bond is in round
robin mode. Change bond_xmit_slave_id to bond_get_slave_by_id, then
the logic for find the next slave for transmit could be used
both by the xmit flow and the .ndo to get the xmit slave.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/bonding/bond_main.c