archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <>
To: Eric Dumazet <>,
	Matteo Croce <>,
Cc: Jay Vosburgh <>,
	Veaceslav Falico <>,
	Andy Gospodarek <>,
	"David S . Miller" <>,
	Stanislav Fomichev <>,
	Daniel Borkmann <>,
	Song Liu <>,
	Alexei Starovoitov <>,
	Paul Blakey <>,
Subject: Re: [PATCH net-next v2 4/4] bonding: balance ICMP echoes in layer3+4 mode
Date: Tue, 29 Oct 2019 23:50:33 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 29/10/2019 23:03, Eric Dumazet wrote:
> 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.

Right, I was just giving it as an example. Your suggestion sounds much better and
wouldn't interfere with other layers, plus we already use skb->hash in bond_xmit_hash()
and skb_set_owner_w() sets l4_hash if txhash is present which is perfect.

One thing - how do we deal with sk_rethink_txhash() ? I guess we'll need some way to
signal that the user specified the txhash and it is not to be recomputed ?
That can also be used to avoid the connect txhash set as well if SO_TXHASH was set prior
to the connect. It's quite late here, I'll look into it more tomorrow. :)


  reply	other threads:[~2019-10-29 21:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 13:50 [PATCH net-next v2 0/4] ICMP flow improvements Matteo Croce
2019-10-29 13:50 ` [PATCH net-next v2 1/4] flow_dissector: add meaningful comments Matteo Croce
2019-10-29 13:50 ` [PATCH net-next v2 2/4] flow_dissector: skip the ICMP dissector for non ICMP packets Matteo Croce
2019-10-29 13:50 ` [PATCH net-next v2 3/4] flow_dissector: extract more ICMP information Matteo Croce
2019-10-29 13:50 ` [PATCH net-next v2 4/4] bonding: balance ICMP echoes in layer3+4 mode Matteo Croce
2019-10-29 18:35   ` Nikolay Aleksandrov
2019-10-29 18:41     ` Nikolay Aleksandrov
2019-10-29 19:45       ` Matteo Croce
2019-10-29 20:07         ` Nikolay Aleksandrov
2019-10-29 21:03     ` Eric Dumazet
2019-10-29 21:50       ` Nikolay Aleksandrov [this message]
2019-10-29 23:04         ` Eric Dumazet
2019-10-30 12:48           ` Nikolay Aleksandrov
2019-10-29 23:03       ` Matteo Croce
2019-10-29 23:14         ` Eric Dumazet
2019-10-29 23:19           ` Matteo Croce
2019-10-31 16:22             ` Matteo Croce
2019-10-31  0:21 ` [PATCH net-next v2 0/4] ICMP flow improvements David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).