sched: align nlattr properly when needed
[cascardo/linux.git] / Documentation / networking / gen_stats.txt
index 70e6275..ff630a8 100644 (file)
@@ -33,7 +33,8 @@ my_dumping_routine(struct sk_buff *skb, ...)
 {
        struct gnet_dump dump;
 
-       if (gnet_stats_start_copy(skb, TCA_STATS2, &mystruct->lock, &dump) < 0)
+       if (gnet_stats_start_copy(skb, TCA_STATS2, &mystruct->lock, &dump,
+                                 TCA_PAD) < 0)
                goto rtattr_failure;
 
        if (gnet_stats_copy_basic(&dump, &mystruct->bstats) < 0 ||
@@ -56,7 +57,8 @@ existing TLV types.
 my_dumping_routine(struct sk_buff *skb, ...)
 {
     if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
-               TCA_XSTATS, &mystruct->lock, &dump) < 0)
+                                    TCA_XSTATS, &mystruct->lock, &dump,
+                                    TCA_PAD) < 0)
                goto rtattr_failure;
        ...
 }