[ovs-git] [openvswitch/ovs] 058b80: dpif-netdev: Add check mark to avoid ovs-vswitchd ...

NIC我是一张网卡 noreply at github.com
Thu Jul 9 22:14:41 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 058b80d3de31b2c539d9e6f5f6687bde78ef08e9
      https://github.com/openvswitch/ovs/commit/058b80d3de31b2c539d9e6f5f6687bde78ef08e9
  Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Add check mark to avoid ovs-vswitchd crash.

When changing the pmd interfaces attribute, ovs-vswitchd will
reload pmd and flush offload flows. reload_affected_pmds may
be invoked twice or more. In that case, the flows may been
queued to "dp_netdev_flow_offload" thread again.

For example:
$ ovs-vsctl -- set interface <Interface> options:dpdk-lsc-interrupt=true

ovs-vswitchd main       flow-offload thread
append F to queue       ...
...
append F to queue
...                     del F
...                     del F (crash [1])

[1]:
ovs_assert_failure          lib/cmap.c:922
cmap_replace                lib/cmap.c:921
cmap_remove                 lib/cmap.h:295
mark_to_flow_disassociate   lib/dpif-netdev.c:2269
dp_netdev_flow_offload_del  lib/dpif-netdev.c:2369
dp_netdev_flow_offload_main lib/dpif-netdev.c:2492

Fixes: 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: fa31efd211143f1adb06a62faad803a5aca1e400
      https://github.com/openvswitch/ovs/commit/fa31efd211143f1adb06a62faad803a5aca1e400
  Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Return error code when no mark available.

The max number of mark is (UINT32_MAX - 1), that is
enough to be used. But theoretically, if there are no
mark available, the later different flows will shared
the mark INVALID_FLOW_MARK, that may break the function.
If there are no available mark to be used, return error
code.

Fixes: 02bb2824e51d ("dpif-netdev: do hw flow offload in a thread")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/fd4d4777600f...fa31efd21114


More information about the git mailing list