[ltt-dev] [PATCH] net_dev_xmit_extended probe : cleanup unused data
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Feb 4 11:09:20 EST 2011
* Julien Desfossez (julien.desfossez at polymtl.ca) wrote:
> Intialise the unused fields of the data structure and add support for
> ports in UDP packets.
Merged, thanks !
Mathieu
>
> Signed-off-by: Julien Desfossez <julien.desfossez at polymtl.ca>
> ---
> probes/net-extended-trace.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/probes/net-extended-trace.c b/probes/net-extended-trace.c
> index 15fc810..d7bb4f8 100644
> --- a/probes/net-extended-trace.c
> +++ b/probes/net-extended-trace.c
> @@ -42,6 +42,9 @@ notrace void probe_net_dev_xmit_extended(void *_data, struct sk_buff *skb)
> struct serialize_l214421224411111 data;
> struct iphdr *iph = ip_hdr(skb);
> struct tcphdr *th = tcp_hdr(skb);
> + struct udphdr *uh = udp_hdr(skb);
> +
> + memset(&data, 0, sizeof(struct serialize_l214421224411111));
>
> data.f1 = (unsigned long)skb;
> data.f2 = skb->protocol;
> @@ -63,6 +66,9 @@ notrace void probe_net_dev_xmit_extended(void *_data, struct sk_buff *skb)
> data.f14 = th->rst;
> data.f15 = th->syn;
> data.f16 = th->fin;
> + } else if (data.f3 == IPPROTO_UDP) {
> + data.f8 = uh->source;
> + data.f9 = uh->dest;
> }
> }
>
> --
> 1.7.0.4
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list