2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 00:35:33 +00:00

odp-execute: Use const qualifer for batch size.

It is recommended to use const qualifer for 'num' that tracks the
packet batch count. This way 'num' can't be modified by iterator.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Bhanuprakash Bodireddy
2017-09-20 14:12:59 +01:00
committed by Ben Pfaff
parent e0a00cee33
commit 95e620b48c

View File

@@ -826,7 +826,8 @@ odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
break;
}
case OVS_ACTION_ATTR_DECAP_NSH: {
size_t i, num = batch->count;
size_t i;
const size_t num = dp_packet_batch_size(batch);
DP_PACKET_BATCH_REFILL_FOR_EACH (i, num, packet, batch) {
if (decap_nsh(packet)) {