Re: [PATCH net-next v2 4/4] bonding: balance ICMP echoes in layer3+4 mode
From: Eric Dumazet <hidden>
Date: 2019-10-29 21:03:13
Also in:
lkml
From: Eric Dumazet <hidden>
Date: 2019-10-29 21:03:13
Also in:
lkml
On 10/29/19 11:35 AM, Nikolay Aleksandrov wrote:
Hi Matteo, Wouldn't it be more useful and simpler to use some field to choose the slave (override the hash completely) in a deterministic way from user-space ? For example the mark can be interpreted as a slave id in the bonding (should be optional, to avoid breaking existing setups). ping already supports -m and anything else can set it, this way it can be used to do monitoring for a specific slave with any protocol and would be a much simpler change. User-space can then implement any logic for the monitoring case and as a minor bonus can monitor the slaves in parallel. And the opposite as well - if people don't want these balanced for some reason, they wouldn't enable it.
I kind of agree giving user more control. But I do not believe we need to use the mark (this might be already used by other layers) TCP uses sk->sk_hash to feed skb->hash. Anything using skb_set_owner_w() is also using sk->sk_hash if set. So presumably we could add a generic SO_TXHASH socket option to let user space read/set this field.