|
@@ -70,6 +70,8 @@ static int bond_option_mode_set(struct bonding *bond,
|
|
const struct bond_opt_value *newval);
|
|
const struct bond_opt_value *newval);
|
|
static int bond_option_slaves_set(struct bonding *bond,
|
|
static int bond_option_slaves_set(struct bonding *bond,
|
|
const struct bond_opt_value *newval);
|
|
const struct bond_opt_value *newval);
|
|
|
|
+static int bond_option_tlb_dynamic_lb_set(struct bonding *bond,
|
|
|
|
+ const struct bond_opt_value *newval);
|
|
|
|
|
|
|
|
|
|
static const struct bond_opt_value bond_mode_tbl[] = {
|
|
static const struct bond_opt_value bond_mode_tbl[] = {
|
|
@@ -179,6 +181,12 @@ static const struct bond_opt_value bond_lp_interval_tbl[] = {
|
|
{ NULL, -1, 0},
|
|
{ NULL, -1, 0},
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static const struct bond_opt_value bond_tlb_dynamic_lb_tbl[] = {
|
|
|
|
+ { "off", 0, 0},
|
|
|
|
+ { "on", 1, BOND_VALFLAG_DEFAULT},
|
|
|
|
+ { NULL, -1, 0}
|
|
|
|
+};
|
|
|
|
+
|
|
static const struct bond_option bond_opts[] = {
|
|
static const struct bond_option bond_opts[] = {
|
|
[BOND_OPT_MODE] = {
|
|
[BOND_OPT_MODE] = {
|
|
.id = BOND_OPT_MODE,
|
|
.id = BOND_OPT_MODE,
|
|
@@ -364,6 +372,15 @@ static const struct bond_option bond_opts[] = {
|
|
.flags = BOND_OPTFLAG_RAWVAL,
|
|
.flags = BOND_OPTFLAG_RAWVAL,
|
|
.set = bond_option_slaves_set
|
|
.set = bond_option_slaves_set
|
|
},
|
|
},
|
|
|
|
+ [BOND_OPT_TLB_DYNAMIC_LB] = {
|
|
|
|
+ .id = BOND_OPT_TLB_DYNAMIC_LB,
|
|
|
|
+ .name = "dynamic_lb",
|
|
|
|
+ .desc = "Enable dynamic flow shuffling",
|
|
|
|
+ .unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_TLB)),
|
|
|
|
+ .values = bond_tlb_dynamic_lb_tbl,
|
|
|
|
+ .flags = BOND_OPTFLAG_IFDOWN,
|
|
|
|
+ .set = bond_option_tlb_dynamic_lb_set,
|
|
|
|
+ },
|
|
{ }
|
|
{ }
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1337,3 +1354,13 @@ err_no_cmd:
|
|
ret = -EPERM;
|
|
ret = -EPERM;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+static int bond_option_tlb_dynamic_lb_set(struct bonding *bond,
|
|
|
|
+ const struct bond_opt_value *newval)
|
|
|
|
+{
|
|
|
|
+ pr_info("%s: Setting dynamic-lb to %s (%llu)\n",
|
|
|
|
+ bond->dev->name, newval->string, newval->value);
|
|
|
|
+ bond->params.tlb_dynamic_lb = newval->value;
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|