datapath-protocol: Rename enums for consistency.
authorBen Pfaff <blp@nicira.com>
Wed, 5 Oct 2011 16:59:51 +0000 (09:59 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 12 Oct 2011 23:27:09 +0000 (16:27 -0700)
Most of the enum tags in this file are lowercased versions of the uppercase
enum prefixes (or slightly less abbreviated versions, e.g. "dp" becomes
"datapath").  This commit fixes up the others for consistency.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
include/openvswitch/datapath-protocol.h
lib/dpif-linux.c
lib/dpif-netdev.c
lib/odp-util.c

index 4e9c32a..b522edc 100644 (file)
@@ -99,20 +99,20 @@ enum ovs_datapath_attr {
        OVS_DP_ATTR_NAME,       /* name of dp_ifindex netdev */
        OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
        OVS_DP_ATTR_STATS,      /* struct ovs_dp_stats */
-       OVS_DP_ATTR_IPV4_FRAGS, /* 32-bit enum ovs_frag_handling */
+       OVS_DP_ATTR_IPV4_FRAGS, /* 32-bit enum ovs_datapath_frag */
        __OVS_DP_ATTR_MAX
 };
 
 #define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
 
 /**
- * enum ovs_frag_handling - policy for handling received IPv4 fragments.
+ * enum ovs_datapath_frag - policy for handling received IPv4 fragments.
  * @OVS_DP_FRAG_ZERO: Treat IP fragments as IP protocol 0 and transport ports
  * zero.
  * @OVS_DP_FRAG_DROP: Drop IP fragments.  Do not pass them through the flow
  * table or up to userspace.
  */
-enum ovs_frag_handling {
+enum ovs_datapath_frag {
        OVS_DP_FRAG_UNSPEC,
        OVS_DP_FRAG_ZERO,       /* Treat IP fragments as transport port 0. */
        OVS_DP_FRAG_DROP        /* Drop IP fragments. */
@@ -277,7 +277,7 @@ struct ovs_flow_stats {
     uint64_t n_bytes;           /* Number of matched bytes. */
 };
 
-enum ovs_key_type {
+enum ovs_key_attr {
        OVS_KEY_ATTR_UNSPEC,
        OVS_KEY_ATTR_TUN_ID,    /* 64-bit tunnel ID */
        OVS_KEY_ATTR_IN_PORT,   /* 32-bit OVS dp port number */
@@ -431,7 +431,7 @@ enum ovs_userspace_attr {
 #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
 
 /* Action types. */
-enum ovs_action_type {
+enum ovs_action_attr {
        OVS_ACTION_ATTR_UNSPEC,
        OVS_ACTION_ATTR_OUTPUT,       /* Output to switch port. */
        OVS_ACTION_ATTR_USERSPACE,    /* Nested OVS_USERSPACE_ATTR_*. */
index 08ac442..43c2161 100644 (file)
@@ -79,7 +79,7 @@ struct dpif_linux_dp {
     const char *name;                  /* OVS_DP_ATTR_NAME. */
     const uint32_t *upcall_pid;        /* OVS_DP_UPCALL_PID. */
     struct ovs_dp_stats stats;         /* OVS_DP_ATTR_STATS. */
-    enum ovs_frag_handling ipv4_frags; /* OVS_DP_ATTR_IPV4_FRAGS. */
+    enum ovs_datapath_frag ipv4_frags; /* OVS_DP_ATTR_IPV4_FRAGS. */
 };
 
 static void dpif_linux_dp_init(struct dpif_linux_dp *);
index 1bb306a..9967322 100644 (file)
@@ -1269,7 +1269,7 @@ dp_netdev_execute_actions(struct dp_netdev *dp,
     NL_ATTR_FOR_EACH_UNSAFE (a, left, actions, actions_len) {
         int type = nl_attr_type(a);
 
-        switch ((enum ovs_action_type) type) {
+        switch ((enum ovs_action_attr) type) {
         case OVS_ACTION_ATTR_OUTPUT:
             dp_netdev_output_port(dp, packet, nl_attr_get_u32(a));
             break;
index 08378a6..a471099 100644 (file)
@@ -55,7 +55,7 @@ odp_action_len(uint16_t type)
         return -1;
     }
 
-    switch ((enum ovs_action_type) type) {
+    switch ((enum ovs_action_attr) type) {
     case OVS_ACTION_ATTR_OUTPUT: return 4;
     case OVS_ACTION_ATTR_USERSPACE: return -2;
     case OVS_ACTION_ATTR_PUSH_VLAN: return 2;
@@ -278,7 +278,7 @@ odp_flow_key_attr_len(uint16_t type)
         return -1;
     }
 
-    switch ((enum ovs_key_type) type) {
+    switch ((enum ovs_key_attr) type) {
     case OVS_KEY_ATTR_TUN_ID: return 8;
     case OVS_KEY_ATTR_IN_PORT: return 4;
     case OVS_KEY_ATTR_ETHERNET: return sizeof(struct ovs_key_ethernet);
@@ -913,7 +913,7 @@ odp_flow_key_to_flow(const struct nlattr *key, size_t key_len,
                      struct flow *flow)
 {
     const struct nlattr *nla;
-    enum ovs_key_type prev_type;
+    enum ovs_key_attr prev_type;
     size_t left;
 
     memset(flow, 0, sizeof *flow);