On 1/23/2019 2:14 AM, Ben Pfaff wrote:
> On Fri, Jan 11, 2019 at 08:28:57AM +0200, Eli Britstein wrote:
>> Hi
>>
>> This patch set avoids unnecessary rewrite actions to fields with the
>> same values as matched on.
>>
>> Patch 1 is a pre-step by defining ovs key structs using macros
>>
>> Patch 2 avoids the unnecessary rewrites and adapts the tests accordingly
> I like the goal of the patch, but it makes openvswitch.h unreadable and
> completely different from Linux upstream.  One of the goals of that
> "sed" script is to avoid having it be different from upstream.  I think

unreadable - well, it's a point of view, but i don't think that's alone 
is a justified argument not to change

completely different - that's correct. why don't we just push the same 
change to the Linux upstream to keep it the same?

> that we should come up with a way to do this that avoids the problem.
> Offhand, I can think of a couple of ways:
>
>          - Write a script that parses openvswitch.h in a simple way and
>            extracts the needed information into a file that can be
>            #included.
I think that would be by far more complicated and unreadable solution
>
>          - Just list the relevant field names in odp-util.c in the
>            relevant functions.  From field names, it's easy to get
>            offsets (with offsetof) and sizes (MEMBER_SIZEOF).  It might
>            be problematic to keep these in sync if the structures
>            changed, but they will not because the Linux ABI is stable.

though it is stable, if it happens that someone needs to change it, with 
this solution we will have to change in more than one place the same 
change. I don't think this is acceptable.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to