All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, dsahern@gmail.com,
	roopa@cumulusnetworks.com, jakub.kicinski@netronome.com,
	jiri@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 3/9] ipv6: Notify route if replacing currently offloaded one
Date: Mon, 23 Dec 2019 15:28:14 +0200	[thread overview]
Message-ID: <20191223132820.888247-4-idosch@idosch.org> (raw)
In-Reply-To: <20191223132820.888247-1-idosch@idosch.org>

From: Ido Schimmel <idosch@mellanox.com>

Similar to the corresponding IPv4 patch, only notify the new route if it
is replacing the currently offloaded one. Meaning, the one pointed to by
'fn->leaf'.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
---
 net/ipv6/ip6_fib.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 045bcaf5e770..7cf9554888b0 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1231,6 +1231,13 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt,
 		}
 
 		if (!info->skip_notify_kernel) {
+			enum fib_event_type fib_event;
+
+			fib_event = FIB_EVENT_ENTRY_REPLACE_TMP;
+			if (ins == &fn->leaf)
+				err = call_fib6_entry_notifiers(info->nl_net,
+								fib_event, rt,
+								extack);
 			err = call_fib6_entry_notifiers(info->nl_net,
 							FIB_EVENT_ENTRY_REPLACE,
 							rt, extack);
-- 
2.24.1


  parent reply	other threads:[~2019-12-23 13:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 13:28 [PATCH net-next 0/9] Simplify IPv6 route offload API Ido Schimmel
2019-12-23 13:28 ` [PATCH net-next 1/9] net: fib_notifier: Add temporary events to the FIB notification chain Ido Schimmel
2019-12-24 16:40   ` David Ahern
2019-12-23 13:28 ` [PATCH net-next 2/9] ipv6: Notify newly added route if should be offloaded Ido Schimmel
2019-12-24 16:40   ` David Ahern
2019-12-23 13:28 ` Ido Schimmel [this message]
2019-12-24 16:44   ` [PATCH net-next 3/9] ipv6: Notify route if replacing currently offloaded one David Ahern
2019-12-23 13:28 ` [PATCH net-next 4/9] ipv6: Notify multipath route if should be offloaded Ido Schimmel
2019-12-24 16:49   ` David Ahern
2019-12-23 13:28 ` [PATCH net-next 5/9] ipv6: Only Replay routes of interest to new listeners Ido Schimmel
2019-12-24 16:58   ` David Ahern
2019-12-23 13:28 ` [PATCH net-next 6/9] ipv6: Handle route deletion notification Ido Schimmel
2019-12-24 17:03   ` David Ahern
2019-12-23 13:28 ` [PATCH net-next 7/9] ipv6: Handle multipath " Ido Schimmel
2019-12-24 17:09   ` David Ahern
2019-12-23 13:28 ` [PATCH net-next 8/9] mlxsw: spectrum_router: Start using new IPv6 route notifications Ido Schimmel
2019-12-23 13:28 ` [PATCH net-next 9/9] ipv6: Remove old route notifications and convert listeners Ido Schimmel
2019-12-24 17:12   ` David Ahern
2019-12-25  6:38 ` [PATCH net-next 0/9] Simplify IPv6 route offload API 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=20191223132820.888247-4-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --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.