Skip to contentSkip to conversation

bonding: limit primary_reselect to modes that use primary only

PATCH In review Nikolay Aleksandrov 1 participant 2 messages Sep 5, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: limit primary_reselect to modes that use primary only

---
 drivers/net/bonding/bond_options.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/bonding/bond_options.c +3 -0
index d8dc17faa6b4..591c1fbb7c8d 100644
@@ -316,6 +316,9 @@ static const struct bond_option bond_opts[] = {
 		.id = BOND_OPT_PRIMARY_RESELECT,
 		.name = "primary_reselect",
 		.desc = "Reselect primary slave once it comes up",
+		.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_ACTIVEBACKUP) |
+						BIT(BOND_MODE_TLB) |
+						BIT(BOND_MODE_ALB)),
 		.values = bond_primary_reselect_tbl,
 		.set = bond_option_primary_reselect_set
 	},
Signature · 1 line
1.9.3
#1 lore raw
Quoted 11 lines · Nikolay Aleksandrov
---
  drivers/net/bonding/bond_options.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/bonding/bond_options.c +0 -0
index d8dc17faa6b4..591c1fbb7c8d 100644

drivers/net/bonding/bond_options.c static const struct bond_option bond_opts[] = { · line 324

Quoted 9 lines
drivers/net/bonding/bond_options.c +3 -0
@@ -316,6 +316,9 @@ static const struct bond_option bond_opts[] = {
  		.id = BOND_OPT_PRIMARY_RESELECT,
  		.name = "primary_reselect",
  		.desc = "Reselect primary slave once it comes up",
+		.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_ACTIVEBACKUP) |
+						BIT(BOND_MODE_TLB) |
+						BIT(BOND_MODE_ALB)),
  		.values = bond_primary_reselect_tbl,
  		.set = bond_option_primary_reselect_set
  	},

Actually, self-nak as this adds option dependency. Sorry for the noise

Nik