Re: [B.A.T.M.A.N.] [PATCH 03/17] batman-adv: Add network_coding and mcast sysfs files to README

Jiri Pirko
2018-08-04T11:52:12Z

Sat, Aug 04, 2018 at 01:19:39PM CEST, a@unstable.cc wrote:
>On 04/08/18 17:36, Jiri Pirko wrote:
>>>
>>> Do you have any pointer about where this discussion took place? I
>>> imagine it happened in conjunction with some patches intended to other
>>> drivers/netdev changes.
>>>
>>> Reading that could give us a sense of how strict/important/severe this
>>> decision was and how to prioritize future work.
>>>
>>> I am asking because we have been working on a new feature since several
>>> months and this feature introduces a new sysfs knob.
>>>
>>> Now, although I understand the recommendation of switching to netlink, I
>>> find it a bit impractical to delay a new (and fairly big) feature,
>>> simply because it uses a potentially obsolete, but current, API.
>>>
>>> Any opinion about this?
>>
>> I agree, that does not make sense.
>
>Thanks for your reply, Jiri.
>
>>
>> I just wanted you to consider introducing netlink iface and migrate to
>> it as it is generally the preffered way to comunicate with userspace in
>> networking area (I don't have pointer any specific discussion though -
>> it is just a common knowledge :)).
>
>That's ok. I was asking because in the past batman-adv was using debugfs
>for dealing with settings and we were (properly) redirected to sysfs by
>David.
>Now it seems we need to migrate to the next thing :-) So I just wanted
>to be sure we have to do it, but this seems to be the case..
>
>> I will be more then happy to help you
>> with that. You should look at net/core/devlink.c and net/wireless/nl80211.c
>> to get some inspiration.
>
>Actually we have already implemented a basic netlink API to be used when
>sending information to userspace (i.e. routing tables, neighbour tables,
>etc..), therefore I think we might be able to leverage on that.
>But of course, any help will be appreciated :)

Yes, I see net/batman-adv/netlink.c. That looks fine. Shouldn't be hard
to migrate the existing sysfs things there and add new features.
Please don't forget to echo the configured options via netlink
notifications from the very beginning. Feel free to send me patches to
look at.

Thanks!

>
>Thanks!
>
>Cheers,
>
>
>
>--
>Antonio Quartulli
>