From: Paolo Abeni <pabeni@redhat.com>
To: David Wilder <wilder@us.ibm.com>, netdev@vger.kernel.org
Cc: jv@jvosburgh.net, pradeeps@linux.vnet.ibm.com,
pradeep@us.ibm.com, i.maximets@ovn.org, amorenoz@redhat.com,
haliu@redhat.com, stephen@networkplumber.org, horms@kernel.org
Subject: Re: [PATCH net-next v10 4/7] bonding: Processing extended arp_ip_target from user space.
Date: Tue, 9 Sep 2025 15:37:40 +0200 [thread overview]
Message-ID: <86d55600-3714-4394-a39d-eaff6847a6f0@redhat.com> (raw)
In-Reply-To: <20250904221956.779098-5-wilder@us.ibm.com>
On 9/5/25 12:18 AM, David Wilder wrote:
> diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> index cf4cb301a738..61334633403d 100644
> --- a/drivers/net/bonding/bond_options.c
> +++ b/drivers/net/bonding/bond_options.c
> @@ -31,8 +31,8 @@ static int bond_option_use_carrier_set(struct bonding *bond,
> const struct bond_opt_value *newval);
> static int bond_option_arp_interval_set(struct bonding *bond,
> const struct bond_opt_value *newval);
> -static int bond_option_arp_ip_target_add(struct bonding *bond, __be32 target);
> -static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target);
> +static int bond_option_arp_ip_target_add(struct bonding *bond, struct bond_arp_target target);
> +static int bond_option_arp_ip_target_rem(struct bonding *bond, struct bond_arp_target target);
Above and elsewhere:
'struct bond_arp_target' -> 'const struct bond_arp_target *'
Side note, I replied by mistake to older revision of this series:
https://lore.kernel.org/netdev/dbc791a9-7b87-42a8-abba-fa63e5812008@redhat.com/T/#u
https://lore.kernel.org/netdev/8c0b5b0a-60ee-4ed4-b439-11d5c106ac6e@redhat.com/T/#u
https://lore.kernel.org/netdev/add4dcf4-b3c2-40dd-bc2f-de80619e7c6f@redhat.com/T/#u
but the comments there apply to v10.
> @@ -1214,30 +1216,77 @@ static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target)
> targets_rx[i] = targets_rx[i+1];
> targets_rx[i] = 0;
> }
> - for (i = ind; (i < BOND_MAX_ARP_TARGETS - 1) && targets[i + 1].target_ip; i++)
> - targets[i] = targets[i+1];
> +
> + bond_free_vlan_tag(&targets[ind]);
> +
> + for (i = ind; (i < BOND_MAX_ARP_TARGETS - 1) && targets[i + 1].target_ip; i++) {
> + targets[i].target_ip = targets[i + 1].target_ip;
> + targets[i].tags = targets[i + 1].tags;
> + targets[i].flags = targets[i + 1].flags;
> + }
> targets[i].target_ip = 0;
> + targets[i].flags = 0;
> + targets[i].tags = NULL;
The above chunk of code is repeated elsewhere. Possibly factoring out
the initialization in an helper could be useful.
/P
next prev parent reply other threads:[~2025-09-09 13:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 22:18 [PATCH net-next v10 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 3/7] bonding: arp_ip_target helpers David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-09-09 13:37 ` Paolo Abeni [this message]
2025-09-09 18:42 ` Nikolay Aleksandrov
2025-09-10 21:19 ` David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-09-09 13:39 ` Paolo Abeni
2025-09-09 18:55 ` Nikolay Aleksandrov
2025-09-09 20:54 ` Jay Vosburgh
2025-09-09 21:08 ` Jay Vosburgh
2025-09-09 21:57 ` David Wilder
2025-09-04 22:18 ` [PATCH net-next v10 6/7] bonding: Update for extended arp_ip_target format David Wilder
2025-09-09 13:46 ` Paolo Abeni
2025-09-09 18:45 ` Nikolay Aleksandrov
2025-09-04 22:18 ` [PATCH net-next v10 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-09-09 13:51 ` Paolo Abeni
2025-09-09 13:54 ` [PATCH net-next v10 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags Nikolay Aleksandrov
2025-09-09 17:55 ` David Wilder
2025-09-09 18:04 ` Nikolay Aleksandrov
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=86d55600-3714-4394-a39d-eaff6847a6f0@redhat.com \
--to=pabeni@redhat.com \
--cc=amorenoz@redhat.com \
--cc=haliu@redhat.com \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=jv@jvosburgh.net \
--cc=netdev@vger.kernel.org \
--cc=pradeep@us.ibm.com \
--cc=pradeeps@linux.vnet.ibm.com \
--cc=stephen@networkplumber.org \
--cc=wilder@us.ibm.com \
/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).