Skip to content

Commit 7344e29

Browse files
liu-song-6davem330
authored andcommitted
tcp: mark trace event arguments sk and skb as const
Some functions that we plan to add trace points require const sk and/or skb. So we mark these fields as const in the tracepoint. Signed-off-by: Song Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f6e37b2 commit 7344e29

File tree

1 file changed

+4
-4
lines changed
  • include/trace/events

1 file changed

+4
-4
lines changed

include/trace/events/tcp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
*/
1818
DECLARE_EVENT_CLASS(tcp_event_sk_skb,
1919

20-
TP_PROTO(struct sock *sk, struct sk_buff *skb),
20+
TP_PROTO(const struct sock *sk, const struct sk_buff *skb),
2121

2222
TP_ARGS(sk, skb),
2323

2424
TP_STRUCT__entry(
25-
__field(void *, skbaddr)
26-
__field(void *, skaddr)
25+
__field(const void *, skbaddr)
26+
__field(const void *, skaddr)
2727
__field(__u16, sport)
2828
__field(__u16, dport)
2929
__array(__u8, saddr, 4)
@@ -72,7 +72,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
7272

7373
DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_skb,
7474

75-
TP_PROTO(struct sock *sk, struct sk_buff *skb),
75+
TP_PROTO(const struct sock *sk, const struct sk_buff *skb),
7676

7777
TP_ARGS(sk, skb)
7878
);

0 commit comments

Comments
 (0)