summaryrefslogtreecommitdiffstats
path: root/include/net/bond_alb.h
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2020-04-30 21:21:34 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2020-05-01 21:15:37 +0200
commit34b37e204dfc8b20a09bb7b7f4c5e970c87420dd (patch)
treef3a74d62991724dc903c460fa4c714a1c75d89ad /include/net/bond_alb.h
parentbonding: Rename slave_arr to usable_slaves (diff)
downloadlinux-34b37e204dfc8b20a09bb7b7f4c5e970c87420dd.tar.xz
linux-34b37e204dfc8b20a09bb7b7f4c5e970c87420dd.zip
bonding/alb: Add helper functions to get the xmit slave
Add two helper functions to get the xmit slave of bond in alb or tlb mode. Extract the logic of find the xmit slave from the xmit flow to function. Xmit flow will xmit through this slave and in the following patches the new .ndo will call to the helper function to return 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>
Diffstat (limited to 'include/net/bond_alb.h')
-rw-r--r--include/net/bond_alb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/bond_alb.h b/include/net/bond_alb.h
index b3504fcd773d..f6af76c87a6c 100644
--- a/include/net/bond_alb.h
+++ b/include/net/bond_alb.h
@@ -158,6 +158,10 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char
void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave);
int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev);
int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev);
+struct slave *bond_xmit_alb_slave_get(struct bonding *bond,
+ struct sk_buff *skb);
+struct slave *bond_xmit_tlb_slave_get(struct bonding *bond,
+ struct sk_buff *skb);
void bond_alb_monitor(struct work_struct *);
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr);
void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id);