Netdev List
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: <alexei.starovoitov@gmail.com>, <liu.song.a23@gmail.com>,
	Song Liu <songliubraving@fb.com>
Subject: [PATCH net-next 2/6] tcp: mark trace event arguments sk and skb as const
Date: Fri, 20 Oct 2017 14:20:42 -0700	[thread overview]
Message-ID: <20171020212046.577888-3-songliubraving@fb.com> (raw)
In-Reply-To: <20171020212046.577888-1-songliubraving@fb.com>

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>
---
 include/trace/events/tcp.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h
index 14b0a708..2b6fe72 100644
--- a/include/trace/events/tcp.h
+++ b/include/trace/events/tcp.h
@@ -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)
@@ -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)
 );
-- 
2.9.5

  parent reply	other threads:[~2017-10-20 21:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 21:20 [PATCH net-next 0/6] add a set of tracepoints to tcp stack Song Liu
2017-10-20 21:20 ` [PATCH net-next 1/6] tcp: add trace event class tcp_event_sk_skb Song Liu
2017-10-20 21:20 ` Song Liu [this message]
2017-10-20 21:20 ` [PATCH net-next 3/6] tcp: add tracepoint trace_tcp_send_reset Song Liu
2017-10-20 21:20 ` [PATCH net-next 4/6] tcp: add tracepoint trace_tcp_receive_reset Song Liu
2017-10-20 21:20 ` [PATCH net-next 5/6] tcp: add tracepoint trace_tcp_destroy_sock Song Liu
2017-10-20 21:20 ` [PATCH net-next 6/6] tcp: add tracepoint trace_tcp_set_state() Song Liu
2017-10-20 21:32 ` [PATCH net-next 0/6] add a set of tracepoints to tcp stack Song Liu
2017-10-23  4:08 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171020212046.577888-3-songliubraving@fb.com \
    --to=songliubraving@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=liu.song.a23@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox