ofproto: Drop unneeded poll_immediate_wake().
[openvswitch] / lib / netdev-patch.c
index 22353a196940f6769c38531863c4a686c47478dd..5a0eea7155a7f6b216c64d70e838a103fa715832 100644 (file)
 #include "openvswitch/datapath-protocol.h"
 #include "packets.h"
 #include "socket-util.h"
-
-#define THIS_MODULE VLM_netdev_patch
 #include "vlog.h"
 
+VLOG_DEFINE_THIS_MODULE(netdev_patch)
+
 struct netdev_dev_patch {
     struct netdev_dev netdev_dev;
 };
@@ -85,8 +85,9 @@ parse_config(const char *name, const struct shash *args,
 }
 
 static int
-netdev_patch_create(const char *name, const char *type OVS_UNUSED,
-                  const struct shash *args, struct netdev_dev **netdev_devp)
+netdev_patch_create(const struct netdev_class *class OVS_UNUSED,
+                    const char *name, const struct shash *args,
+                    struct netdev_dev **netdev_devp)
 {
     int err;
     struct odp_vport_add ova;
@@ -103,7 +104,7 @@ netdev_patch_create(const char *name, const char *type OVS_UNUSED,
     ova.config = (char *)peer;
 
     err = netdev_vport_do_ioctl(ODP_VPORT_ADD, &ova);
-    if (err == EEXIST) {
+    if (err == EBUSY) {
         VLOG_WARN("%s: destroying existing device", name);
 
         err = netdev_vport_do_ioctl(ODP_VPORT_DEL, ova.devname);
@@ -202,12 +203,23 @@ const struct netdev_class netdev_patch_class = {
     NULL,                       /* get_ifindex */
     netdev_vport_get_carrier,
     netdev_vport_get_stats,
-    NULL,                       /* set_stats */
+    netdev_vport_set_stats,
 
     NULL,                       /* get_features */
     NULL,                       /* set_advertisements */
     NULL,                       /* get_vlan_vid */
+
     NULL,                       /* set_policing */
+    NULL,                       /* get_qos_types */
+    NULL,                       /* get_qos_capabilities */
+    NULL,                       /* get_qos */
+    NULL,                       /* set_qos */
+    NULL,                       /* get_queue */
+    NULL,                       /* set_queue */
+    NULL,                       /* delete_queue */
+    NULL,                       /* get_queue_stats */
+    NULL,                       /* dump_queues */
+    NULL,                       /* dump_queue_stats */
 
     NULL,                       /* get_in4 */
     NULL,                       /* set_in4 */