[ovs-dev] [PATCH] ofproto-dpif: Move special upcall handling into ofproto-dpif-upcall.

Ben Pfaff blp at nicira.com
Tue Sep 24 22:38:13 UTC 2013


On Tue, Sep 24, 2013 at 03:12:37PM -0700, Ethan Jackson wrote:
> Both the IPFIX and SFLOW modules are thread safe, so there's no
> particular reason to pass them up to the main thread.  Eliminating
> this step significantly simplifies the code.
> 
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

GCC says:

    ../ofproto/ofproto-dpif-xlate.c: In function 'xlate_get_sflow':
    ../ofproto/ofproto-dpif-xlate.c:2482:5: error: 'sflow' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    ../ofproto/ofproto-dpif-xlate.c: In function 'xlate_get_ipfix':
    ../ofproto/ofproto-dpif-xlate.c:2501:5: error: 'ipfix' may be used uninitialized in this function [-Werror=maybe-uninitialized]

(Clang said the same thing but took 10x as many lines to say it.)

Another way to handle these upcalls might be to uniformly send every
packet to a handler thread, and then handle all the kinds of upcalls
in the handlers.  Did you consider that solution?  I don't know,
off-hand, whether it is better.  It might do less work in the
dispatcher, allowing the dispatcher to pass packets to the handlers
more quickly.



More information about the dev mailing list