Skip to contentSkip to conversation

problem dumping statistics from queueing discipline

LARTC Patrick McHardy 1 participant 1 message Aug 6, 2002

lore
Share & tools
lore
#0 lore raw

Hi.
I already wrote to linux-net but noone responded there and i don't want to go on peoples nerves in netdev with this, maybe someone here can help me ..

I want to supply extra data to print_copt and print_xstats so i tried this code:
...

     rta = (struct rtattr *)b;
     RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
     RTA_PUT(skb, TCA_XSTATS, 0, NULL);

     if (trc_dump_attr(skb, cl) < 0)
         goto rtattr_failure;
     rta->rta_len = skb->tail - b;

     if (qdisc_copy_stats(skb, &cl->stats))
         goto rtattr_failure;

...

The extra data gets added in trc_dump_attr.
The problem is, depending on wether i add empty TCA_OPTIONS before TCA_XSTATS or the other way around, only one of them seems to make it to userspace, so only print_copt or print_xstats is called, but not both. I don't understand why this doesn't works, please someone explain it to me ;)

Thanks & Bye,
Patrick

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/