@@ -822,14 +822,18 @@ odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
/* RSS hash can be used here instead of 5tuple for
* performance reasons. */
- if (dp_packet_rss_valid(packet)) {
- hash = dp_packet_get_rss_hash(packet);
- hash = hash_int(hash, hash_act->hash_basis);
+ if (netdev_is_flow_api_enabled()) {
+ hash = netdev_offload_dpdk_set_dp_hash(packet);
} else {
- flow_extract(packet, &flow);
- hash = flow_hash_5tuple(&flow, hash_act->hash_basis);
- }
- packet->md.dp_hash = hash;
+
+ if (dp_packet_rss_valid(packet)) {
+ hash = dp_packet_get_rss_hash(packet);
+ hash = hash_int(hash, hash_act->hash_basis);
+ } else {
+ flow_extract(packet, &flow);
+ hash = flow_hash_5tuple(&flow, hash_act->hash_basis);
+ }
+ packet->md.dp_hash = hash;
}
break;
}