On 5/10/24 12:06, Eelco Chaudron wrote:
> On 24 Apr 2024, at 21:53, Adrian Moreno wrote:
>
>> Add a new resource in ofproto-dpif and the corresponding API in
>> ofproto_provider.h to represent and change psample configuration.
>
> See comments below.
>
> //Eelco
>
>> Signed-off-by: Adrian Moreno <[email protected]>
>> ---
>> ofproto/automake.mk | 2 +
>> ofproto/ofproto-dpif-psample.c | 167 +++++++++++++++++++++++++++++++++
>> ofproto/ofproto-dpif-psample.h | 31 ++++++
>> ofproto/ofproto-dpif.c | 33 +++++++
>> ofproto/ofproto-dpif.h | 1 +
>> ofproto/ofproto-provider.h | 9 ++
>> ofproto/ofproto.c | 10 ++
>> ofproto/ofproto.h | 8 ++
>> 8 files changed, 261 insertions(+)
>> create mode 100644 ofproto/ofproto-dpif-psample.c
>> create mode 100644 ofproto/ofproto-dpif-psample.h
<snip>
>> +OVS_EXCLUDED(mutex)
>> +{
>> + struct ofproto_psample_options *options;
>> + struct psample_exporter_map_node *node;
>> + bool changed = false;
>> +
>> + ovs_mutex_lock(&mutex);
>> +
>> + /* psample exporters do not hold any runtime memory so we do not need to
>> + * be extra careful at detecting which exporter changed and which did
>> + * not. As soon as we detect any change we can just recreate them all.
>> */
>
> Double space for new lines. Also not sure what multi line comment style we
> would
> like to enforce for new files. Coding style prefers /* and /* on new lines,
> but
> other options are allowed. Ilya?
Coding style allows for /* and */ on the same line as the comment start/end,
and I prefer it that way. Putting them on separate lines sometimes beneficial
for readability when the code is busy and tightly packed, so enforcing one
way or another is probably not a great thing.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev