netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Colitti <lorenzo@google.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: "David Ahern" <dsahern@gmail.com>,
	"David Miller" <davem@davemloft.net>,
	"Yaro Slav" <yaro330@gmail.com>,
	"Thomas Haller" <thaller@redhat.com>,
	"Alistair Strachan" <astrachan@google.com>,
	"Greg KH" <greg@kroah.com>,
	"Linux NetDev" <netdev@vger.kernel.org>,
	"Mateusz Bajorski" <mateusz.bajorski@nokia.com>,
	"David Ahern" <dsa@cumulusnetworks.com>,
	"Maciej Żenczykowski" <zenczykowski@gmail.com>
Subject: Re: [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied
Date: Wed, 5 Jun 2019 10:47:58 +0900	[thread overview]
Message-ID: <CAKD1Yr3px5vCAmmW7vgh4v6AX_gSRiGFcS0m+iKW9YEYZ2wG8w@mail.gmail.com> (raw)
In-Reply-To: <20190605014344.GY18865@dhcp-12-139.nay.redhat.com>

On Wed, Jun 5, 2019 at 10:43 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
> Although I'm still not clear what's the difference between
>
> a) adding a dup rule and remove it later
> and
> b) return 0 directly if the rule exactally the same.

The Android code updates ip rules by adding the new rule and then
deleting the old rule. Before this patch, the result of the operation
is that the old rule is deleted and the new rule exists. After this
patch, if the new rule is the same as the old rule, then the add does
nothing and the delete deletes the old rule. The result of the
operation is that the old rule is deleted and the new rule is no
longer there, and the rules are broken.

  reply	other threads:[~2019-06-05  1:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07  9:11 [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied Hangbin Liu
2019-05-08 16:35 ` David Miller
2019-06-01  1:43   ` Maciej Żenczykowski
2019-06-01  9:32     ` Greg KH
2019-06-05  1:43     ` Hangbin Liu
2019-06-05  1:47       ` Lorenzo Colitti [this message]
2019-06-05  2:15         ` Hangbin Liu
2019-06-05  2:25           ` Lorenzo Colitti
2019-06-05  3:29             ` Hangbin Liu
2019-06-05  3:43               ` Lorenzo Colitti
2019-06-05  4:05                 ` Hangbin Liu
2019-06-05  3:57       ` David Ahern
2019-06-05  4:08         ` Hangbin Liu
2019-06-05  4:58         ` Lorenzo Colitti
2019-06-05 15:33           ` David Ahern
2019-06-06 23:01             ` Maciej Żenczykowski

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=CAKD1Yr3px5vCAmmW7vgh4v6AX_gSRiGFcS0m+iKW9YEYZ2wG8w@mail.gmail.com \
    --to=lorenzo@google.com \
    --cc=astrachan@google.com \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=dsahern@gmail.com \
    --cc=greg@kroah.com \
    --cc=liuhangbin@gmail.com \
    --cc=mateusz.bajorski@nokia.com \
    --cc=netdev@vger.kernel.org \
    --cc=thaller@redhat.com \
    --cc=yaro330@gmail.com \
    --cc=zenczykowski@gmail.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;
as well as URLs for NNTP newsgroup(s).