[ltt-dev] [PATCH] Fix address field byte order in instrumentation

Benjamin Poirier benjamin.poirier at polymtl.ca
Thu Jul 9 15:03:49 EDT 2009


The address field should be recorded in network byte order, as defined in
struct in_ifaddr.

Signed-off-by: Benjamin Poirier <benjamin.poirier at polytml.ca>
---
 ltt/ltt-statedump.c    |    4 ++--
 ltt/probes/net-trace.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ltt/ltt-statedump.c b/ltt/ltt-statedump.c
index 836fed6..cc0c3b3 100644
--- a/ltt/ltt-statedump.c
+++ b/ltt/ltt-statedump.c
@@ -94,14 +94,14 @@ static void ltt_enumerate_device(struct ltt_probe_private_data *call_data,
 				__trace_mark(0, netif_state,
 					network_ipv4_interface,
 					call_data,
-					"name %s address #4u%lu up %d",
+					"name %s address #n4u%lu up %d",
 					dev->name,
 					(unsigned long)ifa->ifa_address, 0);
 			in_dev_put(in_dev);
 		}
 	} else
 		__trace_mark(0, netif_state, network_ip_interface,
-			call_data, "name %s address #4u%lu up %d",
+			call_data, "name %s address #n4u%lu up %d",
 			dev->name, 0UL, 0);
 }
 
diff --git a/ltt/probes/net-trace.c b/ltt/probes/net-trace.c
index 80d3d9c..c267355 100644
--- a/ltt/probes/net-trace.c
+++ b/ltt/probes/net-trace.c
@@ -16,7 +16,7 @@
 void probe_net_dev_xmit(struct sk_buff *skb);
 
 DEFINE_MARKER_TP(net, dev_xmit, net_dev_xmit, probe_net_dev_xmit,
-	"skb %p protocol #2u%hu");
+	"skb %p protocol #n2u%hu");
 
 notrace void probe_net_dev_xmit(struct sk_buff *skb)
 {
@@ -34,7 +34,7 @@ notrace void probe_net_dev_xmit(struct sk_buff *skb)
 void probe_net_dev_receive(struct sk_buff *skb);
 
 DEFINE_MARKER_TP(net, dev_receive, net_dev_receive, probe_net_dev_receive,
-	"skb %p protocol #2u%hu");
+	"skb %p protocol #n2u%hu");
 
 notrace void probe_net_dev_receive(struct sk_buff *skb)
 {
-- 
1.6.3.3





More information about the lttng-dev mailing list