All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 net-next 0/2] Bonding: add per-port priority support
@ 2022-06-21  7:49 Hangbin Liu
  2022-06-21  7:49 ` [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value Hangbin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Hangbin Liu @ 2022-06-21  7:49 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Jonathan Toppins, Paolo Abeni,
	David Ahern, Hangbin Liu

This patch set add per-port priority for bonding failover re-selection.

The first patch add a new filed for bond_opt_value so we can set slave
value easier. I will update the bond_option_queue_id_set() setting
in later patch.

The second patch add the per-port priority for bonding. I defined
it as s32 to compatible with team prio option, which also use a s32
value.

v3: store slave_dev in bond_opt_value directly to simplify setting
    values for slave.

v2: using the extant bonding options management stuff instead setting
    slave prio in bond_slave_changelink() directly.

Hangbin Liu (2):
  bonding: add slave_dev field for bond_opt_value
  Bonding: add per-port priority for failover re-selection

 Documentation/networking/bonding.rst | 11 ++++++++++
 drivers/net/bonding/bond_main.c      | 27 +++++++++++++++++++++++
 drivers/net/bonding/bond_netlink.c   | 15 +++++++++++++
 drivers/net/bonding/bond_options.c   | 33 ++++++++++++++++++++++++++++
 include/net/bond_options.h           | 11 ++++++++--
 include/net/bonding.h                |  1 +
 include/uapi/linux/if_link.h         |  1 +
 tools/include/uapi/linux/if_link.h   |  1 +
 8 files changed, 98 insertions(+), 2 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value
  2022-06-21  7:49 [PATCHv3 net-next 0/2] Bonding: add per-port priority support Hangbin Liu
@ 2022-06-21  7:49 ` Hangbin Liu
  2022-06-21 12:41   ` Jonathan Toppins
  2022-06-21  7:49 ` [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection Hangbin Liu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Hangbin Liu @ 2022-06-21  7:49 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Jonathan Toppins, Paolo Abeni,
	David Ahern, Hangbin Liu

Currently, bond_opt_value are mostly used for bonding option settings. If
we want to set a value for slave, we need to re-alloc a string to store
both slave name and vlaue, like bond_option_queue_id_set() does, which
is complex and dumb.

As Jon suggested, let's add a union field slave_dev for bond_opt_value,
which will be benefit for future slave option setting. In function
__bond_opt_init(), we will always check the extra field and set it
if it's not NULL.

Suggested-by: Jonathan Toppins <jtoppins@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 include/net/bond_options.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/net/bond_options.h b/include/net/bond_options.h
index 1618b76f4903..eade8236a4df 100644
--- a/include/net/bond_options.h
+++ b/include/net/bond_options.h
@@ -83,7 +83,10 @@ struct bond_opt_value {
 	char *string;
 	u64 value;
 	u32 flags;
-	char extra[BOND_OPT_EXTRA_MAXLEN];
+	union {
+		char extra[BOND_OPT_EXTRA_MAXLEN];
+		struct net_device *slave_dev;
+	};
 };
 
 struct bonding;
@@ -133,13 +136,16 @@ static inline void __bond_opt_init(struct bond_opt_value *optval,
 		optval->value = value;
 	else if (string)
 		optval->string = string;
-	else if (extra_len <= BOND_OPT_EXTRA_MAXLEN)
+
+	if (extra && extra_len <= BOND_OPT_EXTRA_MAXLEN)
 		memcpy(optval->extra, extra, extra_len);
 }
 #define bond_opt_initval(optval, value) __bond_opt_init(optval, NULL, value, NULL, 0)
 #define bond_opt_initstr(optval, str) __bond_opt_init(optval, str, ULLONG_MAX, NULL, 0)
 #define bond_opt_initextra(optval, extra, extra_len) \
 	__bond_opt_init(optval, NULL, ULLONG_MAX, extra, extra_len)
+#define bond_opt_slave_initval(optval, slave_dev, value) \
+	__bond_opt_init(optval, NULL, value, slave_dev, sizeof(struct net_device *))
 
 void bond_option_arp_ip_targets_clear(struct bonding *bond);
 #if IS_ENABLED(CONFIG_IPV6)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection
  2022-06-21  7:49 [PATCHv3 net-next 0/2] Bonding: add per-port priority support Hangbin Liu
  2022-06-21  7:49 ` [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value Hangbin Liu
@ 2022-06-21  7:49 ` Hangbin Liu
  2022-06-21 12:43   ` Jonathan Toppins
  2022-06-21  7:51 ` [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
  2022-06-24 10:50 ` [PATCHv3 net-next 0/2] Bonding: add per-port priority support patchwork-bot+netdevbpf
  3 siblings, 1 reply; 9+ messages in thread
From: Hangbin Liu @ 2022-06-21  7:49 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Jonathan Toppins, Paolo Abeni,
	David Ahern, Hangbin Liu

Add per port priority support for bonding active slave re-selection during
failover. A higher number means higher priority in selection. The primary
slave still has the highest priority. This option also follows the
primary_reselect rules.

This option could only be configured via netlink.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
v3: store slave_dev in bond_opt_value directly to simplify setting
    values for slave.

v2: using the extant bonding options management stuff instead setting
    slave prio in bond_slave_changelink() directly.
---
 Documentation/networking/bonding.rst | 11 ++++++++++
 drivers/net/bonding/bond_main.c      | 27 +++++++++++++++++++++++
 drivers/net/bonding/bond_netlink.c   | 15 +++++++++++++
 drivers/net/bonding/bond_options.c   | 33 ++++++++++++++++++++++++++++
 include/net/bond_options.h           |  1 +
 include/net/bonding.h                |  1 +
 include/uapi/linux/if_link.h         |  1 +
 tools/include/uapi/linux/if_link.h   |  1 +
 8 files changed, 90 insertions(+)

diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst
index 43be3782e5df..53a18ff7cf23 100644
--- a/Documentation/networking/bonding.rst
+++ b/Documentation/networking/bonding.rst
@@ -780,6 +780,17 @@ peer_notif_delay
 	value is 0 which means to match the value of the link monitor
 	interval.
 
+prio
+	Slave priority. A higher number means higher priority.
+	The primary slave has the highest priority. This option also
+	follows the primary_reselect rules.
+
+	This option could only be configured via netlink, and is only valid
+	for active-backup(1), balance-tlb (5) and balance-alb (6) mode.
+	The valid value range is a signed 32 bit integer.
+
+	The default value is 0.
+
 primary
 
 	A string (eth0, eth2, etc) specifying which slave is the
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 3d427183ec8e..3415a0feea07 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1026,12 +1026,38 @@ static void bond_do_fail_over_mac(struct bonding *bond,
 
 }
 
+/**
+ * bond_choose_primary_or_current - select the primary or high priority slave
+ * @bond: our bonding struct
+ *
+ * - Check if there is a primary link. If the primary link was set and is up,
+ *   go on and do link reselection.
+ *
+ * - If primary link is not set or down, find the highest priority link.
+ *   If the highest priority link is not current slave, set it as primary
+ *   link and do link reselection.
+ */
 static struct slave *bond_choose_primary_or_current(struct bonding *bond)
 {
 	struct slave *prim = rtnl_dereference(bond->primary_slave);
 	struct slave *curr = rtnl_dereference(bond->curr_active_slave);
+	struct slave *slave, *hprio = NULL;
+	struct list_head *iter;
 
 	if (!prim || prim->link != BOND_LINK_UP) {
+		bond_for_each_slave(bond, slave, iter) {
+			if (slave->link == BOND_LINK_UP) {
+				hprio = hprio ?: slave;
+				if (slave->prio > hprio->prio)
+					hprio = slave;
+			}
+		}
+
+		if (hprio && hprio != curr) {
+			prim = hprio;
+			goto link_reselect;
+		}
+
 		if (!curr || curr->link != BOND_LINK_UP)
 			return NULL;
 		return curr;
@@ -1042,6 +1068,7 @@ static struct slave *bond_choose_primary_or_current(struct bonding *bond)
 		return prim;
 	}
 
+link_reselect:
 	if (!curr || curr->link != BOND_LINK_UP)
 		return prim;
 
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index 5a6f44455b95..c2d080fc4fc4 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -27,6 +27,7 @@ static size_t bond_get_slave_size(const struct net_device *bond_dev,
 		nla_total_size(sizeof(u16)) +	/* IFLA_BOND_SLAVE_AD_AGGREGATOR_ID */
 		nla_total_size(sizeof(u8)) +	/* IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE */
 		nla_total_size(sizeof(u16)) +	/* IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE */
+		nla_total_size(sizeof(s32)) +	/* IFLA_BOND_SLAVE_PRIO */
 		0;
 }
 
@@ -53,6 +54,9 @@ static int bond_fill_slave_info(struct sk_buff *skb,
 	if (nla_put_u16(skb, IFLA_BOND_SLAVE_QUEUE_ID, slave->queue_id))
 		goto nla_put_failure;
 
+	if (nla_put_s32(skb, IFLA_BOND_SLAVE_PRIO, slave->prio))
+		goto nla_put_failure;
+
 	if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) {
 		const struct aggregator *agg;
 		const struct port *ad_port;
@@ -117,6 +121,7 @@ static const struct nla_policy bond_policy[IFLA_BOND_MAX + 1] = {
 
 static const struct nla_policy bond_slave_policy[IFLA_BOND_SLAVE_MAX + 1] = {
 	[IFLA_BOND_SLAVE_QUEUE_ID]	= { .type = NLA_U16 },
+	[IFLA_BOND_SLAVE_PRIO]		= { .type = NLA_S32 },
 };
 
 static int bond_validate(struct nlattr *tb[], struct nlattr *data[],
@@ -157,6 +162,16 @@ static int bond_slave_changelink(struct net_device *bond_dev,
 			return err;
 	}
 
+	if (data[IFLA_BOND_SLAVE_PRIO]) {
+		int prio = nla_get_s32(data[IFLA_BOND_SLAVE_PRIO]);
+
+		bond_opt_slave_initval(&newval, &slave_dev, prio);
+		err = __bond_opt_set(bond, BOND_OPT_PRIO, &newval,
+				     data[IFLA_BOND_SLAVE_PRIO], extack);
+		if (err)
+			return err;
+	}
+
 	return 0;
 }
 
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 96eef19cffc4..3498db1c1b3c 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -40,6 +40,8 @@ static int bond_option_arp_validate_set(struct bonding *bond,
 					const struct bond_opt_value *newval);
 static int bond_option_arp_all_targets_set(struct bonding *bond,
 					   const struct bond_opt_value *newval);
+static int bond_option_prio_set(struct bonding *bond,
+				const struct bond_opt_value *newval);
 static int bond_option_primary_set(struct bonding *bond,
 				   const struct bond_opt_value *newval);
 static int bond_option_primary_reselect_set(struct bonding *bond,
@@ -365,6 +367,16 @@ static const struct bond_option bond_opts[BOND_OPT_LAST] = {
 		.values = bond_intmax_tbl,
 		.set = bond_option_miimon_set
 	},
+	[BOND_OPT_PRIO] = {
+		.id = BOND_OPT_PRIO,
+		.name = "prio",
+		.desc = "Link priority for failover re-selection",
+		.flags = BOND_OPTFLAG_RAWVAL,
+		.unsuppmodes = BOND_MODE_ALL_EX(BIT(BOND_MODE_ACTIVEBACKUP) |
+						BIT(BOND_MODE_TLB) |
+						BIT(BOND_MODE_ALB)),
+		.set = bond_option_prio_set
+	},
 	[BOND_OPT_PRIMARY] = {
 		.id = BOND_OPT_PRIMARY,
 		.name = "primary",
@@ -1306,6 +1318,27 @@ static int bond_option_missed_max_set(struct bonding *bond,
 	return 0;
 }
 
+static int bond_option_prio_set(struct bonding *bond,
+				const struct bond_opt_value *newval)
+{
+	struct slave *slave;
+
+	slave = bond_slave_get_rtnl(newval->slave_dev);
+	if (!slave) {
+		netdev_dbg(newval->slave_dev, "%s called on NULL slave\n", __func__);
+		return -ENODEV;
+	}
+	slave->prio = newval->value;
+
+	if (rtnl_dereference(bond->primary_slave))
+		slave_warn(bond->dev, slave->dev,
+			   "prio updated, but will not affect failover re-selection as primary slave have been set\n");
+	else
+		bond_select_active_slave(bond);
+
+	return 0;
+}
+
 static int bond_option_primary_set(struct bonding *bond,
 				   const struct bond_opt_value *newval)
 {
diff --git a/include/net/bond_options.h b/include/net/bond_options.h
index eade8236a4df..d2aea5cf1e41 100644
--- a/include/net/bond_options.h
+++ b/include/net/bond_options.h
@@ -67,6 +67,7 @@ enum {
 	BOND_OPT_LACP_ACTIVE,
 	BOND_OPT_MISSED_MAX,
 	BOND_OPT_NS_TARGETS,
+	BOND_OPT_PRIO,
 	BOND_OPT_LAST
 };
 
diff --git a/include/net/bonding.h b/include/net/bonding.h
index cb904d356e31..6e78d657aa05 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -178,6 +178,7 @@ struct slave {
 	u32    speed;
 	u16    queue_id;
 	u8     perm_hwaddr[MAX_ADDR_LEN];
+	int    prio;
 	struct ad_slave_info *ad_info;
 	struct tlb_slave_info tlb_info;
 #ifdef CONFIG_NET_POLL_CONTROLLER
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 5f58dcfe2787..e36d9d2c65a7 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -963,6 +963,7 @@ enum {
 	IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
 	IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
 	IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
+	IFLA_BOND_SLAVE_PRIO,
 	__IFLA_BOND_SLAVE_MAX,
 };
 
diff --git a/tools/include/uapi/linux/if_link.h b/tools/include/uapi/linux/if_link.h
index b339bf2196ca..0242f31e339c 100644
--- a/tools/include/uapi/linux/if_link.h
+++ b/tools/include/uapi/linux/if_link.h
@@ -890,6 +890,7 @@ enum {
 	IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
 	IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
 	IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
+	IFLA_BOND_SLAVE_PRIO,
 	__IFLA_BOND_SLAVE_MAX,
 };
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support
  2022-06-21  7:49 [PATCHv3 net-next 0/2] Bonding: add per-port priority support Hangbin Liu
  2022-06-21  7:49 ` [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value Hangbin Liu
  2022-06-21  7:49 ` [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection Hangbin Liu
@ 2022-06-21  7:51 ` Hangbin Liu
  2022-06-21 12:44   ` Jonathan Toppins
  2022-06-26 17:30   ` patchwork-bot+netdevbpf
  2022-06-24 10:50 ` [PATCHv3 net-next 0/2] Bonding: add per-port priority support patchwork-bot+netdevbpf
  3 siblings, 2 replies; 9+ messages in thread
From: Hangbin Liu @ 2022-06-21  7:51 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Jonathan Toppins, Paolo Abeni,
	David Ahern, Hangbin Liu

Add per port priority support for active slave re-selection during
bonding failover. A higher number means higher priority.

This option is only valid for active-backup(1), balance-tlb (5) and
balance-alb (6) mode.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
v3: no update
v2: update man page
---
 ip/iplink_bond_slave.c | 12 +++++++++++-
 man/man8/ip-link.8.in  |  8 ++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/ip/iplink_bond_slave.c b/ip/iplink_bond_slave.c
index d488aaab..8103704b 100644
--- a/ip/iplink_bond_slave.c
+++ b/ip/iplink_bond_slave.c
@@ -19,7 +19,7 @@
 
 static void print_explain(FILE *f)
 {
-	fprintf(f, "Usage: ... bond_slave [ queue_id ID ]\n");
+	fprintf(f, "Usage: ... bond_slave [ queue_id ID ] [ prio PRIORITY ]\n");
 }
 
 static void explain(void)
@@ -120,6 +120,10 @@ static void bond_slave_print_opt(struct link_util *lu, FILE *f, struct rtattr *t
 			  "queue_id %d ",
 			  rta_getattr_u16(tb[IFLA_BOND_SLAVE_QUEUE_ID]));
 
+	if (tb[IFLA_BOND_SLAVE_PRIO])
+		print_int(PRINT_ANY, "prio", "prio %d ",
+			  rta_getattr_s32(tb[IFLA_BOND_SLAVE_PRIO]));
+
 	if (tb[IFLA_BOND_SLAVE_AD_AGGREGATOR_ID])
 		print_int(PRINT_ANY,
 			  "ad_aggregator_id",
@@ -151,6 +155,7 @@ static int bond_slave_parse_opt(struct link_util *lu, int argc, char **argv,
 				struct nlmsghdr *n)
 {
 	__u16 queue_id;
+	int prio;
 
 	while (argc > 0) {
 		if (matches(*argv, "queue_id") == 0) {
@@ -158,6 +163,11 @@ static int bond_slave_parse_opt(struct link_util *lu, int argc, char **argv,
 			if (get_u16(&queue_id, *argv, 0))
 				invarg("queue_id is invalid", *argv);
 			addattr16(n, 1024, IFLA_BOND_SLAVE_QUEUE_ID, queue_id);
+		} else if (strcmp(*argv, "prio") == 0) {
+			NEXT_ARG();
+			if (get_s32(&prio, *argv, 0))
+				invarg("prio is invalid", *argv);
+			addattr32(n, 1024, IFLA_BOND_SLAVE_PRIO, prio);
 		} else {
 			if (matches(*argv, "help") != 0)
 				fprintf(stderr,
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 6f332645..3dbcdbb6 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -2567,6 +2567,8 @@ the following additional arguments are supported:
 .B "ip link set type bond_slave"
 [
 .BI queue_id " ID"
+] [
+.BI prio " PRIORITY"
 ]
 
 .in +8
@@ -2574,6 +2576,12 @@ the following additional arguments are supported:
 .BI queue_id " ID"
 - set the slave's queue ID (a 16bit unsigned value).
 
+.sp
+.BI prio " PRIORITY"
+- set the slave's priority for active slave re-selection during failover
+(a 32bit signed value). This option only valid for active-backup(1),
+balance-tlb (5) and balance-alb (6) mode.
+
 .in -8
 
 .TP
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value
  2022-06-21  7:49 ` [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value Hangbin Liu
@ 2022-06-21 12:41   ` Jonathan Toppins
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Toppins @ 2022-06-21 12:41 UTC (permalink / raw)
  To: Hangbin Liu, netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern

On 6/21/22 03:49, Hangbin Liu wrote:
> Currently, bond_opt_value are mostly used for bonding option settings. If
> we want to set a value for slave, we need to re-alloc a string to store
> both slave name and vlaue, like bond_option_queue_id_set() does, which
> is complex and dumb.
> 
> As Jon suggested, let's add a union field slave_dev for bond_opt_value,
> which will be benefit for future slave option setting. In function
> __bond_opt_init(), we will always check the extra field and set it
> if it's not NULL.
> 
> Suggested-by: Jonathan Toppins <jtoppins@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Acked-by: Jonathan Toppins <jtoppins@redhat.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection
  2022-06-21  7:49 ` [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection Hangbin Liu
@ 2022-06-21 12:43   ` Jonathan Toppins
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Toppins @ 2022-06-21 12:43 UTC (permalink / raw)
  To: Hangbin Liu, netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern

On 6/21/22 03:49, Hangbin Liu wrote:
> Add per port priority support for bonding active slave re-selection during
> failover. A higher number means higher priority in selection. The primary
> slave still has the highest priority. This option also follows the
> primary_reselect rules.
> 
> This option could only be configured via netlink.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Acked-by: Jonathan Toppins <jtoppins@redhat.com>

> ---
> v3: store slave_dev in bond_opt_value directly to simplify setting
>      values for slave.
> 
> v2: using the extant bonding options management stuff instead setting
>      slave prio in bond_slave_changelink() directly.
> ---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support
  2022-06-21  7:51 ` [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
@ 2022-06-21 12:44   ` Jonathan Toppins
  2022-06-26 17:30   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Toppins @ 2022-06-21 12:44 UTC (permalink / raw)
  To: Hangbin Liu, netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern

On 6/21/22 03:51, Hangbin Liu wrote:
> Add per port priority support for active slave re-selection during
> bonding failover. A higher number means higher priority.
> 
> This option is only valid for active-backup(1), balance-tlb (5) and
> balance-alb (6) mode.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Acked-by: Jonathan Toppins <jtoppins@redhat.com>

> ---
> v3: no update
> v2: update man page
> ---
>   ip/iplink_bond_slave.c | 12 +++++++++++-
>   man/man8/ip-link.8.in  |  8 ++++++++
>   2 files changed, 19 insertions(+), 1 deletion(-)
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv3 net-next 0/2] Bonding: add per-port priority support
  2022-06-21  7:49 [PATCHv3 net-next 0/2] Bonding: add per-port priority support Hangbin Liu
                   ` (2 preceding siblings ...)
  2022-06-21  7:51 ` [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
@ 2022-06-24 10:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-24 10:50 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, j.vosburgh, vfalico, andy, davem, kuba, jtoppins, pabeni,
	dsahern

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 21 Jun 2022 15:49:17 +0800 you wrote:
> This patch set add per-port priority for bonding failover re-selection.
> 
> The first patch add a new filed for bond_opt_value so we can set slave
> value easier. I will update the bond_option_queue_id_set() setting
> in later patch.
> 
> The second patch add the per-port priority for bonding. I defined
> it as s32 to compatible with team prio option, which also use a s32
> value.
> 
> [...]

Here is the summary with links:
  - [PATCHv3,net-next,1/2] bonding: add slave_dev field for bond_opt_value
    https://git.kernel.org/netdev/net-next/c/f2b3b28ce523
  - [PATCHv3,net-next,2/2] Bonding: add per-port priority for failover re-selection
    https://git.kernel.org/netdev/net-next/c/0a2ff7cc8ad4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support
  2022-06-21  7:51 ` [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
  2022-06-21 12:44   ` Jonathan Toppins
@ 2022-06-26 17:30   ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-26 17:30 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, j.vosburgh, vfalico, andy, davem, kuba, jtoppins, pabeni,
	dsahern

Hello:

This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Tue, 21 Jun 2022 15:51:05 +0800 you wrote:
> Add per port priority support for active slave re-selection during
> bonding failover. A higher number means higher priority.
> 
> This option is only valid for active-backup(1), balance-tlb (5) and
> balance-alb (6) mode.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> 
> [...]

Here is the summary with links:
  - [PATCHv3,iproute2-next] iplink: bond_slave: add per port prio support
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=a10a197d715d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-26 17:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  7:49 [PATCHv3 net-next 0/2] Bonding: add per-port priority support Hangbin Liu
2022-06-21  7:49 ` [PATCHv3 net-next 1/2] bonding: add slave_dev field for bond_opt_value Hangbin Liu
2022-06-21 12:41   ` Jonathan Toppins
2022-06-21  7:49 ` [PATCHv3 net-next 2/2] Bonding: add per-port priority for failover re-selection Hangbin Liu
2022-06-21 12:43   ` Jonathan Toppins
2022-06-21  7:51 ` [PATCHv3 iproute2-next] iplink: bond_slave: add per port prio support Hangbin Liu
2022-06-21 12:44   ` Jonathan Toppins
2022-06-26 17:30   ` patchwork-bot+netdevbpf
2022-06-24 10:50 ` [PATCHv3 net-next 0/2] Bonding: add per-port priority support patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.