Skip to content

Commit 3f117d6

Browse files
tomparkindavem330
authored andcommitted
l2tp: add tracepoint infrastructure to core
The l2tp subsystem doesn't currently make use of tracepoints. As a starting point for adding tracepoints, add skeleton infrastructure for defining tracepoints for the subsystem, and for having them build appropriately whether compiled into the kernel or built as a module. Signed-off-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5ee759c commit 3f117d6

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎net/l2tp/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
obj-$(CONFIG_L2TP) += l2tp_core.o
77

8+
CFLAGS_l2tp_core.o += -I$(src)
9+
810
# Build l2tp as modules if L2TP is M
911
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_PPPOL2TP)) += l2tp_ppp.o
1012
obj-$(subst y,$(CONFIG_L2TP),$(CONFIG_L2TP_IP)) += l2tp_ip.o

‎net/l2tp/l2tp_core.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262

6363
#include "l2tp_core.h"
6464

65+
#define CREATE_TRACE_POINTS
66+
#include "trace.h"
67+
6568
#define L2TP_DRV_VERSION "V2.0"
6669

6770
/* L2TP header constants */

‎net/l2tp/trace.h‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#undef TRACE_SYSTEM
3+
#define TRACE_SYSTEM l2tp
4+
5+
#if !defined(_TRACE_L2TP_H) || defined(TRACE_HEADER_MULTI_READ)
6+
#define _TRACE_L2TP_H
7+
8+
#endif /* _TRACE_L2TP_H */
9+
10+
/* This part must be outside protection */
11+
#undef TRACE_INCLUDE_PATH
12+
#define TRACE_INCLUDE_PATH .
13+
#undef TRACE_INCLUDE_FILE
14+
#define TRACE_INCLUDE_FILE trace
15+
#include <trace/define_trace.h>

0 commit comments

Comments
 (0)