[ovs-dev] [PATCH v3 3/4] ofproto: Add ref counting for variable length mf_fields.

Joe Stringer joe at ovn.org
Wed Mar 15 22:23:33 UTC 2017


On 13 March 2017 at 11:28, Yi-Hung Wei <yihung.wei at gmail.com> wrote:
> 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>

Thanks, applied to master.


More information about the dev mailing list