diff options
author | Cian Ferriter <cian.ferriter@intel.com> | 2017-09-01 13:57:54 -0700 |
---|---|---|
committer | Darrell Ball <dlu998@gmail.com> | 2017-09-05 12:02:25 -0700 |
commit | 45df9fef60611f6d61c082e5e3ae92d68081c2d9 (patch) | |
tree | 4a725538d50a7eca1d066c527f3ac5d8542526c3 | |
parent | 0230552087fe911262968176f9bb840050e7fe44 (diff) | |
download | openvswitch-45df9fef60611f6d61c082e5e3ae92d68081c2d9.tar.gz |
dpif-netdev: Rename "size" variable to "cnt".
Commit 72c84bc (dp-packet: Enhance packet batch APIs.) changed how the amount
of packets to be processed is retrieved. In the process, the patch used "size"
as the variable holding the amount of packets rather than "cnt". Change this
back to match with the "emc_processing()" comment.
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Darrell Ball <dlu998@gmail.com>
-rw-r--r-- | lib/dpif-netdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 50c61b85d..dbdc71fa4 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4874,13 +4874,13 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, struct netdev_flow_key *key = &keys[0]; size_t n_missed = 0, n_dropped = 0; struct dp_packet *packet; - const size_t size = dp_packet_batch_size(packets_); + const size_t cnt = dp_packet_batch_size(packets_); uint32_t cur_min; int i; atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min); - DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) { + DP_PACKET_BATCH_REFILL_FOR_EACH (i, cnt, packet, packets_) { struct dp_netdev_flow *flow; if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) { @@ -4889,7 +4889,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, continue; } - if (i != size - 1) { + if (i != cnt - 1) { struct dp_packet **packets = packets_->packets; /* Prefetch next packet data and metadata. */ OVS_PREFETCH(dp_packet_data(packets[i+1])); @@ -4920,7 +4920,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd, } dp_netdev_count_packet(pmd, DP_STAT_EXACT_HIT, - size - n_dropped - n_missed); + cnt - n_dropped - n_missed); return dp_packet_batch_size(packets_); } |