* [RFD] Network configuration data in sysfs
@ 2011-10-23 23:35 Kirill A. Shutemov
2011-10-24 0:49 ` David Miller
2011-10-24 20:17 ` Stephen Hemminger
0 siblings, 2 replies; 10+ messages in thread
From: Kirill A. Shutemov @ 2011-10-23 23:35 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Greg Kroah-Hartman,
Kay Sievers, Alexey Gladkov
Hi,
Currently there's no way to set or inspect network configuration (protocol
addresses, routes, etc.) through sysfs. Yes, we have netlink interface for
this, but sysfs has advantage:
- change or inspect network configuration using standard unix utilities
(echo, cat, etc.). It's useful at least in restricted environment where
no special utilities available -- initrd or stripped down busybox.
- transparent udev support. It would be nice to get this information to
udev.
Is there something fundamental preventing us to have sysfs interface for
network configuration?
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-23 23:35 [RFD] Network configuration data in sysfs Kirill A. Shutemov
@ 2011-10-24 0:49 ` David Miller
2011-10-24 1:34 ` Kirill A. Shutemov
2011-10-24 20:17 ` Stephen Hemminger
1 sibling, 1 reply; 10+ messages in thread
From: David Miller @ 2011-10-24 0:49 UTC (permalink / raw)
To: kirill
Cc: netdev, kuznet, jmorris, yoshfuji, kaber, gregkh, kay.sievers,
gladkov.alexey
From: "Kirill A. Shutemov" <kirill@shutemov.name>
Date: Mon, 24 Oct 2011 02:35:58 +0300
> Is there something fundamental preventing us to have sysfs interface for
> network configuration?
Netlink already provides everything sysfs would potentially provide as
well as event tracking.
udev could just listen to a netlink socket and notice all changes to
addresses, routes, and device states.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 0:49 ` David Miller
@ 2011-10-24 1:34 ` Kirill A. Shutemov
2011-10-24 3:24 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Kirill A. Shutemov @ 2011-10-24 1:34 UTC (permalink / raw)
To: David Miller, kay.sievers
Cc: netdev, kuznet, jmorris, yoshfuji, kaber, gregkh, gladkov.alexey
On Sun, Oct 23, 2011 at 08:49:43PM -0400, David Miller wrote:
> From: "Kirill A. Shutemov" <kirill@shutemov.name>
> Date: Mon, 24 Oct 2011 02:35:58 +0300
>
> > Is there something fundamental preventing us to have sysfs interface for
> > network configuration?
>
> Netlink already provides everything sysfs would potentially provide as
> well as event tracking.
Not everything. You still need special utilities to view/change the
configuration.
> udev could just listen to a netlink socket and notice all changes to
> addresses, routes, and device states.
Yes, potentially. I'm not sure if it fits well to udev design.
Kay, any comments?
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 1:34 ` Kirill A. Shutemov
@ 2011-10-24 3:24 ` David Miller
2011-10-24 4:24 ` Kirill A. Shutemov
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2011-10-24 3:24 UTC (permalink / raw)
To: kirill
Cc: kay.sievers, netdev, kuznet, jmorris, yoshfuji, kaber, gregkh,
gladkov.alexey
From: "Kirill A. Shutemov" <kirill@shutemov.name>
Date: Mon, 24 Oct 2011 04:34:07 +0300
> On Sun, Oct 23, 2011 at 08:49:43PM -0400, David Miller wrote:
>> From: "Kirill A. Shutemov" <kirill@shutemov.name>
>> Date: Mon, 24 Oct 2011 02:35:58 +0300
>>
>> > Is there something fundamental preventing us to have sysfs interface for
>> > network configuration?
>>
>> Netlink already provides everything sysfs would potentially provide as
>> well as event tracking.
>
> Not everything. You still need special utilities to view/change the
> configuration.
You can use netlink to perform any configuration change you want, or
to view any network configuration setting.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 3:24 ` David Miller
@ 2011-10-24 4:24 ` Kirill A. Shutemov
2011-10-24 4:59 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Kirill A. Shutemov @ 2011-10-24 4:24 UTC (permalink / raw)
To: David Miller
Cc: kay.sievers, netdev, kuznet, jmorris, yoshfuji, kaber, gregkh,
gladkov.alexey
On Sun, Oct 23, 2011 at 11:24:16PM -0400, David Miller wrote:
> From: "Kirill A. Shutemov" <kirill@shutemov.name>
> Date: Mon, 24 Oct 2011 04:34:07 +0300
>
> > On Sun, Oct 23, 2011 at 08:49:43PM -0400, David Miller wrote:
> >> From: "Kirill A. Shutemov" <kirill@shutemov.name>
> >> Date: Mon, 24 Oct 2011 02:35:58 +0300
> >>
> >> > Is there something fundamental preventing us to have sysfs interface for
> >> > network configuration?
> >>
> >> Netlink already provides everything sysfs would potentially provide as
> >> well as event tracking.
> >
> > Not everything. You still need special utilities to view/change the
> > configuration.
>
> You can use netlink to perform any configuration change you want, or
> to view any network configuration setting.
You need /sbin/ip or similar tool to do this, right?
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 4:24 ` Kirill A. Shutemov
@ 2011-10-24 4:59 ` David Miller
2011-10-24 12:46 ` Kay Sievers
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2011-10-24 4:59 UTC (permalink / raw)
To: kirill
Cc: kay.sievers, netdev, kuznet, jmorris, yoshfuji, kaber, gregkh,
gladkov.alexey
From: "Kirill A. Shutemov" <kirill@shutemov.name>
Date: Mon, 24 Oct 2011 07:24:00 +0300
> On Sun, Oct 23, 2011 at 11:24:16PM -0400, David Miller wrote:
>> From: "Kirill A. Shutemov" <kirill@shutemov.name>
>> Date: Mon, 24 Oct 2011 04:34:07 +0300
>>
>> You can use netlink to perform any configuration change you want, or
>> to view any network configuration setting.
>
> You need /sbin/ip or similar tool to do this, right?
I'm talking about udev using netlink natively.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 4:59 ` David Miller
@ 2011-10-24 12:46 ` Kay Sievers
2011-10-24 23:54 ` Alexey Gladkov
0 siblings, 1 reply; 10+ messages in thread
From: Kay Sievers @ 2011-10-24 12:46 UTC (permalink / raw)
To: David Miller
Cc: kirill, netdev, kuznet, jmorris, yoshfuji, kaber, gregkh,
gladkov.alexey
On Mon, Oct 24, 2011 at 06:59, David Miller <davem@davemloft.net> wrote:
> From: "Kirill A. Shutemov" <kirill@shutemov.name>
> Date: Mon, 24 Oct 2011 07:24:00 +0300
>
>> On Sun, Oct 23, 2011 at 11:24:16PM -0400, David Miller wrote:
>>> From: "Kirill A. Shutemov" <kirill@shutemov.name>
>>> Date: Mon, 24 Oct 2011 04:34:07 +0300
>>>
>>> You can use netlink to perform any configuration change you want, or
>>> to view any network configuration setting.
>>
>> You need /sbin/ip or similar tool to do this, right?
>
> I'm talking about udev using netlink natively.
Kirill, what exactly is the use case? And why what does udev support
mean in that context?
I doubt that "not having /sbin/ip installed" should be a reason to add
and expose complex interfaces in /sys, while we already have a
perfectly working native way to do it.
Kay
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-23 23:35 [RFD] Network configuration data in sysfs Kirill A. Shutemov
2011-10-24 0:49 ` David Miller
@ 2011-10-24 20:17 ` Stephen Hemminger
1 sibling, 0 replies; 10+ messages in thread
From: Stephen Hemminger @ 2011-10-24 20:17 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: netdev, David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, Greg Kroah-Hartman,
Kay Sievers, Alexey Gladkov
On Mon, 24 Oct 2011 02:35:58 +0300
"Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> Hi,
>
> Currently there's no way to set or inspect network configuration (protocol
> addresses, routes, etc.) through sysfs. Yes, we have netlink interface for
> this, but sysfs has advantage:
>
> - change or inspect network configuration using standard unix utilities
> (echo, cat, etc.). It's useful at least in restricted environment where
> no special utilities available -- initrd or stripped down busybox.
Last I checked busybox had a stripped down version of iproute arealdy.
> - transparent udev support. It would be nice to get this information to
> udev.
>
> Is there something fundamental preventing us to have sysfs interface for
> network configuration?
>
Sysfs does not support the concept of transactions. Many network operations
require setting multiple values at a time; which is why a message interface
like netlink works much better.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 12:46 ` Kay Sievers
@ 2011-10-24 23:54 ` Alexey Gladkov
2011-10-25 7:57 ` Kay Sievers
0 siblings, 1 reply; 10+ messages in thread
From: Alexey Gladkov @ 2011-10-24 23:54 UTC (permalink / raw)
To: Kay Sievers
Cc: David Miller, kirill, netdev, kuznet, jmorris, yoshfuji, kaber,
gregkh
24.10.2011 16:46, Kay Sievers wrote:
> Kirill, what exactly is the use case? And why what does udev support
> mean in that context?
>
> I doubt that "not having /sbin/ip installed" should be a reason to add
> and expose complex interfaces in /sys, while we already have a
> perfectly working native way to do it.
Adding NETLINK_ROUTE in udev is a way to perform some actions in case
of network events without polling. Now there are only a few specific
daemons (NM, connman etc) that are listen to the netlink socket and
setup the network his own way.
--
Rgrds, legion
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFD] Network configuration data in sysfs
2011-10-24 23:54 ` Alexey Gladkov
@ 2011-10-25 7:57 ` Kay Sievers
0 siblings, 0 replies; 10+ messages in thread
From: Kay Sievers @ 2011-10-25 7:57 UTC (permalink / raw)
To: Alexey Gladkov
Cc: David Miller, kirill, netdev, kuznet, jmorris, yoshfuji, kaber,
gregkh
On Tue, Oct 25, 2011 at 01:54, Alexey Gladkov <gladkov.alexey@gmail.com> wrote:
> 24.10.2011 16:46, Kay Sievers wrote:
>> Kirill, what exactly is the use case? And why what does udev support
>> mean in that context?
>>
>> I doubt that "not having /sbin/ip installed" should be a reason to add
>> and expose complex interfaces in /sys, while we already have a
>> perfectly working native way to do it.
>
> Adding NETLINK_ROUTE in udev is a way to perform some actions in case
> of network events without polling. Now there are only a few specific
> daemons (NM, connman etc) that are listen to the netlink socket and
> setup the network his own way.
I'm not really convinced that udev should be in charge of network
config changes, it's a really complex area. Udev is a generic kernel
device manager, not a network setup manager.
Our point of view is, that all services depending on network state
changes should listen to netlink themselves, and not be worked around
with tools like udev to execute stuff and notify them.
But again, what's the use-case for that you have in mind?
Kay
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-10-25 7:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-23 23:35 [RFD] Network configuration data in sysfs Kirill A. Shutemov
2011-10-24 0:49 ` David Miller
2011-10-24 1:34 ` Kirill A. Shutemov
2011-10-24 3:24 ` David Miller
2011-10-24 4:24 ` Kirill A. Shutemov
2011-10-24 4:59 ` David Miller
2011-10-24 12:46 ` Kay Sievers
2011-10-24 23:54 ` Alexey Gladkov
2011-10-25 7:57 ` Kay Sievers
2011-10-24 20:17 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).