[ovs-dev] [PATCH 4/6] internal-vport: Convert internal devices to vport stats.
Ben Pfaff
blp at nicira.com
Thu Jun 10 09:56:15 PDT 2010
Before I get started, while reviewing code I noticed that vport.c has
some "extern" declarations in it. Those are a no-no in the kernel that
I see people getting called out on from time to time (mostly by Andrew
Morton). We should move them into a header.
On Wed, Jun 09, 2010 at 07:33:19PM -0700, Jesse Gross wrote:
> Internal devices currently keep track of stats themselves. However,
> we now have stats tracking in the vport layer, so convert to use
> that instead to avoid code duplication and take advantage of
> additional features such as 64-bit counters.
At first I thought there must be recursion in internal_dev_get_stats(),
but I convinced myself it's OK:
vport_user_stats_get() calls
vport_get_stats(), which implements generic stats itself.
something in the core kernel network stack calls
internal_dev_get_stats(), which calls
vport_get_stats(), which implements generic stats itself.
It's too bad both network devices and vports have a member called
'get_stats'. That's probably the source of my confusion. Maybe we
should have added a 'v_' or 'vp_' prefix to struct vport_ops member
names.
More information about the dev
mailing list