[LiSA-Devel] Vlan desc from kernel to user-space

Radu Rendec radu.rendec at mindbit.ro
Mon Apr 1 14:00:29 EEST 2013


On Mon, 2013-04-01 at 13:47 +0300, Victor Duta wrote:
> It seems that that you could use call_usermodehelper_exec in order to
> call a userspace program from kernel but this aproach seems a little
> bit messy .I think that ower best option would be to keep the
> descriptions in kernel space and make them persistent with those in
> userspace .  
> 
> On Sun, Mar 31, 2013 at 6:09 PM, Claudiu Ghioc
> <claudiughioc at gmail.com> wrote:
>         Hello,
>         
>         
>         I was working on removing the vlan description from kernel
>         structures and I came across a problem. If we do this, we will
>         not be able to show vlan (and interface) description using
>         procfs.

Don't spend time on the procfs interface of the kernel module, because
it's obsolete. It was written just because we started to work on the
kernel module first and we didn't have any other way to "look" into the
running config (the cli didn't exist at that time).

Just remove the vlan and interface description from the procfs output,
or, if it's easier, remove the procfs support completely.

There are at least 2 other reasons for going this way (besides what I've
just explained):
      * the output is limited to 4k pages, and the kernel module will
        crash if it tries to make more output (for instance if you have
        a lot of vlans)
      * procfs is considered deprecated and sysfs should be used instead
        for new modules

Radu




More information about the LiSA-Devel mailing list