Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Jiri Pirko <jiri@resnulli.us>,
	Ido Schimmel <idosch@idosch.org>, Roopa Prabhu <roopa@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next] net: bridge: propagate error code and extack from br_mc_disabled_update
Date: Wed, 14 Apr 2021 18:13:33 +0300	[thread overview]
Message-ID: <20210414151333.jvrhaesom43cwpcp@skbuf> (raw)
In-Reply-To: <3fb316d9-8ba2-78d2-ac0c-1fab5de09da8@nvidia.com>

On Wed, Apr 14, 2021 at 05:58:04PM +0300, Nikolay Aleksandrov wrote:
> > @@ -3607,7 +3619,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val)
> >  			br_multicast_leave_snoopers(br);
> >  	}
> >  
> > -	return 0;
> > +	return err;
> 
> Here won't you return EOPNOTSUPP even though everything above was successful ?
> I mean if br_mc_disabled_update() returns -EOPNOTSUPP it will just be returned
> and the caller would think there was an error.
> 
> Did you try running the bridge selftests with this patch ?
> 
> Thanks,
>  Nik

Thanks, this is a good point. I think I should just do this instead:
	if (err == -EOPNOTSUPP)
		err = 0;
	if (err)
		...

And I haven't run the bridge selftests. You are talking about:
tools/testing/selftests/net/forwarding/bridge_{igmp,mld}.sh
right?

  reply	other threads:[~2021-04-14 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 14:34 [PATCH net-next] net: bridge: propagate error code and extack from br_mc_disabled_update Vladimir Oltean
2021-04-14 14:58 ` Nikolay Aleksandrov
2021-04-14 15:13   ` Vladimir Oltean [this message]
2021-04-14 15:16     ` 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=20210414151333.jvrhaesom43cwpcp@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=vladimir.oltean@nxp.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