From: Aahil Awatramani <aahila@google.com>
To: David Ahern <dsahern@gmail.com>
Cc: Mahesh Bandewar <maheshb@google.com>,
David Dillow <dillow@google.com>,
Jay Vosburgh <j.vosburgh@gmail.com>,
Hangbin Liu <liuhangbin@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] ip/bond: add coupled_control support
Date: Thu, 25 Jan 2024 15:11:39 -0800 [thread overview]
Message-ID: <CAGfWUPyDERLKTi2MSNY1ero7maFHAXmbZo11V5SFPkaCsC4J2A@mail.gmail.com> (raw)
In-Reply-To: <4f3dc357-8c90-49fd-96ea-bc28932ea509@gmail.com>
> This patch needs to be targeted at iproute2-next
> parse_on_off
> print_on_off
Thank you for your feedback. I have modified the patch name. I have
also dropped uapi and implemented the use of print_on_off and
parse_on_off for coupled_control as per David's suggestion.
On Thu, Jan 25, 2024 at 10:08 AM David Ahern <dsahern@gmail.com> wrote:
>
> On 1/24/24 5:38 PM, Aahil Awatramani wrote:
> > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
> > index d17271fb..ff4ceeaf 100644
> > --- a/include/uapi/linux/if_link.h
> > +++ b/include/uapi/linux/if_link.h
> > @@ -1503,6 +1503,7 @@ enum {
> > IFLA_BOND_AD_LACP_ACTIVE,
> > IFLA_BOND_MISSED_MAX,
> > IFLA_BOND_NS_IP6_TARGET,
> > + IFLA_BOND_COUPLED_CONTROL,
> > __IFLA_BOND_MAX,
> > };
> >
>
> at best uapi changes should be a separate patch which gets dropped when
> we sync headers with the kernel.
>
> > diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
> > index 214244da..68bc157a 100644
> > --- a/ip/iplink_bond.c
> > +++ b/ip/iplink_bond.c
> > @@ -176,7 +184,7 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> > {
> > __u8 mode, use_carrier, primary_reselect, fail_over_mac;
> > __u8 xmit_hash_policy, num_peer_notif, all_slaves_active;
> > - __u8 lacp_active, lacp_rate, ad_select, tlb_dynamic_lb;
> > + __u8 lacp_active, lacp_rate, ad_select, tlb_dynamic_lb, coupled_control;
> > __u16 ad_user_port_key, ad_actor_sys_prio;
> > __u32 miimon, updelay, downdelay, peer_notify_delay, arp_interval, arp_validate;
> > __u32 arp_all_targets, resend_igmp, min_links, lp_interval;
> > @@ -367,6 +375,13 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> >
> > lacp_active = get_index(lacp_active_tbl, *argv);
> > addattr8(n, 1024, IFLA_BOND_AD_LACP_ACTIVE, lacp_active);
> > + } else if (strcmp(*argv, "coupled_control") == 0) {
> > + NEXT_ARG();
> > + if (get_index(coupled_control_tbl, *argv) < 0)
> > + invarg("invalid coupled_control", *argv);
> > +
> > + coupled_control = get_index(coupled_control_tbl, *argv);
>
> parse_on_off
>
> > + addattr8(n, 1024, IFLA_BOND_COUPLED_CONTROL, coupled_control);
> > } else if (matches(*argv, "ad_select") == 0) {
> > NEXT_ARG();
> > if (get_index(ad_select_tbl, *argv) < 0)
> > @@ -659,6 +674,15 @@ static void bond_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> > lacp_rate);
> > }
> >
> > + if (tb[IFLA_BOND_COUPLED_CONTROL]) {
> > + const char *coupled_control = get_name(coupled_control_tbl,
> > + rta_getattr_u8(tb[IFLA_BOND_COUPLED_CONTROL]));
> > + print_string(PRINT_ANY,
> > + "coupled_control",
> > + "coupled_control %s ",
> > + coupled_control);
>
> print_on_off
>
> > + }
> > +
> > if (tb[IFLA_BOND_AD_SELECT]) {
> > const char *ad_select = get_name(ad_select_tbl,
> > rta_getattr_u8(tb[IFLA_BOND_AD_SELECT]));
>
> pw-bot: cr
prev parent reply other threads:[~2024-01-25 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 0:38 [PATCH] ip/bond: add coupled_control support Aahil Awatramani
2024-01-25 1:55 ` Stephen Hemminger
2024-01-25 18:08 ` David Ahern
2024-01-25 23:11 ` Aahil Awatramani [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGfWUPyDERLKTi2MSNY1ero7maFHAXmbZo11V5SFPkaCsC4J2A@mail.gmail.com \
--to=aahila@google.com \
--cc=dillow@google.com \
--cc=dsahern@gmail.com \
--cc=j.vosburgh@gmail.com \
--cc=liuhangbin@gmail.com \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).