openvswitch.h: rename hash action definition
authorAndy Zhou <azhou@nicira.com>
Fri, 18 Apr 2014 03:06:58 +0000 (20:06 -0700)
committerAndy Zhou <azhou@nicira.com>
Mon, 21 Apr 2014 05:28:01 +0000 (22:28 -0700)
Rename hash_bias to hash_basis to make it consistent with similar
usages.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
include/linux/openvswitch.h
lib/dpif-netdev.c
lib/odp-util.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h

index e17f802..1aa9158 100644 (file)
@@ -553,11 +553,11 @@ enum ovs_hash_alg {
 /*
  * struct ovs_action_hash - %OVS_ACTION_ATTR_HASH action argument.
  * @hash_alg: Algorithm used to compute hash prior to recirculation.
- * @hash_bias: bias used for computing hash.
+ * @hash_basis: basis used for computing hash.
  */
 struct ovs_action_hash {
        uint32_t  hash_alg;     /* One of ovs_hash_alg. */
-       uint32_t  hash_bias;
+       uint32_t  hash_basis;
 };
 
 /**
index 15aa42a..07f181d 100644 (file)
@@ -2160,7 +2160,7 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
         if (hash_act->hash_alg == OVS_HASH_ALG_L4) {
             /* Hash need not be symmetric, nor does it need to include
              * L2 fields. */
-            hash = miniflow_hash_5tuple(aux->key, hash_act->hash_bias);
+            hash = miniflow_hash_5tuple(aux->key, hash_act->hash_basis);
             if (!hash) {
                 hash = 1; /* 0 is not valid */
             }
index 9a4ea5e..8e95c9e 100644 (file)
@@ -399,7 +399,7 @@ format_odp_hash_action(struct ds *ds, const struct ovs_action_hash *hash_act)
     ds_put_format(ds, "hash(");
 
     if (hash_act->hash_alg == OVS_HASH_ALG_L4) {
-        ds_put_format(ds, "hash_l4(%"PRIu32")", hash_act->hash_bias);
+        ds_put_format(ds, "hash_l4(%"PRIu32")", hash_act->hash_basis);
     } else {
         ds_put_format(ds, "Unknown hash algorithm(%"PRIu32")",
                       hash_act->hash_alg);
index e4e8246..248382f 100644 (file)
@@ -1217,7 +1217,7 @@ output_normal(struct xlate_ctx *ctx, const struct xbundle *out_xbundle,
 
         if (ctx->xbridge->enable_recirc) {
             ctx->xout->use_recirc = bond_may_recirc(
-                out_xbundle->bond, &xr->recirc_id, &xr->hash_bias);
+                out_xbundle->bond, &xr->recirc_id, &xr->hash_basis);
 
             if (ctx->xout->use_recirc) {
                 /* Only TCP mode uses recirculation. */
@@ -1959,7 +1959,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
                                                 OVS_ACTION_ATTR_HASH,
                                                 sizeof *act_hash);
             act_hash->hash_alg = xr->hash_alg;
-            act_hash->hash_bias = xr->hash_bias;
+            act_hash->hash_basis = xr->hash_basis;
 
             /* Recirc action. */
             nl_msg_put_u32(&ctx->xout->odp_actions, OVS_ACTION_ATTR_RECIRC,
index f1267fb..18137d5 100644 (file)
@@ -36,7 +36,7 @@ struct xlate_cache;
 struct xlate_recirc {
     uint32_t recirc_id;  /* !0 Use recirculation instead of output. */
     uint8_t  hash_alg;   /* !0 Compute hash for recirc before. */
-    uint32_t hash_bias;  /* Compute hash for recirc before. */
+    uint32_t hash_basis;  /* Compute hash for recirc before. */
 };
 
 struct xlate_out {