From: Jesse Gross Date: Mon, 8 Feb 2010 18:22:41 +0000 (-0500) Subject: Fix some regressions from the merge from master. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dab847a19503f537c57c2215748f0b50b94f51e;p=openvswitch Fix some regressions from the merge from master. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 6a3b9ec7..46bb6961 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -670,7 +670,7 @@ out: * 4. CHECKSUM_UNNECESSARY (with proto_csum_blank true): This packet was * generated locally by a Xen DomU and has a partial checksum. If it is * handled on this machine (Dom0 or DomU), then the checksum will not be - * computed. If it goes off box, the checksum in the packet needs to + * computed. If it goes off box, the checksum in the packet needs to be * completed. Calling skb_checksum_setup converts this to CHECKSUM_HW * (CHECKSUM_PARTIAL) so that the checksum can be completed. In later * kernels, this combination is replaced with CHECKSUM_PARTIAL. diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index d707b46c..ddf9298e 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -188,7 +188,7 @@ dpif_linux_get_all_names(const struct dpif *dpif_, struct svec *all_names) } static int -dpif_linux_delete(struct dpif *dpif_) +dpif_linux_destroy(struct dpif *dpif_) { return do_ioctl(dpif_, ODP_DP_DESTROY, NULL); } @@ -467,7 +467,7 @@ const struct dpif_class dpif_linux_class = { dpif_linux_open, dpif_linux_close, dpif_linux_get_all_names, - dpif_linux_delete, + dpif_linux_destroy, dpif_linux_get_stats, dpif_linux_get_drop_frags, dpif_linux_set_drop_frags, diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 8abf1f93..042837c1 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(). */ @@ -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; } @@ -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, diff --git a/lib/netdev.c b/lib/netdev.c index ddd6e92c..78d6a924 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -89,9 +89,9 @@ netdev_run(void) { struct shash_node *node; SHASH_FOR_EACH(node, &netdev_classes) { - const struct netdev_class *class = node->data; - if (class->run) { - class->run(); + const struct netdev_class *netdev_class = node->data; + if (netdev_class->run) { + netdev_class->run(); } } } @@ -105,9 +105,9 @@ netdev_wait(void) { struct shash_node *node; SHASH_FOR_EACH(node, &netdev_classes) { - const struct netdev_class *class = node->data; - if (class->wait) { - class->wait(); + const struct netdev_class *netdev_class = node->data; + if (netdev_class->wait) { + netdev_class->wait(); } } } @@ -975,12 +975,12 @@ exit: * the refcount drops to zero. */ void netdev_dev_init(struct netdev_dev *netdev_dev, const char *name, - const struct netdev_class *class_) + const struct netdev_class *netdev_class) { assert(!shash_find(&netdev_dev_shash, name)); memset(netdev_dev, 0, sizeof *netdev_dev); - netdev_dev->netdev_class = class_; + netdev_dev->netdev_class = netdev_class; netdev_dev->name = xstrdup(name); netdev_dev->node = shash_add(&netdev_dev_shash, name, netdev_dev); } @@ -1035,19 +1035,19 @@ netdev_dev_from_name(const char *name) return shash_find_data(&netdev_dev_shash, name); } -/* Fills 'device_list' with devices that match 'class'. +/* Fills 'device_list' with devices that match 'netdev_class'. * * The caller is responsible for initializing and destroying 'device_list' * but the contained netdev_devs must not be freed. */ void -netdev_dev_get_devices(const struct netdev_class *class_, +netdev_dev_get_devices(const struct netdev_class *netdev_class, struct shash *device_list) { struct shash_node *node; SHASH_FOR_EACH (node, &netdev_dev_shash) { struct netdev_dev *dev = node->data; - if (dev->netdev_class == class_) { + if (dev->netdev_class == netdev_class) { shash_add(device_list, node->name, node->data); } }