[ovs-git] [openvswitch/ovs] 81e89d: dpif-netdev: Make datapath port mutex recursive.

elibritstein noreply at github.com
Thu Jan 16 13:27:34 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 81e89d5c2645c16bad3309f532a6ab1ea41530d8
      https://github.com/openvswitch/ovs/commit/81e89d5c2645c16bad3309f532a6ab1ea41530d8
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Make datapath port mutex recursive.

Upcoming HW offloading will request flow statistics from the dpdk
offloading module.  This operation requires holding datapath port
mutex.  However, there is a possible scenario in which flow deletion
happens during datapath reconfiguration process and the mutex already
acquired:

  0  raise () from /lib64/libc.so.6
  1  abort () from /lib64/libc.so.6
  2  ovs_abort_valist ()
  3  ovs_abort ()
  4  ovs_mutex_lock_at ()
  5  dpif_netdev_get_flow_offload_status ()
  6  get_dpif_flow_status ()
  7  flow_del_on_pmd ()
  8  dpif_netdev_flow_del ()
  9  dpif_netdev_operate ()
  10 dpif_operate ()
  11 push_dp_ops ()
  12 push_ukey_ops ()
  13 dp_purge_cb ()
  14 dp_netdev_del_pmd ()
  15 reconfigure_pmd_threads ()
  16 reconfigure_datapath ()
  17 do_del_port ()
  18 dpif_netdev_port_del ()
  19 dpif_port_del ()
  20 port_del ()
  21 ofproto_port_del ()
  22 bridge_delete_or_reconfigure_ports ()
  23 bridge_reconfigure ()
  24 bridge_run ()
  25 main ()

This happens while removing the last port of a particular PMD thread.
Reconfiguration process decides that we need to remove current PMD
thread and calls datapath purge callback in order to clean up resources
assigned to it.  This turns into flow removal and flow_del() tries to
request statistics.

Turning the dp->port_mutex into recursive version as a quick fix for
this issue.  Better solutions might be to avoid statistics request
somehow, or fully disassociate offloaded flows from the datapath flows.

Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
Acked-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 7c5b722a41c3d43c772554e6d9b438593ca81b2f
      https://github.com/openvswitch/ovs/commit/7c5b722a41c3d43c772554e6d9b438593ca81b2f
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Refactor flow patterns.

Refactor the flow patterns code to a helper function for better
readability and towards supporting more matches.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 1e60e4b0966dbdb4252b2adacfb4b501995d7ee6
      https://github.com/openvswitch/ovs/commit/1e60e4b0966dbdb4252b2adacfb4b501995d7ee6
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Refactor action items freeing scheme.

Action item data structures are pointed by rte_flow_action items.
Refactor the code to free the data structures when freeing the
rte_flow_action items, allowing simpler future actions simpler to add to
the code.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 900fe00784cab1437ddd55afa8abe9dbf360e429
      https://github.com/openvswitch/ovs/commit/900fe00784cab1437ddd55afa8abe9dbf360e429
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Dynamically allocate pattern items.

Instead of statically allocated pattern items on the stack, dynamically
allocate only the required items while parsing the matches, to simplify
the parsing and make it self-contained, without need of external types,
making it easier to support more matches in the future.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 7d6033d6b78706b532c593a5fbceb20058b9c746
      https://github.com/openvswitch/ovs/commit/7d6033d6b78706b532c593a5fbceb20058b9c746
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Improve HW offload flow debuggability.

Add debug prints when creating and destroying rte flows, with all the
flow details (attributes, patterns, actions).

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 63556d8586fe972350dd7f59b102686ca24bd6ae
      https://github.com/openvswitch/ovs/commit/63556d8586fe972350dd7f59b102686ca24bd6ae
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-dpdk: Introduce rte flow query function.

Introduce a rte flow query function as a pre-step towards reading HW
statistics of fully offloaded flows.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 34ce6bf7b12975513ffa650b768ad571bd230dbd
      https://github.com/openvswitch/ovs/commit/34ce6bf7b12975513ffa650b768ad571bd230dbd
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Return UFID-rte_flow entry in find method.

Change the find method to return the whole entry of UFID-rte_flow
association instead of only the rte_flow field in it, as a pre-step
towards adding and using more fields into that map entry.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 60e778c7533afb0f2ab8f3ba0fd841e6092bea9e
      https://github.com/openvswitch/ovs/commit/60e778c7533afb0f2ab8f3ba0fd841e6092bea9e
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Framework for actions offload.

Currently HW offload is accelerating only the rule matching sequence.
Introduce a framework for offloading rule actions as a pre-step for
processing the rule actions in HW. In case of a failure, fallback to the
legacy partial offload scheme.

Note: a flow will be fully offloaded only if it can process all its
actions in HW.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 2aca29df93505798643817a4613da4eecfb9bf8b
      https://github.com/openvswitch/ovs/commit/2aca29df93505798643817a4613da4eecfb9bf8b
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-offload-dpdk: Implement flow get method.

Implement the flow get method for DPDK, to get the statistics of the
provided ufid, towards reading statistics of fully offloaded flows.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 80944cb41d2a9cb539153202b8ee41f488f5dd6e
      https://github.com/openvswitch/ovs/commit/80944cb41d2a9cb539153202b8ee41f488f5dd6e
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M NEWS
    M lib/dpctl.c
    M lib/dpctl.man

  Log Message:
  -----------
  dpctl: Support dump-flows filters "dpdk" and "partially-offloaded".

Flows that are offloaded via DPDK can be partially offloaded (matches
only) or fully offloaded (matches and actions). Set partially offloaded
display to (offloaded=partial, dp:ovs), and fully offloaded to
(offloaded=yes, dp:dpdk). Also support filter types "dpdk" and
"partially-offloaded".

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: a309e4f526606adb8fa01936a887769ecef5a2be
      https://github.com/openvswitch/ovs/commit/a309e4f526606adb8fa01936a887769ecef5a2be
  Author: Ophir Munk <ophirmu at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Update offloaded flows statistics.

In case a flow is HW offloaded, packets do not reach the SW, thus not
counted for statistics. Use netdev flow get API in order to update the
statistics of flows by the HW statistics.

Co-authored-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 319a9bb33855ff5361da149944a8578decf0b492
      https://github.com/openvswitch/ovs/commit/319a9bb33855ff5361da149944a8578decf0b492
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Populate dpif class field in offload struct.

Populate dpif class field in offload struct to be used in offloading
flow put.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 2f7f9284bd648b4d1e429a85fd803796d4238808
      https://github.com/openvswitch/ovs/commit/2f7f9284bd648b4d1e429a85fd803796d4238808
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

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

  Log Message:
  -----------
  netdev-dpdk: Getter function for dpdk port id API.

Add a getter function for using the dpdk port id outside the scope of
netdev-dpdk.c to be used for HW offload.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 65c73b3f8c2833d4693cca9cf7058a72cb6e6f66
      https://github.com/openvswitch/ovs/commit/65c73b3f8c2833d4693cca9cf7058a72cb6e6f66
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M lib/netdev-offload-provider.h
    M lib/netdev-offload.c

  Log Message:
  -----------
  netdev-offload: Introduce a function to validate same flow api handle.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 3c7330ebf036511a8215cdd2612c82797c50c6c7
      https://github.com/openvswitch/ovs/commit/3c7330ebf036511a8215cdd2612c82797c50c6c7
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Support offload of output action.

Support offload of output action, also configuring count action for
allowing query statistics of HW offloaded flows.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: abb288c00a815fedd8d9173090f4f88d1c9b3a11
      https://github.com/openvswitch/ovs/commit/abb288c00a815fedd8d9173090f4f88d1c9b3a11
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Support offload of drop action.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: ae32e08d637103c1241f3766e9cf6ecb8968e14c
      https://github.com/openvswitch/ovs/commit/ae32e08d637103c1241f3766e9cf6ecb8968e14c
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Support offload of set MAC actions.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: d9a831c3bc47d71f15f1aebb4d7b60835b86972a
      https://github.com/openvswitch/ovs/commit/d9a831c3bc47d71f15f1aebb4d7b60835b86972a
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Support offload of set IPv4 actions.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: b9254f7b59bc3e7166c4d555cd40fb8e0b32bafc
      https://github.com/openvswitch/ovs/commit/b9254f7b59bc3e7166c4d555cd40fb8e0b32bafc
  Author: Eli Britstein <elibr at mellanox.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/netdev-offload-dpdk.c

  Log Message:
  -----------
  netdev-offload-dpdk: Support offload of set TCP/UDP ports actions.

Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/8657012454c9...b9254f7b59bc


More information about the git mailing list