[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ppp
Subject:    Re: counters overflow
From:       carlsonj () workingcode ! com
Date:       2004-09-30 17:33:51
Message-ID: 16732.17279.778971.646668 () carlson ! workingcode ! com
[Download RAW message or body]

Paul Mackerras writes:
> I think I will make pppd maintain the upper 32 bits of a count in
> userspace, by having it wake up periodically and poll the 32-bit
> counters from the kernel and see if they have wrapped.

Yuck.  How often would you need to poll?

We solved the problem on Solaris by having the kernel implement both a
PPPIO_GETSTAT ioctl and a new PPPIO_GETSTAT64 ioctl.  The former still
returns 32 bit counters to applications that want them.  The latter
uses 64 bit counters.  In the user space, we call PPPIO_GETSTAT64
first, and if that fails, fall back to PPPIO_GETSTAT.

I'd expect that the same sort of thing would work fine on Linux as
well.

-- 
James Carlson                                 <carlsonj@workingcode.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic