[ovs-git] [openvswitch/ovs] 1d0e37: revalidator: Prepare xcache before xlate_lookup.

GitHub noreply at github.com
Thu Sep 29 00:05:07 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 1d0e37ff272d5c305ceee390cd6d123c1278bab0
      https://github.com/openvswitch/ovs/commit/1d0e37ff272d5c305ceee390cd6d123c1278bab0
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Prepare xcache before xlate_lookup.

Functionally this has little change, but it allows the following patch
to refactor the translation code with less changes.

Strictly speaking the odp_flow_key_to_flow() and xlate_lookup() error
cases should free the ukey->xcache, since it's empty and was never
initialised via the later call to xlate_actions(). However, if one of
these error conditions is hit during a flow dump, then there's no way
that it will ever succeed on a subsequent revalidate/delete. Rather, the
later revalidate/delete would do no stats translation - the same result
as keeping the empty xcache here.

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


  Commit: c1c5c122dcf2068a35c0438930a87f1e054c184f
      https://github.com/openvswitch/ovs/commit/c1c5c122dcf2068a35c0438930a87f1e054c184f
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Refactor ukey->xout translation.

This patch shifts the code that directly calls xlate into a separate
function, xlate_ukey().

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


  Commit: 95beec1950aecb08b57e3bcc7376ea26f529dc98
      https://github.com/openvswitch/ovs/commit/95beec1950aecb08b57e3bcc7376ea26f529dc98
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Refactor revalidation early exit.

Shift the early-exit conditions for revalidation into a separate
function.

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


  Commit: dd0dc9eda0e0b4a6b2f8f4dee442be6865e60c89
      https://github.com/openvswitch/ovs/commit/dd0dc9eda0e0b4a6b2f8f4dee442be6865e60c89
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Reuse xlate_ukey from deletion.

This code was already very similar to the actual revalidation code, but
previously it wasn't structured quite closely enough to share it. Do so.

xlate_actions_for_side_effects() is now unused, so remove it.

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


  Commit: fbf803b65064b6f31330791f232c805b7ae50930
      https://github.com/openvswitch/ovs/commit/fbf803b65064b6f31330791f232c805b7ae50930
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Defer stats push to end of validation.

To make more of the core revalidate() functions do just one thing and
not modify state on the way, refactor them to prepare the xcache then
defer the ukey modification and stats/side effects execution to the end
of successful revalidation.

If revalidation causes deletion, then the xcache will be prepared and
attached to the ukey, but the actual execution will be skipped since it
will be executed on flow_delete very soon anyway with final stats.

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


  Commit: e2b0b03df0ba4eff706e6aa000fadc9b0ec705bc
      https://github.com/openvswitch/ovs/commit/e2b0b03df0ba4eff706e6aa000fadc9b0ec705bc
  Author: Joe Stringer <joe at ovn.org>
  Date:   2016-09-28 (Wed, 28 Sep 2016)

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

  Log Message:
  -----------
  revalidator: Simplify full-revalidation code.

Simplify the remaining bits of the original revalidation codepath to
only handle the "full-revalidation" case. Make the 'ukey' parameter
purely const by pushing the only piece that gets changed into a separate
argument.

Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>


Compare: https://github.com/openvswitch/ovs/compare/74f205f6cc66...e2b0b03df0ba


More information about the git mailing list