[ovs-git] [openvswitch/ovs] 2dc1e7: dpif-netdev: Do not mix recirculation depth into R...

Ilya Maximets noreply at github.com
Mon Oct 28 16:59:47 UTC 2019


  Branch: refs/heads/branch-2.10
  Home:   https://github.com/openvswitch/ovs
  Commit: 2dc1e77d4896ae12fea1e9d94d5b446e1ea112b9
      https://github.com/openvswitch/ovs/commit/2dc1e77d4896ae12fea1e9d94d5b446e1ea112b9
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Do not mix recirculation depth into RSS hash itself.

Mixing of RSS hash with recirculation depth is useful for flow lookup
because same packet after recirculation should match with different
datapath rule.  Setting of the mixed value back to the packet is
completely unnecessary because recirculation depth is different on
each recirculation, i.e. we will have different packet hash for
flow lookup anyway.

This should fix the issue that packets from the same flow could be
directed to different buckets based on a dp_hash or different ports of
a balanced bonding in case they were recirculated different number of
times (e.g. due to conntrack rules).
With this change, the original RSS hash will remain the same making
it possible to calculate equal dp_hash values for such packets.

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2019-September/363127.html
Fixes: 048963aa8507 ("dpif-netdev: Reset RSS hash when recirculating.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>


  Commit: d8069dc878b3222d2bb37765a2567e367630a003
      https://github.com/openvswitch/ovs/commit/d8069dc878b3222d2bb37765a2567e367630a003
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Fix time delta overflow in case of race for meter lock.

There is a race window between getting the time and getting the meter
lock.  This could lead to situation where the thread with larger
current time (this thread called time_{um}sec() later than others)
will acquire meter lock first and update meter->used to the large
value.  Next threads will try to calculate time delta by subtracting
the large meter->used from their lower time getting the negative value
which will be converted to a big unsigned delta.

Fix that by assuming that all these threads received packets in the
same time in this case, i.e. dropping negative delta to 0.

CC: Jarno Rajahalme <jarno at ovn.org>
Fixes: 4b27db644a8c ("dpif-netdev: Simple DROP meter implementation.")
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2019-September/363126.html
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: William Tu <u9012063 at gmail.com>


Compare: https://github.com/openvswitch/ovs/compare/bcf0477062e9...d8069dc878b3


More information about the git mailing list