net/bonding: Implement ndo_sk_get_lower_dev

Add ndo_sk_get_lower_dev() implementation for bond interfaces.

Support only for the cases where the socket's and SKBs' hash
yields identical value for the whole connection lifetime.

Here we restrict it to L3+4 sockets only, with
xmit_hash_policy==LAYER34 and bond modes xor/802.3ad.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Boris Pismenny <borisp@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Tariq Toukan
2021-01-18 20:48:40 -08:00
committed by Jakub Kicinski
parent 5b99854540
commit 007feb87fb
2 changed files with 95 additions and 0 deletions
+2
View File
@@ -265,6 +265,8 @@ struct bond_vlan_tag {
unsigned short vlan_id;
};
bool bond_sk_check(struct bonding *bond);
/**
* Returns NULL if the net_device does not belong to any of the bond's slaves
*