[ovs-git] [openvswitch/ovs] 42697c: dpif-netdev: fix meter at high packet rate.

William Tu noreply at github.com
Mon Apr 22 17:00:51 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 42697ca7757b594cc841d944e43ffc17905e3188
      https://github.com/openvswitch/ovs/commit/42697ca7757b594cc841d944e43ffc17905e3188
  Author: William Tu <u9012063 at gmail.com>
  Date:   2019-04-22 (Mon, 22 Apr 2019)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: fix meter at high packet rate.

When testing packet rate around 1Mpps with meter enabled, the frequency
of hitting meter action becomes much higher, around 30us each time.
As a result, the meter's calculation of 'uint32_t delta_t' becomes
always 0 and meter action has no effect.  This is due to the previous
commit 05f9e707e194 divides the delta by 1000, in order to convert to
msec granularity.  The patch fixes it updating the time when across
millisecond boundary.

Fixes: 05f9e707e194 ("dpif-netdev: Use microsecond granularity.")
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list