sysfs-only operation of bridges?

Denys Vlasenko vda.linux at googlemail.com
Sun Jul 5 11:30:43 UTC 2009


On Sunday 05 July 2009 12:58, Bernhard Reutner-Fischer wrote:
> On Sun, Jul 05, 2009 at 04:02:48AM +0200, Denys Vlasenko wrote:
> 
> >brctl needs to be rewritten to use newer kernel API...
> >it uses deprecated ioctl now.
> 
> So.. did Stephen fix this by now, i.e. can you operate a bridge
> via sysfs *only* nowadays¹) ?
> 
> cheers,
> 
> PS:
> We are concerned about the size of the brctl(8) ²)
> 
> ¹)
> http://lists.busybox.net/pipermail/busybox/2008-April/065314.html
> and
> https://lists.linux-foundation.org/pipermail/bridge/2008-May/005839.html
> https://lists.linux-foundation.org/pipermail/bridge/2008-May/005838.html
> ²) ioctl-only impl
> http://git.busybox.net/busybox/tree/networking/brctl.c
> needs less than 2400 bytes, including any fancy stuff and show* support.
> If we can switch to sysfs-only then we can probably keep that size or
> even reduce it, but if we have to use 2 separate operation-modi (ioctl for
> adding/deleting a bridge and interfaces *and* sysfs for the param-setting),
> then this would add undue size.

Well. 32/64-bit setup on the x86-64 arch _must_ use sysfs:

On kernel side, bridge ioctls lack compat translation,
and IIUC it is missing because ioctl are declared deprecated,
and thus it is considered waste of time to fix that.

Considering that 32/64-bit setup on the x86-64 is used by millions
of users, this is a very serious reason to use sysfs.
--
vda


More information about the busybox mailing list