On Mon, Oct 10, 2011 at 1:56 AM, Or Gerlitz <ogerl...@mellanox.com> wrote: > +static struct attribute_group pma_ext_group = { > + .name = "counters_ext", > + .attrs = pma_attrs_ext > +};
Sorry for the late review here, but does it seem like the best approach to have a separate "counters_ext" directory for some subset of performance counters? Instead we could have two attribute_groups, one the basic counters and one the basic and extended counters, and basically do if (is_pma_class_cap_ext_width(device, port_num) == 0) sysfs_create_group(...basic and extended counters...) else sysfs_create_group(...basic counters...) (by the way, is_pma_class_cap_ext_width() seems backwards since it returns 0 for true. How about bool pma_has_ext_width() and have it return true if the extended counters ARE supported?) Or is there some reason why users would want to make the distinction between basic and extended counters? - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html