as 1400+ bytes on the parisc stack, is a bit much. That said, I don't see much possibility for shrinkage overall.
A) if we resort to having a struct new_cake_xstats[q->tin_cnt], we still end up with a big stack on the diffserv8 case (that won't get caught by a static checker) B) I'm on record as disliking any statistics calculation that is not directly needed by the algorithm. Putting my asbestos suit on, that's peak_delay_us, avge_delay_us, base_delay_us, way_indirect_hits, way_misses, way_collisions, bulk_flow_count, and a few others. C) Can we return a tuple to tc saying "we have 8 queues, poll me for each"? D) Put the extended stats in sysfs, instead? E) ?? struct tc_cake_traffic_stats { __u32 packets; __u32 link_ms; // essentially unused, but we could promote packets to u64. __u64 bytes; }; #define TC_CAKE_MAX_TINS (8) struct tc_cake_xstats { __u16 version; /* == 5, increments when struct extended */ __u8 max_tins; /* == TC_CAKE_MAX_TINS */ __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */ __u32 threshold_rate[TC_CAKE_MAX_TINS]; __u32 target_us[TC_CAKE_MAX_TINS]; struct tc_cake_traffic_stats sent[TC_CAKE_MAX_TINS]; struct tc_cake_traffic_stats dropped[TC_CAKE_MAX_TINS]; struct tc_cake_traffic_stats ecn_marked[TC_CAKE_MAX_TINS]; struct tc_cake_traffic_stats backlog[TC_CAKE_MAX_TINS]; __u32 interval_us[TC_CAKE_MAX_TINS]; __u32 way_indirect_hits[TC_CAKE_MAX_TINS]; __u32 way_misses[TC_CAKE_MAX_TINS]; __u32 way_collisions[TC_CAKE_MAX_TINS]; __u32 peak_delay_us[TC_CAKE_MAX_TINS]; /* ~= bulk flow delay */ __u32 avge_delay_us[TC_CAKE_MAX_TINS]; __u32 base_delay_us[TC_CAKE_MAX_TINS]; /* ~= sparse flows delay */ __u16 sparse_flows[TC_CAKE_MAX_TINS]; __u16 bulk_flows[TC_CAKE_MAX_TINS]; __u16 unresponse_flows[TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */ __u16 spare[TC_CAKE_MAX_TINS]; /* v4 - split last_len */ __u32 max_skblen[TC_CAKE_MAX_TINS]; __u32 capacity_estimate; /* version 2 */ __u32 memory_limit; /* version 3 */ __u32 memory_used; /* version 3 */ struct tc_cake_traffic_stats ack_drops[TC_CAKE_MAX_TINS]; /* v5 */ }; -- Dave Täht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619 _______________________________________________ Cake mailing list Cake@lists.bufferbloat.net https://lists.bufferbloat.net/listinfo/cake