Re: [ofa-general] Re: [PATCH v4 14/14] QLogic VNIC: sysfs Documentation
From: Patrick McHardy <hidden>
Date: 2008-06-19 01:19:14
Jason Gunthorpe wrote:
On Wed, Jun 18, 2008 at 02:38:00PM +0200, Patrick McHardy wrote:quoted
quoted
Currently we register netdevice only after we have made sure that we can connect to the EVIC and that there are enough resources on the EVIC to support this virtual ethernet interface. But if we register the netdevice without making sure that we can reach the EVIC and that it has resources, there is a possibility that we register a netdevice that can never become active.
>>
quoted
Thats similar to a ethernet device that never has a cable plugged in. You should register the device with its carrier turned off, then change the carrier state once the connection has been established.I would also encourage you to embrace this view of the VNIC as a tunnel fully and let the administrator re-target an active netdevice to a different VNIC without tearing down the netdevice..
That has nothing to do with when the device is registered. Look at the existing tunnel devices, they *all* follow the scheme I described (and all of them can be "retargeted"). The simple point is: not one device with a pure kernel driver uses asynchronous registration. The question you haven't answered is: why doesn't carrier state work for you?
The user space interface for that pretty much come for free with the netlink implementation, one of the advantages I suppose..
Yes, a more or less clean interface (at least forceably following the major existing conventions) comes with it automatically (the driver private details still can be done well or less well of course). But as multiple people have already stated, we gladly offer assistance.