bonding: use neighbours instead of own lists
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest27 patches 4 repliesIn review
- v427 patches 2 repliesSuperseded
- v327 patches 9 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 27 patches | 4 replies | Superseded | |
| v1 | 26 patches | 2 replies | Superseded |
Changes in v5 from the cover letter
Remove casting from void * to slave *, it's not needed, in 06/27.
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/27 | net: use lists as arguments instead of bool uppernet/ | +22 | 0 replies | |
| 2/27 | net: add adj_list to save only neighboursdrivers/ drivers/ include/ +1 more | +129 | 0 replies | |
| 3/27 | net: add RCU variant to search for netdev_adjacent linknet/ | +13 | 0 replies | |
| 4/27 | net: add netdev_adjacent->private and allow to use itinclude/ net/ | +64 | 0 replies | |
| 5/27 | bonding: populate neighbour's private on enslavedrivers/ | +16 | 0 replies | |
| 6/27 | bonding: modify bond_get_slave_by_dev() to use neighboursdrivers/ | +1 | 0 replies | |
| 7/27 | net: add for_each iterators through neighbour lower link's privateinclude/ net/ | +76 | 0 replies | |
| 8/27 | bonding: remove bond_for_each_slave_continue_reverse()drivers/ drivers/ drivers/ | +30 | 0 replies | |
| 9/27 | bonding: make bond_for_each_slave() use lower neighbour's privatedrivers/ drivers/ drivers/ +4 more | +98 | 0 replies | |
| 10/27 | bonding: use bond_for_each_slave() in bond_uninit()drivers/ | +3 | 0 replies | |
| 11/27 | bonding: rework bond_3ad_xmit_xor() to use bond_for_each_slave() onlydrivers/ | +22 | 3 replies | |
| 12/27 | bonding: rework rlb_next_rx_slave() to use bond_for_each_slave()drivers/ drivers/ | +22 | 0 replies | |
| 13/27 | bonding: rework bond_find_best_slave() to use bond_for_each_slave()drivers/ | +12 | 0 replies | |
| 14/27 | bonding: rework bond_ab_arp_probe() to use bond_for_each_slave()drivers/ | +24 | 0 replies | |
| 15/27 | bonding: remove unused bond_for_each_slave_from()drivers/ | +0 | 0 replies | |
| 16/27 | bonding: add bond_has_slaves() and use itdrivers/ drivers/ drivers/ +2 more | +25 | 0 replies | |
| 17/27 | bonding: convert bond_has_slaves() to use the neighbour listdrivers/ | +1 | 0 replies | |
| 18/27 | net: add a possibility to get private from netdev_adjacent->listinclude/ net/ | +11 | 0 replies | |
| 19/27 | bonding: convert first/last slave logic to use neighboursdrivers/ | +11 | 0 replies | |
| 20/27 | bonding: remove bond_prev_slave()drivers/ drivers/ | +3 | 0 replies | |
| 21/27 | bonding: add __bond_next_slave() which uses neighboursdrivers/ | +28 | 0 replies | |
| 22/27 | bonding: use neighbours for bond_next_slave()drivers/ | +1 | 0 replies | |
| 23/27 | bonding: remove slave listsdrivers/ drivers/ | +0 | 0 replies | |
| 24/27 | vlan: link the upper neighbour only after registeringnet/ | +7 | 0 replies | |
| 25/27 | vlan: unlink the upper neighbour before unregisteringnet/ | +2 | 0 replies | |
| 26/27 | net: expose the master link to sysfs, and remove it from bonddrivers/ net/ | +20 | 0 replies | |
| 27/27 | net: create sysfs symlinks for neighbour devicesdrivers/ drivers/ drivers/ +1 more | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 net-next 00/27] bonding: use neighbours instead of own lists
This patchset introduces all the needed infrastructure, on top of current adjacent lists, to be able to remove bond's slave_list/slave->list. The overhead in memory/CPU is minimal, and after the patchset bonding can rely on its slave-related functions, given the proper locking. I've done some netperf benchmarks on a vm, and the delta was about 0.1gbps for 35gbps as a whole, so no speed fluctuations.
It also automatically creates lower/upper and master symlinks in dev's sysfs directory.
---
v4 -> v5:
Remove casting from void * to slave *, it's not needed, in 06/27.
v3 -> v4:
Per the feedback received, fix the comments to be kernel-doc style. As Ben Hutchings suggested, make the 'get next private after a specific private' function bonding-specific - it has virtually no uses outside bonding (and even in bonding I already have some patches of removing it).
Also, remove the stupid 'bool upper' logic from everywhere in the logic - as Ben suggested, it's easier to pass the lists directly - and not only easier, it saved several hundred lines of code modified. Finally, make netdev_for_each_lower_private() safe for removal of the current member - it can be easily achieved and doesn't really need two versions, as in lists.
v2 -> v3:
Fix the commit subject for patch 08 - forgot the _continue in bond_for_each_slave_continue_reverse(), suggested by Cong Wang. This version is already ready for the inclusion, hopefully. Moved the changelog in cover letter to the bottom and cleaned it up a bit.
v1 -> v2:
Fix a bug when we could remove try to remove a neighbour twice - it was possible if we've had this neighbour already and added another devices which had this neighbour in its lists. Fix it by following the rule - there can be only one neighbour link, so add also _remove_neighbour() functions to the generic _remove()s to handle the neighbour only removing, and fix its refcounting while adding (all in patch 01).
Also, fix a vlan bug when it called unregister netdevice before unlinking - it could possibly lead to a subte race condition - cause it was unregistered but still in global-accessible list.
Rearrange sysfs/vlan patches so that first we fix vlan and only after we add sysfs stuff.
RFC -> v1:
I've added proper, consistent naming for all variables/functions, uninlined some helpers to get better backtraces, just in case (overhead is minimal, no hot paths), rearranged patches for better review, dropped bondings ->prev and bond_for_each_slave_continue() functionality - to be able to RCUify it easier, and renamed slave_* sysfs links to lower_* sysfs links to maintain upper/lower naming. I've also dropped, thanks to bonding cleanup, some heavy and ugly/intrusive patches.
--- drivers/net/bonding/bond_3ad.c | 54 ++-- drivers/net/bonding/bond_alb.c | 81 ++--- drivers/net/bonding/bond_alb.h | 4 +- drivers/net/bonding/bond_main.c | 296 +++++++++-------- drivers/net/bonding/bond_procfs.c | 5 +- drivers/net/bonding/bond_sysfs.c | 62 +--- drivers/net/bonding/bonding.h | 101 +++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +- include/linux/netdevice.h | 55 +++- net/8021q/vlan.c | 18 +- net/core/dev.c | 403 +++++++++++++++++------- 11 files changed, 638 insertions(+), 444 deletions(-)