[ovs-dev] [PATCH 14/18] keep "kernel name" for each netdev

Ben Pfaff blp at nicira.com
Thu Jan 31 17:40:05 UTC 2013

On Thu, Jan 31, 2013 at 07:49:48PM +0900, YAMAMOTO Takashi wrote:
> From: YAMAMOTO Takashi <yamt at mwd.biglobe.ne.jp>
> where interface renaming is not supported (NetBSD), remember both of
> our netdev name and the correspoinding kernel name separately.
> the latter is necessary to talk with kernel using interface names.
> eg. ifioctls, bpf
> XXX there should be a proper way to query kernel name.
> Signed-off-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>

So is the issue here that on NetBSD one cannot specify the name for a
new tap device?  The kernel always assigns its own name?  Then there
might be an extra problem.  Consider this case:

        * ovs-vswitchd starts up and creates some tap devices.  It knows
          the mapping between the user-requested name and the kernel

        * Admin restarts ovs-vswitchd.

        * New instance of ovs-vswitchd creates new tap devices because
          it does not know the kernel names of the existing ones and
          does not have a way to discover them.  The existing ones are
          effectively leaked.

Furthermore, it seems likely that the tap devices created this way will
not actually be useful to the user, because the user does not have any
way, either, to discover the mapping between his names and the kernel
names.  Thus, the user doesn't know how to use the kernel tap devices.

I am not sure that OVS-created tap devices are that useful anyway.  I've
thought for some time of removing them from OVS entirely.  But it seems
that they are likely to be even less useful on netbsd.  Should we simply
not support them there?

(OVS-created tap devices are distinct from tap devices created other
ways, which at least on Linux can be added to an OVS bridge in the usual
way and don't require any special support.  Thus, removing this feature
would not keep OVS from working with tap devices.)

More information about the dev mailing list