net/bonding: Implement ndo_sk_get_lower_dev
authorTariq Toukan <tariqt@nvidia.com>
Sun, 17 Jan 2021 14:59:44 +0000 (16:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jan 2021 04:48:40 +0000 (20:48 -0800)
commit007feb87fb15933b5de7135e6bdf57c219b3fbec
treeada163a6bc36e2a0e78555fbd3f2b528163291df
parent5b99854540e35c2c6a226bcdb4bafbae1bccad5a
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>
drivers/net/bonding/bond_main.c
include/net/bonding.h