[ovs-dev] [PATCH] datapath: Annotate dp_ifindex code with likely/unlikely.

Ben Pfaff blp at nicira.com
Fri Sep 23 22:46:53 UTC 2011


On Fri, Sep 23, 2011 at 03:44:49PM -0700, Jesse Gross wrote:
> On Fri, Sep 23, 2011 at 3:32 PM, Ben Pfaff <blp at nicira.com> wrote:
> > There's only a small race window on datapath creation when get_dpfindex()
> > can return 0, so it's pretty unlikely.
> >
> > Found by inspection.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> 
> In general, I haven't been putting likely/unlikely in the upcall path
> because it makes the code a little harder to read and I'm not sure
> that it's really necessary.  Upcalls are borderline fast/slow path but
> if we decide to annotate the branch here then we probably should do it
> for the other error conditions as well.

Good point.

I'll drop it.



More information about the dev mailing list