Hi there,
thanks for all the feedback for the changes I wanted to make to the sysfs code base. I tried to address bugs and suggestions. The macros are now a bit smaller than in the beginning, the missing static has been added (thanks Andrew and Sven).
Due to Marecs comment on the issues with changing sysfs file names in the kernel (which I was not aware of, thanks for explaining) and comments about old sysfs filenames being more descriptive, I changed the bat_priv names instead now. I don't really see a good reason yet why they should not be equal.
The hop_penalty and num_bcasts patches will follow later. There've been some discussions about what the limit and rules for exposing defines in sysfs should be.
Of course, having a good set of default values and not that many options configurable during runtime at all or most parameters just being adjusted automatically, makes the routing protocol itself much more stable and reliable, and less complex and easy to use for the user. However, certain assessable scenarios might benefit from certain parameters being tweakable during runtime, making optimizations and tests with different values quick and easy without having to rebuild and install the kernel module or even firmware images.
Simon's idea so far was, to introduce a debug/ folder in sysfs which is hidden by default and could be enabled with a KConfig option, so that tinkerers still have a chance for their needs for tweaking parameters. num_bcasts would probably be one of the first candidates as a debug-parameter.
If I forgot any very important points from the discussions so far, please don't hesitate to add them here.
And as always, any comments and suggestions highly appreciated :).
Cheers, Linus