提交 c82481f7 编写于 作者: I Ido Schimmel 提交者: David S. Miller

netlink: Add field to skip in-kernel notifications

The struct includes a 'skip_notify' flag that indicates if netlink
notifications to user space should be suppressed. As explained in commit
3b1137fe ("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: NIdo Schimmel <idosch@mellanox.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Reviewed-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3de205cd
...@@ -381,12 +381,14 @@ struct nla_policy { ...@@ -381,12 +381,14 @@ struct nla_policy {
* @nl_net: Network namespace * @nl_net: Network namespace
* @portid: Netlink PORTID of requesting application * @portid: Netlink PORTID of requesting application
* @skip_notify: Skip netlink notifications to user space * @skip_notify: Skip netlink notifications to user space
* @skip_notify_kernel: Skip selected in-kernel notifications
*/ */
struct nl_info { struct nl_info {
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
struct net *nl_net; struct net *nl_net;
u32 portid; u32 portid;
bool skip_notify; u8 skip_notify:1,
skip_notify_kernel:1;
}; };
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册