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
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.

        - 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.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to