[ovs-git] [openvswitch/ovs] 32e894: nx-match: Use vl_mff_map to parse match field.

GitHub noreply at github.com
Wed May 17 23:02:08 UTC 2017


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: 32e894fe56bc0b9a26bd7831db5c83450aeb5c32
      https://github.com/openvswitch/ovs/commit/32e894fe56bc0b9a26bd7831db5c83450aeb5c32
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M include/openvswitch/ofp-util.h
    M lib/learning-switch.c
    M lib/nx-match.c
    M lib/nx-match.h
    M lib/ofp-print.c
    M lib/ofp-util.c
    M ofproto/ofproto.c
    M ovn/controller/pinctrl.c
    M tests/ofproto.at
    M utilities/ovs-ofctl.c

  Log Message:
  -----------
  nx-match: Use vl_mff_map to parse match field.

vl_mff_map is introduced in commit 04f48a68c428 ("ofp-actions: Fix variable
length meta-flow OXMs") to account variable length mf_field, and it is used
to decode variable length mf_field in ofp_action. In this patch, vl_mff_map
is further used to decode the variable length match field as well.

Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>


  Commit: 30a73fe70045d73b648d2360bb1c755b96b3503f
      https://github.com/openvswitch/ovs/commit/30a73fe70045d73b648d2360bb1c755b96b3503f
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M ofproto/ofproto.c

  Log Message:
  -----------
  ofproto: Move tun_table and vl_mff_map deletion.

In this patch, we move the tun_table and vl_mff_map deletion in
ofproto_destroy__() to be in the following order.
    1. Delete all the flows.
    2. Delete vl_mff_map.
    3. Delete tun_table.
The rationale behind this order is that a flow may use a variable length
mf_field, and a variable length mf_field is defined by a TLV mapping
in tun_table.

Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>


  Commit: 84e2a1c81ef98fa4f0287de218850714be8842d7
      https://github.com/openvswitch/ovs/commit/84e2a1c81ef98fa4f0287de218850714be8842d7
  Author: Yi-Hung Wei <yihung.wei at gmail.com>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M build-aux/extract-ofp-actions
    M include/openvswitch/ofp-actions.h
    M include/openvswitch/ofp-errors.h
    M include/openvswitch/ofp-util.h
    M lib/learn.c
    M lib/meta-flow.c
    M lib/ofp-actions.c
    M lib/ofp-util.c
    M lib/vl-mff-map.h
    M ofproto/ofproto-provider.h
    M ofproto/ofproto.c
    M ovn/controller/pinctrl.c
    M tests/tunnel.at
    M utilities/ovs-ofctl.c

  Log Message:
  -----------
  ofproto: Add ref counting for variable length mf_fields.

Currently, a controller may potentially trigger a segmentation fault if it
accidentally removes a TLV mapping that is still used by an active flow.
To resolve this issue, in this patch, we maintain reference counting for each
dynamically allocated variable length mf_fields, so that vswitchd can use this
information to properly remove a TLV mapping, and to return an error if the
controller tries to remove a TLV mapping that is still used by any active flow.

To keep track of the usage of tun_metadata for each flow, two 'uint64_t'
bitmaps are introduce for the flow match and flow action respectively. We use
'uint64_t' as a bitmap since the 64 geneve TLV tunnel metadata are the only
available variable length mf_fields for now. We shall adopt general bitmap when
more variable length mf_fields are introduced. The bitmaps are configured
during the flow decoding process, and vswitchd use these bitmaps to increase or
decrease the ref counting when the flow is created or deleted.

VMWare-BZ: #1768370
Fixes: 04f48a68c428 ("ofp-actions: Fix variable length meta-flow OXMs.")
Suggested-by: Jarno Rajahalme <jarno at ovn.org>
Suggested-by: Joe Stringer <joe at ovn.org>
Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/de010fc75b20...84e2a1c81ef9


More information about the git mailing list