Thread (4 messages) flat view 4 messages, 3 authors, 2021-08-08

Re: [PATCH iproute2-next] ip/bond: add lacp active support

From: David Ahern <hidden>
Date: 2021-08-08 18:17:11

On 8/1/21 9:02 PM, Hangbin Liu wrote:
quoted hunk ↗ jump to hunk
@@ -316,6 +324,13 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
 
 			addattr32(n, 1024, IFLA_BOND_PACKETS_PER_SLAVE,
 				  packets_per_slave);
+		} else if (matches(*argv, "lacp_active") == 0) {
+			NEXT_ARG();
+			if (get_index(lacp_active_tbl, *argv) < 0)
+				invarg("invalid lacp_active", *argv);
+
+			lacp_active = get_index(lacp_active_tbl, *argv);
+			addattr8(n, 1024, IFLA_BOND_AD_LACP_ACTIVE, lacp_active);
 		} else if (matches(*argv, "lacp_rate") == 0) {
The new argument needs to go after the older "lacp_rate" since it uses
matches. Also, let's stop using matches and move to a full strcmp for
new options.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help