Re: [PATCH net-next] net: export netdev_stats_to_stats64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Le mardi 06 mars 2012 à 12:38 +0800, Junchang Wang a écrit :
> > Some drivers use internal netdev stats member to store part of their
> > stats, yet advertize ndo_get_stats64() to implement some 64bit fields.
> >
> > Allow them to use netdev_stats_to_stats64() helper to make the copy of
> > netdev stats before they compute their 64bit counters.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
> 
> Hi Eric,
> And I think we can add a netdev_stats_add_to_stats64() helper to avoid
> following duplicate code. Is that acceptable? Thanks.
> 
> drivers/net/bonding/bond_main.c
>                 stats->rx_packets += sstats->rx_packets;

Oops, I misread your mail, I was preparing other stuff, not an add()
helper. I dont think it would be that usefull (only bond AFAIK)




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux