- case OVS_ACTION_ATTR_HASH: {
- const struct ovs_action_hash *hash_act;
- uint32_t hash;
-
- hash_act = nl_attr_get(a);
-
- for (i = 0; i < cnt; i++) {
-
- if (hash_act->hash_alg == OVS_HASH_ALG_L4) {
- /* Hash need not be symmetric, nor does it need to include
- * L2 fields. */
- hash = hash_2words(dpif_packet_get_dp_hash(packets[i]),
- hash_act->hash_basis);
- } else {
- VLOG_WARN("Unknown hash algorithm specified "
- "for the hash action.");
- hash = 2;
- }
-
- if (!hash) {
- hash = 1; /* 0 is not valid */
- }
-
- dpif_packet_set_dp_hash(packets[i], hash);
- }
- return;
- }
-