[ovs-dev] [netlink 14/16] datapath: Use "struct rtnl_link_stats64" instead of "struct odp_vport_stats".

Jesse Gross jesse at nicira.com
Thu Nov 4 22:19:34 UTC 2010


On Thu, Nov 4, 2010 at 2:18 PM, Ben Pfaff <blp at nicira.com> wrote:
>> > @@ -872,9 +872,9 @@ int vport_get_stats(struct vport *vport, struct odp_vport_stats *stats)
>> >                stats->tx_errors        += vport->err_stats.tx_errors;
>> >                stats->tx_dropped       += vport->err_stats.tx_dropped;
>> >                stats->rx_dropped       += vport->err_stats.rx_dropped;
>> > -               stats->rx_over_err      += vport->err_stats.rx_over_err;
>> > -               stats->rx_crc_err       += vport->err_stats.rx_crc_err;
>> > -               stats->rx_frame_err     += vport->err_stats.rx_frame_err;
>> > +               stats->rx_over_errors   += vport->err_stats.rx_over_err;
>> > +               stats->rx_crc_errors    += vport->err_stats.rx_crc_err;
>> > +               stats->rx_frame_errors  += vport->err_stats.rx_frame_err;
>> >                stats->collisions       += vport->err_stats.collisions;
>>
>> There are a bunch of new fields that are now available.  Should we try
>> to use them?  In addition to having extra information available, it is
>> a little strange that the offset stats will never include those fields
>> (but then offset stats are more than a little strange to start off
>> with).
>
> You mean, should we add corresponding fields to err_stats and
> percpu_stats?  I haven't done that, even now, but I've now changed the
> code that adds the contents of 'dev_statsp' to 'stats' to add all of the
> fields.

I was thinking about adding those additional fields to err_stats but
it seems unlikely that we would ever increment them ourselves.  We
would only pull them from the device stats or offset stats.  Even with
the ones we have now rx_frame_err, rx_over_err, rx_crc_err, and
collisions are never used and probably never will be since the packets
would likely be dropped before getting to us.  Maybe we should remove
those from err_stats.




More information about the dev mailing list