Thread (24 messages) flat view 24 messages, 3 authors, 2016-11-14

Re: [PATCH net-next 08/11] net: dsa: mv88e6xxx: Add stats_get_sset_count to ops structure

From: Vivien Didelot <hidden>
Date: 2016-11-14 02:47:46

Hi Andrew,

Andrew Lunn [off-list ref] writes:
Different families have different sets of statistics. Abstract this
using a stats_get_sset_count op. Each stat has a bitmap, and the ops
implementer uses a bit map mask to count the statistics which apply
for the family.
-static int mv88e6xxx_get_sset_count(struct dsa_switch *ds)
+static int _mv88e6xxx_get_sset_count(struct mv88e6xxx_chip *chip, int types)
Looks good overall. But please don't re-introduce underscore-prefixed
helpers. If I'm not mistaken, stats are a Global 1 feature, so ordered
explicit helpers in global1.c will be perfect.

If the stats code is huge, don't hesitate to move them in a
global1_stats.c file, as you wish. But we have to keep it
self-documented and easy to follow for new developers.

Thanks,

        Vivien
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help