[ovs-dev] [sparse 1/3] ofproto-dpif-upcall: Fix sparse warning.

Ethan Jackson ethan at nicira.com
Wed Aug 14 01:29:48 UTC 2013


>         - Make sparse work with clang.  (I don't think it's too hard,
>           at least on systems where GCC is also installed.)
>
>         - Add bitwise (or similar) support to Clang (and upstream it).

Either of these seems fine to me.  Suspect that just getting sparse to
work with clang is going to be easier.  We'll always need it for the
kernel module anyways.

>
>         - Implement ovs_be<N> without using bitwise.  For example,
>           instead of a typedef from uint32_t to ovs_be32, we could use
>           a struct that contains a single uint32_t element.  But there
>           are lots of pitfalls in that solution, e.g. I believe that
>           some platforms always pad structs out to a multiple of 32
>           bits in length, so that this wouldn't work for ovs_be16.

I really don't like this idea.

Ethan
X-CudaMail-Whitelist-To: dev at openvswitch.org



More information about the dev mailing list