[ovs-git] [openvswitch/ovs] 586cd3: ofproto-dpif-upcall: Get rid of udpif_synchronize().

Ben Pfaff noreply at github.com
Fri Jan 24 21:01:10 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 586cd3101e7fda54d14fb5bf12d847f35d968627
      https://github.com/openvswitch/ovs/commit/586cd3101e7fda54d14fb5bf12d847f35d968627
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c
    M ofproto/ofproto-dpif-upcall.h
    M ofproto/ofproto-dpif-xlate.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  ofproto-dpif-upcall: Get rid of udpif_synchronize().

RCU provides the semantics we want from udpif_synchronize() and it
should be much more lightweight than killing and restarting all the
upcall threads.  It looks like udpif_synchronize() was written before
the OVS tree had RCU support, which is probably why we didn't use it
here from the beginning.  So we can just change udpif_synchronize()
to a single ovsrcu_synchronize() call.

However, udpif_synchronize() only has a single caller, which calls
ovsrcu_synchronize() anyway just beforehand, via xlate_txn_commit().
So we can get rid of udpif_synchronize() entirely, which this patch
does.

As a side effect, this eliminates one reason why terminating OVS cleanly
clears the datapath flow table.  An upcoming patch will eliminate
other reasons.

Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 79eadafeb1b47a3871cb792aa972f6e4d89d1a0b
      https://github.com/openvswitch/ovs/commit/79eadafeb1b47a3871cb792aa972f6e4d89d1a0b
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M NEWS
    M ofproto/ofproto-dpif-upcall.c
    M ofproto/ofproto.c
    M vswitchd/ovs-vswitchd.8.in

  Log Message:
  -----------
  ofproto: Do not delete datapath flows on exit by default.

Commit e96a5c24e853 ("upcall: Remove datapath flows when setting
n-threads.") caused OVS to delete datapath flows when it exits through
any graceful means.  This is not necessarily desirable, especially when
OVS is being stopped as part of an upgrade.  This commit changes OVS so
that it only removes datapath flows when requested, via "ovs-appctl
exit --cleanup".

Acked-by: Numan Siddique <numans at ovn.org>
Tested-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/929dc96d0bca...79eadafeb1b4


More information about the git mailing list