[ovs-dev] [PATCH 1/2] ofproto-dpif-upcall: Use atomic_long in struct udpif

Ben Pfaff blp at nicira.com
Mon May 12 15:52:52 UTC 2014


On Mon, May 12, 2014 at 08:56:36AM +0900, Simon Horman wrote:
> Some concern has been raised by Ben Pfaff that atomic_uint64_t may not
> be portable. Accordingly, use atomic_ulong instead of atomic_uint64_t
> in struct ofproto.
> 
> This is in preparation for removing atomic_uint64_t entirely.
> 
> Cc: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
> Signed-off-by: Simon Horman <horms at verge.net.au>

Clang reports:

    ../ofproto/ofproto-dpif-upcall.c:488:1: error: conflicting types for
          'udpif_get_n_flows'
    udpif_get_n_flows(struct udpif *udpif)
    ^
    ../ofproto/ofproto-dpif-upcall.c:220:17: note: previous declaration is here
    static uint64_t udpif_get_n_flows(struct udpif *);
                    ^
    ../ofproto/ofproto-dpif-upcall.c:1603:48: error: format specifies type
          'unsigned long' but the argument has type 'uint64_t' (aka
          'unsigned long long') [-Werror,-Wformat]
                " (avg %u) (max %u) (limit %u)\n", udpif_get_n_flows(udpif),
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~



More information about the dev mailing list