diff mbox series

[RFC,net] bonding: add loadbalance case to queue override

Message ID 20230828021223.42149-1-shannon.nelson@amd.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series [RFC,net] bonding: add loadbalance case to queue override | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1334 this patch: 1334
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 1351 this patch: 1351
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1357 this patch: 1357
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Nelson, Shannon Aug. 28, 2023, 2:12 a.m. UTC
(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@amd.com>
---
 include/net/bonding.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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;
 }