Skip to content

bonding: simple macro cleanup

Veaceslav Falico netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 1 replyIn review
  2. v29 patches 6 repliesSuperseded
  3. v15 patches 9 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9bonding: remove BOND_MODE_IS_LB macrodrivers/net/bonding/bonding.h+2 -50 replies
2/9bonding: make TX_QUEUE_OVERRIDE() macro an inline functiondrivers/net/bonding/bond_main.c drivers/net/bonding/bonding.h+9 -80 replies
3/9bonding: make BOND_NO_USES_ARP an inline functiondrivers/net/bonding/bond_main.c drivers/net/bonding/bond_options.c drivers/net/bonding/bonding.h+8 -70 replies
4/9bonding: make USES_PRIMARY inline functionsdrivers/net/bonding/bond_main.c drivers/net/bonding/bond_options.c drivers/net/bonding/bond_procfs.c +1 more+32 -270 replies
5/9bonding: create a macro for bond mode and use itdrivers/net/bonding/bond_alb.c drivers/net/bonding/bond_debugfs.c drivers/net/bonding/bond_main.c +5 more+60 -580 replies
6/9bonding: make IS_IP_TARGET_UNUSABLE_ADDRESS an inline functiondrivers/net/bonding/bond_main.c drivers/net/bonding/bond_options.c drivers/net/bonding/bonding.h+8 -60 replies
7/9bonding: convert IS_UP(slave->dev) to inline functiondrivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_main.c drivers/net/bonding/bond_options.c +1 more+16 -160 replies
8/9bonding: rename {,bond_}slave_can_tx and clean it updrivers/net/bonding/bond_main.c drivers/net/bonding/bonding.h+10 -130 replies
9/9bonding: replace SLAVE_IS_OK() with bond_slave_can_tx()drivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_alb.c drivers/net/bonding/bond_main.c +1 more+11 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/9] bonding: simple macro cleanup

Hi,

Trivial patchset that converts most of the bonding's macros into inline functions. It introduces only one macro, BOND_MODE(), which is just bond->params.mode, better to write/understand/remember.

The only real change is the removal of IFF_UP verification, which always came in pair with && netif_running(), and is though useless, as it's always IFF_UP when LINK_STATE_RUNNING.

v2->v3: fix 3/9 to actually invert bond_mode_uses_arp() and add
bond_uses_arp() alongside bond_mode_uses_arp()
v1->v2: use inlined functions instead of macros.

---
 drivers/net/bonding/bond_3ad.c         |   6 +-
 drivers/net/bonding/bond_alb.c         |  18 ++---
 drivers/net/bonding/bond_debugfs.c     |   2 +-
 drivers/net/bonding/bond_main.c        | 143 ++++++++++++++++-----------------
 drivers/net/bonding/bond_netlink.c     |   6 +-
 drivers/net/bonding/bond_options.c     |  10 +--
 drivers/net/bonding/bond_procfs.c      |  14 ++--
 drivers/net/bonding/bond_sysfs.c       |  14 ++--
 drivers/net/bonding/bond_sysfs_slave.c |   2 +-
 drivers/net/bonding/bonding.h          |  89 ++++++++++----------
 10 files changed, 150 insertions(+), 154 deletions(-)