Skip to content

Commit

Permalink
tcp: mark trace event arguments sk and skb as const
Browse files Browse the repository at this point in the history
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 <songliubraving@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Song Liu authored and David S. Miller committed Oct 24, 2017
1 parent f6e37b2 commit 7344e29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/trace/events/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
*/
DECLARE_EVENT_CLASS(tcp_event_sk_skb,

TP_PROTO(struct sock *sk, struct sk_buff *skb),
TP_PROTO(const struct sock *sk, const struct sk_buff *skb),

TP_ARGS(sk, skb),

TP_STRUCT__entry(
__field(void *, skbaddr)
__field(void *, skaddr)
__field(const void *, skbaddr)
__field(const void *, skaddr)
__field(__u16, sport)
__field(__u16, dport)
__array(__u8, saddr, 4)
Expand Down Expand Up @@ -72,7 +72,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,

DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_skb,

TP_PROTO(struct sock *sk, struct sk_buff *skb),
TP_PROTO(const struct sock *sk, const struct sk_buff *skb),

TP_ARGS(sk, skb)
);
Expand Down

0 comments on commit 7344e29

Please sign in to comment.