Commit 7344e29f authored by Song Liu's avatar Song Liu Committed by David S. Miller

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: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6e37b25
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
*/ */
DECLARE_EVENT_CLASS(tcp_event_sk_skb, 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_ARGS(sk, skb),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(void *, skbaddr) __field(const void *, skbaddr)
__field(void *, skaddr) __field(const void *, skaddr)
__field(__u16, sport) __field(__u16, sport)
__field(__u16, dport) __field(__u16, dport)
__array(__u8, saddr, 4) __array(__u8, saddr, 4)
...@@ -72,7 +72,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb, ...@@ -72,7 +72,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_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) TP_ARGS(sk, skb)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment