X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport-internal_dev.c;h=1df61801179a0871f46072dbfce71a236f5cf7ce;hb=0a6f55420508c31af9fe41aafdd26ce8462cc1be;hp=c88fb3b393267fd2e498a7e958166e6f2922d5e5;hpb=c052da844bdf7fc2f87500f76fca529c4e3dc598;p=openvswitch diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index c88fb3b3..1df61801 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 2011 Nicira Networks. * Distributed under the terms of the GNU GPL version 2. * * Significant portions of this file may be copied from parts of the Linux @@ -93,10 +93,7 @@ static int internal_dev_stop(struct net_device *netdev) static void internal_dev_getinfo(struct net_device *netdev, struct ethtool_drvinfo *info) { - struct vport *vport = internal_dev_get_vport(netdev); - strcpy(info->driver, "openvswitch"); - sprintf(info->bus_info, "%d.%d", vport->dp->dp_idx, vport->port_no); } static const struct ethtool_ops internal_dev_ethtool_ops = { @@ -219,9 +216,8 @@ static int internal_dev_destroy(struct vport *vport) netif_stop_queue(netdev_vport->dev); dev_set_promiscuity(netdev_vport->dev, -1); - synchronize_rcu(); - unregister_netdevice(netdev_vport->dev); + /* unregister_netdevice() waits for an RCU grace period. */ vport_free(vport); return 0; @@ -250,7 +246,7 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb) } const struct vport_ops internal_vport_ops = { - .type = "internal", + .type = ODP_VPORT_TYPE_INTERNAL, .flags = VPORT_F_REQUIRED | VPORT_F_GEN_STATS | VPORT_F_FLOW, .create = internal_dev_create, .destroy = internal_dev_destroy,