Sorry for the spam, I'm about to drop the patch, From the manual, https://www.freebsd.org/cgi/man.cgi?format=html&query=tap(4)
It says that the tap devices "persist until if_tap.ko module is unloaded, or until removed with "ifconfig destroy". And that's why I encountered the ENODEV error when 'kill' and recreate ovs-vswitchd. If I also reload the tap kernel module, everything works. Thanks, Alex Wang, On Tue, Feb 24, 2015 at 3:43 PM, Alex Wang <[email protected]> wrote: > In FreeBSD, the 'SIOCSIFNAME' is not a supported ioctl call for tap > device. However, the current OVS code uses it to rename the 'internal' > interface in dpif-netdev datapath and causes 'ENODEV' error. > > This commit fixes it by removing the rename and just using the default > tap device name. > > Signed-off-by: Alex Wang <[email protected]> > --- > lib/netdev-bsd.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) > > diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c > index 00e8bcd..e6663f9 100644 > --- a/lib/netdev-bsd.c > +++ b/lib/netdev-bsd.c > @@ -335,22 +335,9 @@ netdev_bsd_construct_tap(struct netdev *netdev_) > goto error_unref_notifier; > } > > - /* Change the name of the tap device */ > -#if defined(SIOCSIFNAME) > - ifr.ifr_data = (void *)name; > - error = af_inet_ioctl(SIOCSIFNAME, &ifr); > - if (error) { > - destroy_tap(netdev->tap_fd, ifr.ifr_name); > - goto error_unref_notifier; > - } > - kernel_name = xstrdup(name); > -#else > - /* > - * NetBSD doesn't support inteface renaming. > - */ > + /* Tap device does not support renaming. */ > VLOG_INFO("tap %s is created for bridge %s", ifr.ifr_name, name); > kernel_name = xstrdup(ifr.ifr_name); > -#endif > > /* set non-blocking. */ > error = set_nonblocking(netdev->tap_fd); > -- > 1.7.9.5 > > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
