linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FW: udev documentation
@ 2010-07-14 22:34 Donnelly, John (ISS (SNI), Houston)
  2010-07-15  4:22 ` Greg KH
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-14 22:34 UTC (permalink / raw)
  To: linux-hotplug

 


Hello folks.

I am investigating how to create a class of Ethernet devices to be managed under udev 
Is there more documentation other than the man pages for udev ? I checked the kernel/Documentation too. 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
@ 2010-07-15  4:22 ` Greg KH
  2010-07-15 14:10 ` Donnelly, John (ISS (SNI), Houston)
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2010-07-15  4:22 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jul 14, 2010 at 10:34:35PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
> I am investigating how to create a class of Ethernet devices to be
> managed under udev 

What do you mean "managed under udev"?  Right now udev can handle
renaming network devices, and ethtool is used for all sorts of other
configuration options of ethernet devices.  What is currently missing?

> Is there more documentation other than the man pages for udev ? I
> checked the kernel/Documentation too. 

What are you trying to do that didn't work out that the documentation is
not covering?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
  2010-07-15  4:22 ` Greg KH
@ 2010-07-15 14:10 ` Donnelly, John (ISS (SNI), Houston)
  2010-07-15 14:22 ` Greg KH
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-15 14:10 UTC (permalink / raw)
  To: linux-hotplug

 
Hi,

I don't see any interaction by udevd on behave of ethernet adapters during boot
after an adapter and driver RPM are added. Generally, the RPM install phase
modifies /etc/modprobe.conf .

It appears that NEAT (system-config-network) and NetManager create the 
/etc/system/networking/ifcfg-ethX files. 

There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?


-----Original Message-----
From: Greg KH [mailto:greg@kroah.com] 
Sent: Wednesday, July 14, 2010 11:22 PM
To: Donnelly, John (ISS (SNI), Houston)
Cc: linux-hotplug@vger.kernel.org
Subject: Re: FW: udev documentation

On Wed, Jul 14, 2010 at 10:34:35PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
> I am investigating how to create a class of Ethernet devices to be 
> managed under udev

What do you mean "managed under udev"?  Right now udev can handle renaming network devices, and ethtool is used for all sorts of other configuration options of ethernet devices.  What is currently missing?

> Is there more documentation other than the man pages for udev ? I 
> checked the kernel/Documentation too.

What are you trying to do that didn't work out that the documentation is not covering?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
  2010-07-15  4:22 ` Greg KH
  2010-07-15 14:10 ` Donnelly, John (ISS (SNI), Houston)
@ 2010-07-15 14:22 ` Greg KH
  2010-07-15 14:33 ` Kay Sievers
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2010-07-15 14:22 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jul 15, 2010 at 02:10:35PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
>  
> Hi,
> 
> I don't see any interaction by udevd on behave of ethernet adapters during boot
> after an adapter and driver RPM are added. Generally, the RPM install phase
> modifies /etc/modprobe.conf .

That's up to rpm scripts, and has nothing to do with udev, right?

> It appears that NEAT (system-config-network) and NetManager create the 
> /etc/system/networking/ifcfg-ethX files. 

Ok, but that's a distro thing, right?

> There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?

No.

What are you looking to have udev do?  What is the problem you are
having?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (2 preceding siblings ...)
  2010-07-15 14:22 ` Greg KH
@ 2010-07-15 14:33 ` Kay Sievers
  2010-07-15 15:51 ` Donnelly, John (ISS (SNI), Houston)
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Kay Sievers @ 2010-07-15 14:33 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jul 15, 2010 at 16:22, Greg KH <greg@kroah.com> wrote:
> On Thu, Jul 15, 2010 at 02:10:35PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
>> I don't see any interaction by udevd on behave of ethernet adapters during boot
>> after an adapter and driver RPM are added. Generally, the RPM install phase
>> modifies /etc/modprobe.conf .
>
> That's up to rpm scripts, and has nothing to do with udev, right?
>
>> It appears that NEAT (system-config-network) and NetManager create the
>> /etc/system/networking/ifcfg-ethX files.
>
> Ok, but that's a distro thing, right?
>
>> There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?
>
> No.
>
> What are you looking to have udev do?  What is the problem you are
> having?

That's distro specific too, and not part of udev.

Udev has a script and a dynamically updated rule for persistent
network interface naming. That's all.

Udev has no idea what a network interface is, or how to manage any
network interface. There is no config from udev to apply, besides the
possible renaming of the interface before userspace is notified about
the newly added device.

All further network specific properties are not managed by udev.

Kay

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (3 preceding siblings ...)
  2010-07-15 14:33 ` Kay Sievers
@ 2010-07-15 15:51 ` Donnelly, John (ISS (SNI), Houston)
  2010-07-15 15:53 ` Donnelly, John (ISS (SNI), Houston)
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-15 15:51 UTC (permalink / raw)
  To: linux-hotplug

 

-----Original Message-----
From: Kay Sievers [mailto:kay.sievers@vrfy.org] 

> >What are you looking to have udev do?  What is the problem you are 
> >having?

> That's distro specific too, and not part of udev.

> Udev has a script and a dynamically updated rule for persistent network interface naming. That's all.

>Udev has no idea what a network interface is, or how to manage any network interface. 
>There is no config from udev to apply, besides the possible renaming of the interface before 
> userspace is notified about the newly added device.

I'm tracing udevd in "debug" mode and I see no invocation of /etc/udev/<>/60-net.rules.d  on boot.

I am considering a ethernet device a "network" subsystem . What subtle point am I missing ?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (4 preceding siblings ...)
  2010-07-15 15:51 ` Donnelly, John (ISS (SNI), Houston)
@ 2010-07-15 15:53 ` Donnelly, John (ISS (SNI), Houston)
  2010-07-15 16:05 ` Kay Sievers
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-15 15:53 UTC (permalink / raw)
  To: linux-hotplug

 
>> There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?

>No.

>What are you looking to have udev do?  What is the problem you are having?

Using static MAC's within a system creates config conflicts when adapters are exchanged 
that have different PCI-ID and drivers. Often the reconfigured machine will not boot 
(because of  modprobe entries ) or network (ifcfg-ethX ) bring up fails because 
of stale configuration data left behind by the s-c-n tools. 

I am seeking to understand how make a more dynamic ETHERNET configuration manager (and underlying components) that bonds PCI-IDs and drivers to a ETHERNET device better than they currently do. When I remove/replace an adapter
with a different one I want to invoke udev to clean up stale ethX and modprobe references.

For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ? My impression now 
is a driver of the "net" class has to post a message to udev to get processed by udevd,
which rules a script/program.

Is that correct ? 

> confused,

 Mine comes and goes. 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (5 preceding siblings ...)
  2010-07-15 15:53 ` Donnelly, John (ISS (SNI), Houston)
@ 2010-07-15 16:05 ` Kay Sievers
  2010-07-15 16:08 ` Greg KH
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Kay Sievers @ 2010-07-15 16:05 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jul 15, 2010 at 17:53, Donnelly, John (ISS (SNI), Houston)
<john.donnelly@hp.com> wrote:
>
>>> There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?
>
>>No.
>
>>What are you looking to have udev do?  What is the problem you are having?
>
> Using static MAC's within a system creates config conflicts when adapters are exchanged
> that have different PCI-ID and drivers. Often the reconfigured machine will not boot
> (because of  modprobe entries ) or network (ifcfg-ethX ) bring up fails because
> of stale configuration data left behind by the s-c-n tools.
>
> I am seeking to understand how make a more dynamic ETHERNET configuration manager (and underlying components) that bonds PCI-IDs and drivers to a ETHERNET device better than they currently do. When I remove/replace an adapter
> with a different one I want to invoke udev to clean up stale ethX and modprobe references.
>
> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ? My impression now
> is a driver of the "net" class has to post a message to udev to get processed by udevd,
> which rules a script/program.
>
> Is that correct ?

The kernel creates the device (all the stuff that is in
/sys/devices/), udevd receives the message over netlink (like for all
other devices too).

Udevd matches the rules against the received event, and executes the
specified instructions.

/etc/udev/rules.d/60-net.rules is something a specific distro added,
and not part of udev. All that stuff is different on every single
distro.

Kay

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (6 preceding siblings ...)
  2010-07-15 16:05 ` Kay Sievers
@ 2010-07-15 16:08 ` Greg KH
  2010-07-16 15:46 ` Donnelly, John (ISS (SNI), Houston)
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2010-07-15 16:08 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jul 15, 2010 at 03:53:11PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
>  
> >> There are 60-net.rules under /etc/udev ... Are ethernet devices a separate category ?
> 
> >No.
> 
> >What are you looking to have udev do?  What is the problem you are having?
> 
> Using static MAC's within a system creates config conflicts when
> adapters are exchanged that have different PCI-ID and drivers. Often
> the reconfigured machine will not boot (because of  modprobe entries )
> or network (ifcfg-ethX ) bring up fails because of stale configuration
> data left behind by the s-c-n tools. 

Then don't do that :)

Wait, what is "s-c-n" tools?

> I am seeking to understand how make a more dynamic ETHERNET
> configuration manager (and underlying components) that bonds PCI-IDs
> and drivers to a ETHERNET device better than they currently do.

The in-kernel driver does this type of "bonding".  You mean you want to
change your ethernet device naming to be more flexible, right?

> When I remove/replace an adapter with a different one I want to invoke
> udev to clean up stale ethX and modprobe references.

What do you mean by "modprobe references"?  The kernel will auto-load
drivers when it finds a device that it needs a driver for, right?

And when you remove an ethernet device, the kernel removes the ethX
device, and any userspace mappings you had you need to then clean up as
well on your own.

> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ?

When a ethX device is reported as created by the kernel.

> My impression now is a driver of the "net" class has to post a message
> to udev to get processed by udevd, which rules a script/program.

Yes, but the core kernel logic does the "message send" here, and udevd
handles it automatically.

hope this helps,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (7 preceding siblings ...)
  2010-07-15 16:08 ` Greg KH
@ 2010-07-16 15:46 ` Donnelly, John (ISS (SNI), Houston)
  2010-07-19 18:51 ` Donnelly, John (ISS (SNI), Houston)
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-16 15:46 UTC (permalink / raw)
  To: linux-hotplug

 
> 
> >What are you looking to have udev do?  What is the problem you are having?
> 
> Using static MAC's within a system creates config conflicts when 
> adapters are exchanged that have different PCI-ID and drivers. Often 
> the reconfigured machine will not boot (because of  modprobe entries ) 
> or network (ifcfg-ethX ) bring up fails because of stale configuration 
> data left behind by the s-c-n tools.

Then don't do that :)

 -> It is the infrastructure ... and it's not unique among Enterprise systems. 

Wait, what is "s-c-n" tools?

  -> system-config-network, aka .. NEAT.  

> I am seeking to understand how make a more dynamic ETHERNET 
> configuration manager (and underlying components) that bonds PCI-IDs 
> and drivers to a ETHERNET device better than they currently do.

The in-kernel driver does this type of "bonding".  You mean you want to change your ethernet device naming to be more flexible, right?

> When I remove/replace an adapter with a different one I want to invoke 
> udev to clean up stale ethX and modprobe references.
 
And when you remove an ethernet device, the kernel removes the ethX device, and any userspace mappings you had you need to then clean up as well on your own.

    -> That is the issue.  There appears to be no notification . 

>> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ?

When a ethX device is reported as created by the kernel.

-> On RH (5.5), 60-net.rules never get invoked on boot for a ethernet adapter. 




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (8 preceding siblings ...)
  2010-07-16 15:46 ` Donnelly, John (ISS (SNI), Houston)
@ 2010-07-19 18:51 ` Donnelly, John (ISS (SNI), Houston)
  2010-07-20 17:31 ` Greg KH
  2010-07-20 17:36 ` Donnelly, John (ISS (SNI), Houston)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-19 18:51 UTC (permalink / raw)
  To: linux-hotplug

 
And when you remove an ethernet device, the kernel removes the ethX device, and any userspace mappings you had you need to then clean up as well on your own.

    -> That is the issue.  There appears to be no notification . 

>> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ?

When a ethX device is reported as created by the kernel.

-> On RH (5.5), 60-net.rules never get invoked on boot for a ethernet adapter. 



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (9 preceding siblings ...)
  2010-07-19 18:51 ` Donnelly, John (ISS (SNI), Houston)
@ 2010-07-20 17:31 ` Greg KH
  2010-07-20 17:36 ` Donnelly, John (ISS (SNI), Houston)
  11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2010-07-20 17:31 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 19, 2010 at 06:51:19PM +0000, Donnelly, John (ISS (SNI), Houston) wrote:
>  
> And when you remove an ethernet device, the kernel removes the ethX device, and any userspace mappings you had you need to then clean up as well on your own.
> 
>     -> That is the issue.  There appears to be no notification . 
> 
> >> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ?
> 
> When a ethX device is reported as created by the kernel.
> 
> -> On RH (5.5), 60-net.rules never get invoked on boot for a ethernet adapter. 

Then file a bug with Red Hat about this, not much we can do about it
here, right?

good luck,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: FW: udev documentation
  2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
                   ` (10 preceding siblings ...)
  2010-07-20 17:31 ` Greg KH
@ 2010-07-20 17:36 ` Donnelly, John (ISS (SNI), Houston)
  11 siblings, 0 replies; 13+ messages in thread
From: Donnelly, John (ISS (SNI), Houston) @ 2010-07-20 17:36 UTC (permalink / raw)
  To: linux-hotplug


> 
>     -> That is the issue.  There appears to be no notification . 
> 
> >> For instance .. how does /etc/udev/rules.d/60-net.rules get invoked ?
> 
> When a ethX device is reported as created by the kernel.
> 
> -> On RH (5.5), 60-net.rules never get invoked on boot for a ethernet adapter. 

Then file a bug with Red Hat about this, not much we can do about it here, right?

good luck,

 --> Thanks !      That is what I am trying to identify.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-07-20 17:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 22:34 FW: udev documentation Donnelly, John (ISS (SNI), Houston)
2010-07-15  4:22 ` Greg KH
2010-07-15 14:10 ` Donnelly, John (ISS (SNI), Houston)
2010-07-15 14:22 ` Greg KH
2010-07-15 14:33 ` Kay Sievers
2010-07-15 15:51 ` Donnelly, John (ISS (SNI), Houston)
2010-07-15 15:53 ` Donnelly, John (ISS (SNI), Houston)
2010-07-15 16:05 ` Kay Sievers
2010-07-15 16:08 ` Greg KH
2010-07-16 15:46 ` Donnelly, John (ISS (SNI), Houston)
2010-07-19 18:51 ` Donnelly, John (ISS (SNI), Houston)
2010-07-20 17:31 ` Greg KH
2010-07-20 17:36 ` Donnelly, John (ISS (SNI), Houston)

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).