* 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.
}
static int
-dpif_linux_delete(struct dpif *dpif_)
+dpif_linux_destroy(struct dpif *dpif_)
{
return do_ioctl(dpif_, ODP_DP_DESTROY, NULL);
}
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,
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(). */
{
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;
}
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,
{
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();
}
}
}
{
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();
}
}
}
* 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);
}
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);
}
}