lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Sun, 27 Aug 2023 19:12:23 -0700
From: Shannon Nelson <shannon.nelson@....com>
To: <j.vosburgh@...il.com>, <andy@...yhouse.net>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<nhorman@...driver.com>, <netdev@...r.kernel.org>
CC: Shannon Nelson <shannon.nelson@....com>
Subject: [RFC PATCH net] bonding: add loadbalance case to queue override

    (RFC - At the risk of possibly kicking over an old dormant bee's nest,
     as well as displaying my own naivety in matters of bonding ...)

Someone asked me why the bond slave override queue selection didn't work
in the load balancer mode.  After digging into it a little, I found that
it was originally added [1] only allowing round-robin and active-backup modes
and has not changed since.

On initial review, it seems a simple matter to simply add the BOND_MODE_XOR
to the bond_should_override_tx_queue() logic, especially since all the
potential slaves should be up and active for the XOR anyway.  Jay's and
Neil's comments about using balance-xor [2],[3] seem to hint this should
work.  Of course, something "simple" likely has something not so simple
hiding in the background.

No, I haven't actually tested this, I wanted to first throw out the
question to those smarter than me before going any further down a possibly
bumpy path.

So, what am I missing?

Thanks,
sln

Links:
 [1]: https://lists.openwall.net/netdev/2010/05/11/6
 [2]: https://lists.openwall.net/netdev/2010/05/11/77
 [3]: https://lists.openwall.net/netdev/2010/05/12/2

Fixes: bb1d912323d5 ("bonding: allow user-controlled output slave selection")
Signed-off-by: Shannon Nelson <shannon.nelson@....com>
---
 include/net/bonding.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/net/bonding.h b/include/net/bonding.h
index 30ac427cf0c6..e812a84dbc05 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -296,6 +296,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
 static inline bool bond_should_override_tx_queue(struct bonding *bond)
 {
 	return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP ||
+	       BOND_MODE(bond) == BOND_MODE_XOR          ||
 	       BOND_MODE(bond) == BOND_MODE_ROUNDROBIN;
 }
 
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ