[ovs-dev] [PATCH 6/6] netdev-vport: Use vport set_stats instead of internal dev.

Ben Pfaff blp at nicira.com
Thu Jun 10 17:10:12 UTC 2010


On Wed, Jun 09, 2010 at 07:33:21PM -0700, Jesse Gross wrote:
> In certain cases we require the ability to provide stats that are
> added to the values collected by the kernel (currently only used
> by bond fake devices).  Internal devices previously implemented
> this directly but now that their stats are now handled by the vport
> layer the functionality has been moved there.  This removes the
> userspace code to set the stats and replaces it with a mechanism
> to access the equivalent functionality in the vport layer.

The only question I had here, other than a trivial one in a comment
below, was whether you were swapping or not swapping rx/tx in the right
places.  But since there's a big comment about that in one spot, I'll
assume that you thought it through.  Personally that issue just makes my
head spin.

> +    err = netdev_vport_do_ioctl(ODP_VPORT_STATS_SET, &ovsr);
> +
> +    /* If the vport layer doesn't know about the device, that doesn't mean it
> +     * doesn't exist (after all we have an open netdev), it just means that it
> +     * isn't attached and we'll be getting stats a different way. */

I think that the parenthetical comment here is a little deceptive.  I
don't think that there's really such a thing as an "open netdev" under
Linux.  We don't even have a per-netdev file descriptor anymore, since
it was too expensive.

Thank you!




More information about the dev mailing list