netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, dsahern@gmail.com,
	alexpe@mellanox.com, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next v2 02/16] netlink: Add field to skip in-kernel notifications
Date: Tue, 18 Jun 2019 18:12:44 +0300	[thread overview]
Message-ID: <20190618151258.23023-3-idosch@idosch.org> (raw)
In-Reply-To: <20190618151258.23023-1-idosch@idosch.org>

From: Ido Schimmel <idosch@mellanox.com>

The struct includes a 'skip_notify' flag that indicates if netlink
notifications to user space should be suppressed. As explained in commit
3b1137fe7482 ("net: ipv6: Change notifications for multipath add to
RTA_MULTIPATH"), this is useful to suppress per-nexthop RTM_NEWROUTE
notifications when an IPv6 multipath route is added / deleted. Instead,
one notification is sent for the entire multipath route.

This concept is also useful for in-kernel notifications. Sending one
in-kernel notification for the addition / deletion of an IPv6 multipath
route - instead of one per-nexthop - provides a significant increase in
the insertion / deletion rate to underlying devices.

Add a 'skip_notify_kernel' flag to suppress in-kernel notifications.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
---
 include/net/netlink.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/net/netlink.h b/include/net/netlink.h
index ce66e43b9b6a..e4650e5b64a1 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -381,12 +381,14 @@ struct nla_policy {
  * @nl_net: Network namespace
  * @portid: Netlink PORTID of requesting application
  * @skip_notify: Skip netlink notifications to user space
+ * @skip_notify_kernel: Skip selected in-kernel notifications
  */
 struct nl_info {
 	struct nlmsghdr		*nlh;
 	struct net		*nl_net;
 	u32			portid;
-	bool			skip_notify;
+	u8			skip_notify:1,
+				skip_notify_kernel:1;
 };
 
 /**
-- 
2.20.1


  parent reply	other threads:[~2019-06-18 15:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 15:12 [PATCH net-next v2 00/16] mlxsw: Improve IPv6 route insertion rate Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 01/16] netlink: Document all fields of 'struct nl_info' Ido Schimmel
2019-06-18 15:12 ` Ido Schimmel [this message]
2019-06-18 15:12 ` [PATCH net-next v2 03/16] ipv6: Extend notifier info for multipath routes Ido Schimmel
2019-06-18 15:26   ` David Ahern
2019-06-18 15:12 ` [PATCH net-next v2 04/16] mlxsw: spectrum_router: Ignore IPv6 multipath notifications Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 05/16] netdevsim: " Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 06/16] ipv6: Add IPv6 multipath notifications for add / replace Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 07/16] ipv6: Add IPv6 multipath notification for route delete Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 08/16] mlxsw: spectrum_router: Remove processing of IPv6 append notifications Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 09/16] mlxsw: spectrum_router: Prepare function to return errors Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 10/16] mlxsw: spectrum_router: Pass multiple routes to work item Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 11/16] mlxsw: spectrum_router: Adjust IPv6 replace logic to new notifications Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 12/16] mlxsw: spectrum_router: Pass array of routes to route handling functions Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 13/16] mlxsw: spectrum_router: Add / delete multiple IPv6 nexthops Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 14/16] mlxsw: spectrum_router: Create IPv6 multipath routes in one go Ido Schimmel
2019-06-18 15:12 ` [PATCH net-next v2 15/16] ipv6: Stop sending in-kernel notifications for each nexthop Ido Schimmel
2019-06-18 15:28   ` David Ahern
2019-06-18 15:12 ` [PATCH net-next v2 16/16] selftests: mlxsw: Add a test for FIB offload indication Ido Schimmel
2019-06-18 16:46 ` [PATCH net-next v2 00/16] mlxsw: Improve IPv6 route insertion rate 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=20190618151258.23023-3-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=alexpe@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /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).