X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdpif-netdev.c;h=1dee14b476e92c690a341ad6ea91db9b2b78588a;hb=56cac225ae4df8ff0c50a806b78abdb6ac96c33a;hp=8abf1f93f306219353abe1f304d99102e939e627;hpb=2ad2eb042517b975d761d456cceb5c9325c4aaa7;p=openvswitch diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 8abf1f93..1dee14b4 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -64,7 +64,7 @@ struct dp_netdev { struct list node; int dp_idx; int open_cnt; - bool deleted; + bool destroyed; bool drop_frags; /* Drop all IP fragments, if true. */ struct ovs_queue queues[N_QUEUES]; /* Messages queued for dpif_recv(). */ @@ -245,7 +245,7 @@ create_dp_netdev(const char *name, int dp_idx, struct dpif **dpifp) } static int -dpif_netdev_open(const char *name, const char *type UNUSED, bool create, +dpif_netdev_open(const char *name, const char *type OVS_UNUSED, bool create, struct dpif **dpifp) { if (create) { @@ -307,17 +307,17 @@ dpif_netdev_close(struct dpif *dpif) { struct dp_netdev *dp = get_dp_netdev(dpif); assert(dp->open_cnt > 0); - if (--dp->open_cnt == 0 && dp->deleted) { + if (--dp->open_cnt == 0 && dp->destroyed) { dp_netdev_free(dp); } free(dpif); } static int -dpif_netdev_delete(struct dpif *dpif) +dpif_netdev_destroy(struct dpif *dpif) { struct dp_netdev *dp = get_dp_netdev(dpif); - dp->deleted = true; + dp->destroyed = true; return 0; } @@ -582,7 +582,7 @@ dpif_netdev_port_list(const struct dpif *dpif, struct odp_port *ports, int n) } static int -dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep UNUSED) +dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep OVS_UNUSED) { struct dpif_netdev *dpif = dpif_netdev_cast(dpif_); if (dpif->dp_serial != dpif->dp->serial) { @@ -1310,7 +1310,7 @@ const struct dpif_class dpif_netdev_class = { dpif_netdev_open, dpif_netdev_close, NULL, /* get_all_names */ - dpif_netdev_delete, + dpif_netdev_destroy, dpif_netdev_get_stats, dpif_netdev_get_drop_frags, dpif_netdev_set_drop_frags,