All of lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: Re: [PATCH net-next v5 3/7] bonding: arp_ip_target helpers.
Date: Tue, 9 Sep 2025 15:25:32 +0200	[thread overview]
Message-ID: <add4dcf4-b3c2-40dd-bc2f-de80619e7c6f@redhat.com> (raw)
In-Reply-To: <20250714225533.1490032-4-wilder@us.ibm.com>

On 7/15/25 12:54 AM, David Wilder wrote:
> diff --git a/include/net/bonding.h b/include/net/bonding.h
> index 27fbce667a4c..1989b71ffa16 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
> @@ -809,4 +809,49 @@ static inline netdev_tx_t bond_tx_drop(struct net_device *dev, struct sk_buff *s
>  	return NET_XMIT_DROP;
>  }
>  
> +/* Helpers for handling arp_ip_target */
> +#define BOND_OPTION_STRING_MAX_SIZE 64
> +#define BOND_VLAN_PROTO_NONE cpu_to_be16(0xffff)
> +
> +static inline char *bond_arp_target_to_string(struct bond_arp_target *target,
> +					    char *buf, int size)
> +{
> +	struct bond_vlan_tag *tags = target->tags;
> +	int i, num = 0;
> +
> +	if (!(target->flags & BOND_TARGET_USERTAGS)) {
> +		num = snprintf(&buf[0], size, "%pI4", &target->target_ip);
> +		return buf;
> +	}
> +
> +	num = snprintf(&buf[0], size, "%pI4[", &target->target_ip);
> +	if (tags) {
> +		for (i = 0; (tags[i].vlan_proto != BOND_VLAN_PROTO_NONE); i++) {
> +			if (!tags[i].vlan_id)
> +				continue;
> +			if (i != 0)
> +				num = num + snprintf(&buf[num], size-num, "/");
> +			num = num + snprintf(&buf[num], size-num, "%u",

Minor nits above: 'size-num' -> 'size - num'

/P


  reply	other threads:[~2025-09-09 13:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 22:54 [PATCH net-next v5 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-07-14 22:54 ` [PATCH net-next v5 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-09-09 13:21   ` Paolo Abeni
2025-09-10 16:30     ` David Wilder
2025-07-14 22:54 ` [PATCH net-next v5 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-09-09 13:23   ` Paolo Abeni
2025-09-10 16:23     ` David Wilder
2025-07-14 22:54 ` [PATCH net-next v5 3/7] bonding: arp_ip_target helpers David Wilder
2025-09-09 13:25   ` Paolo Abeni [this message]
2025-07-14 22:54 ` [PATCH net-next v5 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-07-14 22:54 ` [PATCH net-next v5 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-07-14 22:54 ` [PATCH net-next v5 6/7] bonding: Update for extended arp_ip_target format David Wilder
2025-07-15 13:58   ` Simon Horman
2025-07-15 18:22     ` David Wilder
2025-07-16  9:00       ` Simon Horman
2025-07-16  9:17   ` kernel test robot
2025-07-14 22:54 ` [PATCH net-next v5 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-07-15 13:59   ` Simon Horman

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=add4dcf4-b3c2-40dd-bc2f-de80619e7c6f@redhat.com \
    --to=pabeni@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=haliu@redhat.com \
    --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=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 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.