[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPXgP10Y6F_bdqxK6Oopkfs0Ppwwse=zjc=+h30t0ABWNOunMg@mail.gmail.com>
Date: Wed, 11 Jan 2012 18:03:53 +0100
From: Kay Sievers <kay.sievers@...y.org>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Michael Tokarev <mjt@....msk.ru>,
"Michael S. Tsirkin" <mst@...hat.com>, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH] vhost-net: add module alias
On Wed, Jan 11, 2012 at 17:58, Stephen Hemminger <shemminger@...tta.com> wrote:
> On Wed, 11 Jan 2012 11:07:47 +0400
> Michael Tokarev <mjt@....msk.ru> wrote:
>
>> On 11.01.2012 08:54, Stephen Hemminger wrote:
>> > By adding the a module alias, programs (or users) won't have to explicitly
>> > call modprobe. Vhost-net will always be available if built into the kernel.
>> > It does require assigning a permanent minor number for depmod to work.
>> > Choose one next to TUN since this driver is related to it.
>>
>> Why do you think a statically-allocated device number will do any good
>> at all?
It's totally fine to use them for single-instance devices. You are
right, enumerated devices must _never_ use any facility like that.
That would just be broken.
>> Static /dev is gone almost completely, at least on the systems
>> where whole virt stuff makes any sense, so you don't have pre-created
>> vhost-net device anymore, and hence this allocation makes no sense.
>> Just IMHO anyway.
It makes a lot of sense in this case. The kernel module files
advertise the dev_t, it's not stored anywhere else. UDev finds these
static numbers and does inplicit mkdev() for them.
> The statically allocated device number is required for the udev/module
> autoloading to work. Probably the udev infrastructure needs a consistent
> number to hang off of.
It does that properly.
Just check:
$ cat /lib/modules/$(uname -r)/modules.devname
# Device nodes to trigger on-demand module loading.
fuse fuse c10:229
btrfs btrfs-control c10:234
ppp_generic ppp c108:0
tun net/tun c10:200
uinput uinput c10:223
...
Kay
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists