From 085e1a65f04fb05941de0a071c8d70246cd03178 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:40 -0700 Subject: rtnetlink: Do not generate notifications for MTU events Changing MTU on a link currently causes 3 messages to be sent to userspace: [LINK]11: dummy1: mtu 1490 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff Remove the messages sent for PRE_CHANGE_MTU and CHANGE_MTU netdev events. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 58419da7961b..79ab43796b08 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4117,7 +4117,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi switch (event) { case NETDEV_REBOOT: - case NETDEV_CHANGEMTU: case NETDEV_CHANGEADDR: case NETDEV_CHANGENAME: case NETDEV_FEAT_CHANGE: @@ -4126,7 +4125,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_NOTIFY_PEERS: case NETDEV_CHANGEUPPER: case NETDEV_RESEND_IGMP: - case NETDEV_PRECHANGEMTU: case NETDEV_CHANGEINFODATA: case NETDEV_PRECHANGEUPPER: case NETDEV_CHANGELOWERSTATE: -- cgit v1.2.3 From 46ede612c7a3e1558c98345b611baf636d3ea65f Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:41 -0700 Subject: rtnetlink: Do not generate notification for UDP_TUNNEL_PUSH_INFO NETDEV_UDP_TUNNEL_PUSH_INFO is an internal notifier; nothing userspace can do so don't generate a netlink notification. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 79ab43796b08..58722bf10d50 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4128,7 +4128,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_CHANGEINFODATA: case NETDEV_PRECHANGEUPPER: case NETDEV_CHANGELOWERSTATE: - case NETDEV_UDP_TUNNEL_PUSH_INFO: case NETDEV_CHANGE_TX_QUEUE_LEN: rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); break; -- cgit v1.2.3 From cd8966e75ed3c6b41a37047a904617bc44fa481f Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:42 -0700 Subject: rtnetlink: Do not generate notifications for CHANGEADDR event Changing hardware address generates redundant messages: [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff Do not send a notification for the CHANGEADDR notifier. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 58722bf10d50..574f9b79919a 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4117,7 +4117,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi switch (event) { case NETDEV_REBOOT: - case NETDEV_CHANGEADDR: case NETDEV_CHANGENAME: case NETDEV_FEAT_CHANGE: case NETDEV_BONDING_FAILOVER: -- cgit v1.2.3 From aef091ae58aab340afb6f4d6a835037e66fa56a1 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:43 -0700 Subject: rtnetlink: Do not generate notifications for POST_TYPE_CHANGE event Changing the master device for a link generates many messages; the one generated for POST_TYPE_CHANGE is redundant: [LINK]11: dummy1: mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff Remove POST_TYPE_CHANGE from the list of notifiers that generate notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 574f9b79919a..8cfb9e3c1f6e 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4120,7 +4120,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_CHANGENAME: case NETDEV_FEAT_CHANGE: case NETDEV_BONDING_FAILOVER: - case NETDEV_POST_TYPE_CHANGE: case NETDEV_NOTIFY_PEERS: case NETDEV_CHANGEUPPER: case NETDEV_RESEND_IGMP: -- cgit v1.2.3 From bf2c2984d3f4d22b8617df1b0103bab9b7970902 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:44 -0700 Subject: rtnetlink: Do not generate notifications for PRECHANGEUPPER event PRECHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 8cfb9e3c1f6e..10df445bb818 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4124,7 +4124,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_CHANGEUPPER: case NETDEV_RESEND_IGMP: case NETDEV_CHANGEINFODATA: - case NETDEV_PRECHANGEUPPER: case NETDEV_CHANGELOWERSTATE: case NETDEV_CHANGE_TX_QUEUE_LEN: rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); -- cgit v1.2.3 From aed073590970137c5937f10c1dff5379d30083a3 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:45 -0700 Subject: rtnetlink: Do not generate notifications for CHANGELOWERSTATE event CHANGELOWERSTATE is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 10df445bb818..b70e915be66d 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4124,7 +4124,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_CHANGEUPPER: case NETDEV_RESEND_IGMP: case NETDEV_CHANGEINFODATA: - case NETDEV_CHANGELOWERSTATE: case NETDEV_CHANGE_TX_QUEUE_LEN: rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); break; -- cgit v1.2.3 From b6b36eb23a46bd927ffc9d9a3c911965c1be7c36 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:46 -0700 Subject: rtnetlink: Do not generate notifications for NETDEV_CHANGEUPPER event NETDEV_CHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index b70e915be66d..ef93f6c983f3 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4121,7 +4121,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_FEAT_CHANGE: case NETDEV_BONDING_FAILOVER: case NETDEV_NOTIFY_PEERS: - case NETDEV_CHANGEUPPER: case NETDEV_RESEND_IGMP: case NETDEV_CHANGEINFODATA: case NETDEV_CHANGE_TX_QUEUE_LEN: -- cgit v1.2.3 From 27b3b551d8a7af98423b4a2b0d033013c08d812c Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 11 Apr 2017 17:02:47 -0700 Subject: rtnetlink: Do not generate notifications for NETDEV_CHANGE_TX_QUEUE_LEN event Changing tx queue length generates identical messages: [LINK]22: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 [LINK]22: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 Remove NETDEV_CHANGE_TX_QUEUE_LEN from the list of notifiers that generate notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index ef93f6c983f3..c138b6b75e59 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4123,7 +4123,6 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi case NETDEV_NOTIFY_PEERS: case NETDEV_RESEND_IGMP: case NETDEV_CHANGEINFODATA: - case NETDEV_CHANGE_TX_QUEUE_LEN: rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); break; default: -- cgit v1.2.3