+++ /dev/null
-From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
-Subject: LTTng instrumentation - ipv4
-
-Original patch header:
- LTTng instrumentation - ipv4
-
- Keep track of interface up/down for ipv4. Allows to keep track of interface
- address changes in a trace.
-
- Those tracepoints are used by LTTng.
-
- About the performance impact of tracepoints (which is comparable to markers),
- even without immediate values optimizations, tests done by Hideo Aoki on ia64
- show no regression. His test case was using hackbench on a kernel where
- scheduler instrumentation (about 5 events in code scheduler code) was added.
- See the "Tracepoints" patch header for performance result detail.
-
- Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
- CC: netdev@vger.kernel.org
- CC: David S. Miller <davem@davemloft.net>
- CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
- CC:
- CC: Masami Hiramatsu <mhiramat@redhat.com>
- CC: 'Peter Zijlstra' <peterz@infradead.org>
- CC: "Frank Ch. Eigler" <fche@redhat.com>
- CC: 'Ingo Molnar' <mingo@elte.hu>
- CC: 'Hideo AOKI' <haoki@redhat.com>
- CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
- CC: 'Steven Rostedt' <rostedt@goodmis.org>
- CC: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
-
-Acked-by: Jan Blunck <jblunck@suse.de>
----
----
- include/trace/ipv4.h | 14 ++++++++++++++
- net/ipv4/devinet.c | 3 +++
- 2 files changed, 17 insertions(+)
-
---- /dev/null
-+++ b/include/trace/ipv4.h
-@@ -0,0 +1,14 @@
-+#ifndef _TRACE_IPV4_H
-+#define _TRACE_IPV4_H
-+
-+#include <linux/inetdevice.h>
-+#include <linux/tracepoint.h>
-+
-+DEFINE_TRACE(ipv4_addr_add,
-+ TPPROTO(struct in_ifaddr *ifa),
-+ TPARGS(ifa));
-+DEFINE_TRACE(ipv4_addr_del,
-+ TPPROTO(struct in_ifaddr *ifa),
-+ TPARGS(ifa));
-+
-+#endif
---- a/net/ipv4/devinet.c
-+++ b/net/ipv4/devinet.c
-@@ -61,6 +61,7 @@
- #include <net/ip_fib.h>
- #include <net/rtnetlink.h>
- #include <net/net_namespace.h>
-+#include <trace/ipv4.h>
-
- static struct ipv4_devconf ipv4_devconf = {
- .data = {
-@@ -257,6 +258,7 @@ static void __inet_del_ifa(struct in_dev
- struct in_ifaddr **ifap1 = &ifa1->ifa_next;
-
- while ((ifa = *ifap1) != NULL) {
-+ trace_ipv4_addr_del(ifa);
- if (!(ifa->ifa_flags & IFA_F_SECONDARY) &&
- ifa1->ifa_scope <= ifa->ifa_scope)
- last_prim = ifa;
-@@ -363,6 +365,7 @@ static int __inet_insert_ifa(struct in_i
- }
- ifa->ifa_flags |= IFA_F_SECONDARY;
- }
-+ trace_ipv4_addr_add(ifa);
- }
-
- if (!(ifa->ifa_flags & IFA_F_SECONDARY)) {