[ovs-dev] [PATCH 08/10] datapath: Use RCU dereference in vport_get_ifindex().

Ben Pfaff blp at nicira.com
Wed Dec 29 18:06:50 UTC 2010


On Tue, Dec 28, 2010 at 08:50:46PM -0800, Jesse Gross wrote:
> If we don't have an ifindex for a device (because it is a virtual
> port), we fall back to using the ifindex of the local port.
> However, we weren't properly dereferencing the vport from the ports
> array, so this adds that.  This isn't a real problem though, because
> the local port always exists and never changes as long as the
> datapath exists.
> 
> Found with sparse.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

I can't remember why we do this.  Why not just return 0 in this case?

At any rate:
Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list