All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nikolay@cumulusnetworks.com
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
	bridge@lists.linux-foundation.org, mrv@mojatatu.com,
	dsa@cumulusnetworks.com
Subject: Re: [PATCH net-next v6 0/2] bridge: make setlink/dellink notifications more accurate
Date: Sun, 29 Oct 2017 11:04:05 +0900 (KST)	[thread overview]
Message-ID: <20171029.110405.363445271511169384.davem@davemloft.net> (raw)
In-Reply-To: <1509099577-5959-1-git-send-email-nikolay@cumulusnetworks.com>

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Fri, 27 Oct 2017 13:19:35 +0300

> Before this set the bridge would generate a notification on vlan add or del
> even if they didn't actually do any changes, which confuses listeners and
> is generally not preferred. We could also lose notifications on actual
> changes if one adds a range of vlans and there's an error in the middle.
> The problem with just breaking and returning an error is that we could
> break existing user-space scripts which rely on the vlan delete to clear
> all existing entries in the specified range and ignore the non-existing
> errors (typically used to clear the current vlan config).
> So in order to make the notifications more accurate while keeping backwards
> compatibility we add a boolean that tracks if anything actually changed
> during the config calls.
> 
> The vlan add is more difficult to fix because it always returns 0 even if
> nothing changed, but we cannot use a specific error because the drivers
> can return anything and we may mask it, also we'd need to update all places
> that directly return the add result, thus to signal that a vlan was created
> or updated and in order not to break overlapping vlan range add we pass
> down the new boolean that tracks changes to the add functions to check
> if anything was actually updated.
> 
> v6: moved "changed" in else branch in br|nbp_vlan_add, thanks to
>     Toshiaki Makita and retested everything again
> v5: fix br_vlan_add return (v1 leftover) spotted by Toshiaki Makita
> v4: set changed always to false in the non-vlan config case and retested
> v3: rebased to latest net-next and fixed non-vlan config functions reported
>     by kbuild test bot
> v2: pass changed down to vlan add instead of masking errors

Series applied, thank you.

WARNING: multiple messages have this Message-ID (diff)
From: David Miller <davem@davemloft.net>
To: nikolay@cumulusnetworks.com
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
	bridge@lists.linux-foundation.org, mrv@mojatatu.com,
	dsa@cumulusnetworks.com
Subject: Re: [Bridge] [PATCH net-next v6 0/2] bridge: make setlink/dellink notifications more accurate
Date: Sun, 29 Oct 2017 11:04:05 +0900 (KST)	[thread overview]
Message-ID: <20171029.110405.363445271511169384.davem@davemloft.net> (raw)
In-Reply-To: <1509099577-5959-1-git-send-email-nikolay@cumulusnetworks.com>

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Fri, 27 Oct 2017 13:19:35 +0300

> Before this set the bridge would generate a notification on vlan add or del
> even if they didn't actually do any changes, which confuses listeners and
> is generally not preferred. We could also lose notifications on actual
> changes if one adds a range of vlans and there's an error in the middle.
> The problem with just breaking and returning an error is that we could
> break existing user-space scripts which rely on the vlan delete to clear
> all existing entries in the specified range and ignore the non-existing
> errors (typically used to clear the current vlan config).
> So in order to make the notifications more accurate while keeping backwards
> compatibility we add a boolean that tracks if anything actually changed
> during the config calls.
> 
> The vlan add is more difficult to fix because it always returns 0 even if
> nothing changed, but we cannot use a specific error because the drivers
> can return anything and we may mask it, also we'd need to update all places
> that directly return the add result, thus to signal that a vlan was created
> or updated and in order not to break overlapping vlan range add we pass
> down the new boolean that tracks changes to the add functions to check
> if anything was actually updated.
> 
> v6: moved "changed" in else branch in br|nbp_vlan_add, thanks to
>     Toshiaki Makita and retested everything again
> v5: fix br_vlan_add return (v1 leftover) spotted by Toshiaki Makita
> v4: set changed always to false in the non-vlan config case and retested
> v3: rebased to latest net-next and fixed non-vlan config functions reported
>     by kbuild test bot
> v2: pass changed down to vlan add instead of masking errors

Series applied, thank you.

  parent reply	other threads:[~2017-10-29  2:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 13:41 [PATCH net-next v5 0/2] bridge: make setlink/dellink notifications more accurate Nikolay Aleksandrov
2017-10-26 13:41 ` [Bridge] " Nikolay Aleksandrov
2017-10-26 13:41 ` [PATCH net-next v5 1/2] bridge: netlink: " Nikolay Aleksandrov
2017-10-26 13:41   ` [Bridge] " Nikolay Aleksandrov
2017-10-26 13:41 ` [PATCH net-next v5 2/2] bridge: vlan: signal if anything changed on vlan add Nikolay Aleksandrov
2017-10-26 13:41   ` [Bridge] " Nikolay Aleksandrov
2017-10-27  1:55   ` Toshiaki Makita
2017-10-27  1:55     ` [Bridge] " Toshiaki Makita
2017-10-27  7:49     ` Nikolay Aleksandrov
2017-10-27  7:49       ` [Bridge] " Nikolay Aleksandrov
2017-10-27  8:24   ` Toshiaki Makita
2017-10-27  8:24     ` [Bridge] " Toshiaki Makita
2017-10-27  8:48     ` Nikolay Aleksandrov
2017-10-27  8:48       ` [Bridge] " Nikolay Aleksandrov
2017-10-27 10:19       ` [PATCH net-next v6 0/2] bridge: make setlink/dellink notifications more accurate Nikolay Aleksandrov
2017-10-27 10:19         ` [Bridge] " Nikolay Aleksandrov
2017-10-27 10:19         ` [PATCH net-next v6 1/2] bridge: netlink: " Nikolay Aleksandrov
2017-10-27 10:19           ` [Bridge] " Nikolay Aleksandrov
2017-10-27 10:19         ` [PATCH net-next v6 2/2] bridge: vlan: signal if anything changed on vlan add Nikolay Aleksandrov
2017-10-27 10:19           ` [Bridge] " Nikolay Aleksandrov
2017-10-27 23:34           ` Toshiaki Makita
2017-10-27 23:34             ` [Bridge] " Toshiaki Makita
2017-10-29  2:04         ` David Miller [this message]
2017-10-29  2:04           ` [Bridge] [PATCH net-next v6 0/2] bridge: make setlink/dellink notifications more accurate David Miller

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=20171029.110405.363445271511169384.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bridge@lists.linux-foundation.org \
    --cc=dsa@cumulusnetworks.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.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.