netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: add the ifindex for trace_net_dev_xmit_timeout
@ 2025-10-21  9:19 Tonghao Zhang
  2025-10-22  0:10 ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Tonghao Zhang @ 2025-10-21  9:19 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang, Eran Ben Elisha, Jiri Pirko, Cong Wang

In a multi-network card or container environment, provide more accurate information.

268.148239: net_dev_xmit_timeout: dev=eth0 ifindex=6 driver=virtio_net queue=10
274.292271: net_dev_xmit_timeout: dev=eth0 ifindex=6 driver=virtio_net queue=10
277.876231: net_dev_xmit_timeout: dev=eth1 ifindex=7 driver=virtio_net queue=10
279.924230: net_dev_xmit_timeout: dev=eth2 ifindex=8 driver=virtio_net queue=10
279.924233: net_dev_xmit_timeout: dev=eth0 ifindex=6 driver=virtio_net queue=10
282.996224: net_dev_xmit_timeout: dev=eth1 ifindex=7 driver=virtio_net queue=10

Cc: Eran Ben Elisha <eranbe@mellanox.com>
Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
---
 include/trace/events/net.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/net.h b/include/trace/events/net.h
index d55162c12f90..49f9fce69dd7 100644
--- a/include/trace/events/net.h
+++ b/include/trace/events/net.h
@@ -107,16 +107,19 @@ TRACE_EVENT(net_dev_xmit_timeout,
 		__string(	name,		dev->name	)
 		__string(	driver,		netdev_drivername(dev))
 		__field(	int,		queue_index	)
+		__field(	int,		ifindex		)
 	),
 
 	TP_fast_assign(
 		__assign_str(name);
 		__assign_str(driver);
 		__entry->queue_index = queue_index;
+		__entry->ifindex = dev->ifindex;
 	),
 
-	TP_printk("dev=%s driver=%s queue=%d",
-		__get_str(name), __get_str(driver), __entry->queue_index)
+	TP_printk("dev=%s ifindex=%d driver=%s queue=%d",
+		__get_str(name), __entry->ifindex,
+		__get_str(driver), __entry->queue_index)
 );
 
 DECLARE_EVENT_CLASS(net_dev_template,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-22 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21  9:19 [PATCH net-next] net: add the ifindex for trace_net_dev_xmit_timeout Tonghao Zhang
2025-10-22  0:10 ` Jakub Kicinski
2025-10-22  8:31   ` Tonghao Zhang
2025-10-22 10:45     ` Ido Schimmel
2025-10-22 13:23       ` Tonghao Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).