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

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


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

  Changed paths:
    M lib/dpif-netdev.c

  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: cfd63e6cda35c313ff9293d5f03355fd5e2292b2
      https://github.com/openvswitch/ovs/commit/cfd63e6cda35c313ff9293d5f03355fd5e2292b2
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M lib/netdev-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: c203f2bf83d55dc71707d84771f619aebc97ba2f
      https://github.com/openvswitch/ovs/commit/c203f2bf83d55dc71707d84771f619aebc97ba2f
  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: 035d1dcc62867a9b17fcac9868e206a7fc54e05b
      https://github.com/openvswitch/ovs/commit/035d1dcc62867a9b17fcac9868e206a7fc54e05b
  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/f4b37e42c661...035d1dcc6286


More information about the git mailing list