[ovs-git] [openvswitch/ovs] f5158d: dpif-netdev: Don't use zero flow mark.

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


  Branch: refs/heads/branch-2.12
  Home:   https://github.com/openvswitch/ovs
  Commit: f5158d8adb8b4bd6af1d774e02be1d09ae0900dd
      https://github.com/openvswitch/ovs/commit/f5158d8adb8b4bd6af1d774e02be1d09ae0900dd
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/dpif-netdev.c
    M tests/dpif-netdev.at

  Log Message:
  -----------
  dpif-netdev: Don't use zero flow mark.

Zero flow mark is used to indicate the HW to remove the mark. A packet
marked with zero mark is received in SW without a mark at all, so it
cannot be used as a valid mark. Change the pool range to fix it.

Fixes: 241bad15d99a ("dpif-netdev: associate flow with a mark id")
Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Roni Bar Yanai <roniba at mellanox.com>
Acked-by: Sriharsha Basavapatna <sriharsha.basavapatna at broadcom.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 5dccecb630342903af83aa4cc1a81c8553ef57a1
      https://github.com/openvswitch/ovs/commit/5dccecb630342903af83aa4cc1a81c8553ef57a1
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Fix Ethernet matching for type only.

For OVS rule of the form "eth type is 0x1234 / end", rule is offloaded
in the form of "eth / end", which is incorrect. Fix it.

Fixes: e8a2b5bf92bb ("netdev-dpdk: implement flow offload with rte flow")
Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Roni Bar Yanai <roniba at mellanox.com>
Acked-by: Sriharsha Basavapatna <sriharsha.basavapatna at broadcom.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: fc8914e1d87fece357702a8ecbeffa2c05c9ca40
      https://github.com/openvswitch/ovs/commit/fc8914e1d87fece357702a8ecbeffa2c05c9ca40
  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: 2f18b7a10ce3c9e0fc0b0a6479473fd883c44a3a
      https://github.com/openvswitch/ovs/commit/2f18b7a10ce3c9e0fc0b0a6479473fd883c44a3a
  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/fd48ae73e097...2f18b7a10ce3


More information about the git mailing list