netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Nikolay Aleksandrov <razor@blackwall.org>
Cc: netdev@vger.kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
	Andy Gospodarek <andy@greyhouse.net>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 net 1/2] bonding: add ns target multicast address to slave device
Date: Mon, 11 Nov 2024 10:05:42 +0000	[thread overview]
Message-ID: <ZzHW9llUizisMk3u@fedora> (raw)
In-Reply-To: <ZytEBmPmqHwfCIzo@penguin>

On Wed, Nov 06, 2024 at 12:25:10PM +0200, Nikolay Aleksandrov wrote:
> > diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> > index 95d59a18c022..60368cef2704 100644
> > --- a/drivers/net/bonding/bond_options.c
> > +++ b/drivers/net/bonding/bond_options.c
> > @@ -15,6 +15,7 @@
> >  #include <linux/sched/signal.h>
> >  
> >  #include <net/bonding.h>
> > +#include <net/ndisc.h>
> >  
> >  static int bond_option_active_slave_set(struct bonding *bond,
> >  					const struct bond_opt_value *newval);
> > @@ -1234,6 +1235,64 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
> >  }
> >  
> >  #if IS_ENABLED(CONFIG_IPV6)
> > +static bool slave_can_set_ns_maddr(struct bonding *bond, struct slave *slave)
> 
> const bond/slave
> 
> > +{
> > +	return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP &&
> > +	       !bond_is_active_slave(slave) &&
> > +	       slave->dev->flags & IFF_MULTICAST;
> > +}

Hi, FYI, in new patch I only set bond to const as slave will be called
by bond_is_active_slave().

Thanks
Hangbin

  parent reply	other threads:[~2024-11-11 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  5:14 [PATCHv3 net 0/2] bonding: fix ns targets not work on hardware NIC Hangbin Liu
2024-11-06  5:14 ` [PATCHv3 net 1/2] bonding: add ns target multicast address to slave device Hangbin Liu
2024-11-06 10:25   ` Nikolay Aleksandrov
2024-11-06 10:35     ` Hangbin Liu
2024-11-11 10:05     ` Hangbin Liu [this message]
2024-11-12 13:50       ` Nikolay Aleksandrov
2024-11-06  5:14 ` [PATCHv3 net 2/2] selftests: bonding: add ns multicast group testing Hangbin Liu

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=ZzHW9llUizisMk3u@fedora \
    --to=liuhangbin@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.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).