Skip to contentSkip to conversation

tcp: remove redundant new line from tcp_event_sk_skb

PATCH Superseded Tony Lu 3 participants 4 messages Nov 8, 2019 – Nov 9, 2019

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tony Lu

author
#0 lore raw

PATCH 1/1 tcp: remove redundant new line from tcp_event_sk_skb

This removes '\n' from trace event class tcp_event_sk_skb to avoid redundant new blank line and make output compact.

---
 include/trace/events/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/tcp.h +1 -1
index 2bc9960a31aa..cf97f6339acb 100644
@@ -86,7 +86,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
 			      sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
 	),
 
-	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s\n",
+	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
 		  __entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
 		  __entry->saddr_v6, __entry->daddr_v6,
 		  show_tcp_state_name(__entry->state))
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Tony Lu

This removes '\n' from trace event class tcp_event_sk_skb to avoid redundant new blank line and make output compact.

---
 include/trace/events/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/tcp.h +0 -0
index 2bc9960a31aa..cf97f6339acb 100644

include/trace/events/tcp.h DECLARE_EVENT_CLASS(tcp_event_sk_skb, · line 92

Quoted 8 lines
include/trace/events/tcp.h +1 -1
@@ -86,7 +86,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
 			      sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
 	),
 
-	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s\n",
+	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
 		  __entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
 		  __entry->saddr_v6, __entry->daddr_v6,
 		  show_tcp_state_name(__entry->state))

This seems good to me. Only few comments :

I would add a

Fixes af4325ecc24f ("tcp: expose sk_state in tcp_retransmit_skb tracepoint")

And also CC (I just did in this reply) the author of the above patch to make sure nothing unexpected happens.

Thanks.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Tony Lu
Quoted 5 lines · Tony Lu

This removes '\n' from trace event class tcp_event_sk_skb to avoid redundant new blank line and make output compact.

Thanks for pointing this out.

Quoted 20 lines
---
 include/trace/events/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/tcp.h +1 -2
index 2bc9960a31aa..cf97f6339acb 100644
@@ -86,7 +86,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
                              sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
        ),
 
-       TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s\n",
+       TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
                  __entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
                  __entry->saddr_v6, __entry->daddr_v6,
                  show_tcp_state_name(__entry->state))
--

2.24.0

author
#2 lore raw
In reply to Eric Dumazet

Thanks for your comments, I am going to append the tag.

Cheers,
Tony Lu

Quoted 37 lines · Eric Dumazet
Quoted 14 lines · Tony Lu

This removes '\n' from trace event class tcp_event_sk_skb to avoid redundant new blank line and make output compact.

---
 include/trace/events/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/tcp.h +0 -0
index 2bc9960a31aa..cf97f6339acb 100644

include/trace/events/tcp.h DECLARE_EVENT_CLASS(tcp_event_sk_skb, · line 92

Quoted 8 lines
include/trace/events/tcp.h +1 -1
@@ -86,7 +86,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb,
 			      sk->sk_v6_rcv_saddr, sk->sk_v6_daddr);
 	),
 
-	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s\n",
+	TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c state=%s",
 		  __entry->sport, __entry->dport, __entry->saddr, __entry->daddr,
 		  __entry->saddr_v6, __entry->daddr_v6,
 		  show_tcp_state_name(__entry->state))

This seems good to me. Only few comments :

I would add a

Fixes af4325ecc24f ("tcp: expose sk_state in tcp_retransmit_skb tracepoint")

And also CC (I just did in this reply) the author of the above patch to make sure nothing unexpected happens.

Thanks.