bonding: Add helper function to get the xmit slave based on hash
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 30 Apr 2020 19:21:35 +0000 (22:21 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 May 2020 19:15:37 +0000 (12:15 -0700)
commitc071d91d2a89b0dac1354673810b36453aed62c4
treecd11ee303e9872956396eb24e3cb1884cef85ba8
parent34b37e204dfc8b20a09bb7b7f4c5e970c87420dd
bonding: Add helper function to get the xmit slave based on hash

Both xor and 802.3ad modes use bond_xmit_hash to get the xmit slave.
Export the logic to helper function so it could be used in the
following patches by 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