[ovs-dev] [PATCH 5/6] dpif-netdev: Fix a couple of comments for dp_netdev_run_meter().

Justin Pettit jpettit at ovn.org
Fri Jun 29 19:13:53 UTC 2018


Signed-off-by: Justin Pettit <jpettit at ovn.org>
---
 lib/dpif-netdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 9390fff68dac..1e204a8d3b72 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4375,7 +4375,8 @@ dpif_netdev_meter_get_features(const struct dpif * dpif OVS_UNUSED,
     features->max_color = 0;
 }
 
-/* Returns false when packet needs to be dropped. */
+/* Applies the meter identified by 'meter_id' to 'packets_'.  Packets
+ * that exceed a band are dropped in-place. */
 static void
 dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_,
                     uint32_t meter_id, long long int now)
@@ -4495,9 +4496,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_,
         }
     }
 
-    /* Fire the highest rate band exceeded by each packet.
-     * Drop packets if needed, by swapping packet to the end that will be
-     * ignored. */
+    /* Fire the highest rate band exceeded by each packet, and drop
+     * packets if needed. */
     size_t j;
     DP_PACKET_BATCH_REFILL_FOR_EACH (j, cnt, packet, packets_) {
         if (exceeded_band[j] >= 0) {
-- 
2.17.1



More information about the dev mailing list