> On Jul 29, 2016, at 11:20 AM, Ben Pfaff <[email protected]> wrote:
>
> On Thu, Jul 28, 2016 at 05:55:54PM -0700, Jarno Rajahalme wrote:
>> Make groups RCU protected and make group lookups lockless.
>>
>> Signed-off-by: Jarno Rajahalme <[email protected]>
>
> I'd add a little motivation to the commit message. A common reason to
> switch to RCU is performance, but I doubt that this is the motivation
> here. Rather, I suspect that it has more to do with having groups and
> flows share the same synchronization mechanism so that it's easier to
> understand. Also, I guess that later in the series you're going to need
> versioning so that groups can be included in bundles.
>
Good point, you are right and I'll address this.
> I wasn't sure what to make of this new comment in ofproto-provider.h:
>
I was wondering if I should have changed 'buckets' to const as well. Everything
else is const, which makes it easy to change to RCU semantics. I suspect that
making it 'const' will require quite a lot of CONST_CAST'ing when creating the
group, but I'll see.
Jarno
> @@ -515,20 +515,22 @@ struct ofgroup {
> const enum ofp11_group_type type; /* One of OFPGT_*. */
>
> const long long int created; /* Creation time. */
> const long long int modified; /* Time of last modification. */
>
> + /* const ?? */
> struct ovs_list buckets; /* Contains "struct ofputil_bucket"s. */
> const uint32_t n_buckets;
>
> const struct ofputil_group_props props;
> };
>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev