From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <stephen@networkplumber.org>,
"moderated list:ETHERNET BRIDGE"
<bridge@lists.linux-foundation.org>
Subject: Re: [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails
Date: Thu, 18 May 2017 18:25:11 +0300 [thread overview]
Message-ID: <1211f3cb-c5f5-a9bd-638b-bfcb99fd1bed@cumulusnetworks.com> (raw)
In-Reply-To: <877f1edwxp.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
On 5/18/17 6:08 PM, Vivien Didelot wrote:
> Hi Nikolay,
>
> Nikolay Aleksandrov <nikolay@cumulusnetworks.com> writes:
>
>>> err = __br_mdb_del(br, entry);
>>> - if (!err)
>>> - __br_mdb_notify(dev, p, entry, RTM_DELMDB);
>>> + if (err)
>>> + break;
>>> + __br_mdb_notify(dev, p, entry, RTM_DELMDB);
>>> }
>>> } else {
>>> err = __br_mdb_del(br, entry);
>>>
>>
>> This can potentially break user-space scripts that rely on the best-effort
>> behaviour, this is the normal "delete without vid & enabled vlan filtering".
>> You can check the fdb delete code which does the same, this was intentional.
>>
>> You can add an mdb entry without a vid to all vlans, add a vlan and then try
>> to remove it from all vlans where it is present - with this patch obviously
>> that will fail at the new vlan.
>
> OK good to know. That intention wasn't obvious. I can make __br_mdb_del
> return void instead? What about the rest of the patchset if I do so?
>
> Thanks,
>
> Vivien
>
If you make it return void we will not be able to return proper error value
when doing a single operation (the else case). About the rest I see only some
minor style issues, I'll comment on the respective patches. Another minor nit is
using switch() instead of if/else for the message types but that is really up to
you, I don't mind either way. :-)
Cheers,
Nik
next prev parent reply other threads:[~2017-05-18 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 21:27 [PATCH net-next 0/6] net: bridge: factorize MDB new and del functions Vivien Didelot
2017-05-17 21:27 ` [PATCH net-next 1/6] net: bridge: pass net_bridge_port to __br_mdb_add Vivien Didelot
2017-05-17 21:27 ` [PATCH net-next 2/6] net: bridge: check multicast bridge only once Vivien Didelot
2017-05-17 21:27 ` [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails Vivien Didelot
2017-05-18 13:45 ` Nikolay Aleksandrov
2017-05-18 15:08 ` Vivien Didelot
2017-05-18 15:25 ` Nikolay Aleksandrov [this message]
2017-05-18 15:45 ` Vivien Didelot
2017-05-17 21:27 ` [PATCH net-next 4/6] net: bridge: add __br_mdb_do Vivien Didelot
2017-05-17 21:27 ` [PATCH net-next 5/6] net: bridge: get msgtype from nlmsghdr in mdb ops Vivien Didelot
2017-05-18 15:28 ` Nikolay Aleksandrov
2017-05-18 15:53 ` [SPAM]Re: " Vivien Didelot
2017-05-18 17:01 ` Nikolay Aleksandrov
2017-05-17 21:27 ` [PATCH net-next 6/6] net: bridge: add br_mdb_do Vivien Didelot
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=1211f3cb-c5f5-a9bd-638b-bfcb99fd1bed@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=vivien.didelot@savoirfairelinux.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