Re: [PATCH] macvlan: lockless tx path

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Wednesday, November 10, 2010 - 3:21 pm

Le mercredi 10 novembre 2010 à 13:35 -0800, Ben Greear a écrit :



Are you aware that you speak of something that is not specified at all
in linux ?

Frequency of polling is not part of any RFC. This usually is tunable in
the _application_. Some people sample stats every 5 minutes, some sample
every second, and hit the "xxx driver updates its stats every two
seconds, this sucks"

I wrote SNMP apps based on /proc/net/dev and all just work, with any
versions, any driver. Of course, some of them broke 6 years ago because
they were 32bit legacy application, running on a 64bit kernel. I never
asked David to change /proc/net/dev to cap counters to 32bit.

When 128bit cpu come, some userland changes are needed to parse 128bit
numbers.

In anycase, apps dont have to know a particular driver provides 64bit or
32bit counter. Only choice for them is to automatically detect the
wraparound, because they fetch a STRING, not a Counter32 or Counter64

This works for all drivers, legacy, new, Intel or whatever. If a driver
changes from 32 to 64, nothing special happens in /proc/net/dev.

RRD for example handles this just fine.


I repeat : Nothing in /proc/net/dev can tell you when a counter will
wrap (the counter width).

You also need to use the correct polling frequency, depending on max
speed. It was already the case with 32bit counters, 64bit ones only gave
some extra range.




I believe you are mistaken. We provide stats64 for all drivers, even
32bit legacy ones. rtnetlink has no way to report counter widths,
because nobody cared.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 8:41 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 10:39 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 10:43 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 10:53 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 11:18 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 11:40 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 1:33 pm)
Re: [PATCH] macvlan: lockless tx path, Ben Hutchings, (Wed Nov 10, 2:04 pm)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 2:12 pm)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 2:35 pm)
Re: [PATCH] macvlan: lockless tx path, Ben Hutchings, (Wed Nov 10, 2:53 pm)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 3:21 pm)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 3:53 pm)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 4:24 pm)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Wed Nov 10, 4:36 pm)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Wed Nov 10, 4:46 pm)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Thu Nov 11, 12:03 am)
[PATCH net-next-2.6 v2] macvlan: lockless tx path, Eric Dumazet, (Thu Nov 11, 12:14 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Thu Nov 11, 9:40 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Thu Nov 11, 9:56 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Thu Nov 11, 10:20 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Thu Nov 11, 11:02 am)
Re: [PATCH] macvlan: lockless tx path, Ben Greear, (Thu Nov 11, 11:13 am)
Re: [PATCH] macvlan: lockless tx path, Eric Dumazet, (Thu Nov 11, 11:46 am)
Re: [PATCH net-next-2.6 v2] macvlan: lockless tx path, Patrick McHardy, (Fri Nov 12, 1:20 am)
Re: [PATCH net-next-2.6 v2] macvlan: lockless tx path, David Miller, (Tue Nov 16, 11:59 am)