linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: carlsonj@workingcode.com
To: linux-ppp@vger.kernel.org
Subject: Re: counters overflow
Date: Thu, 30 Sep 2004 17:33:51 +0000	[thread overview]
Message-ID: <16732.17279.778971.646668@carlson.workingcode.com> (raw)
In-Reply-To: <262655318.20040929092029@rsl.ru>

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>

      parent reply	other threads:[~2004-09-30 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29  5:20 counters overflow Dmitry Vereschaka
2004-09-29  6:16 ` David Ananian-Cooper
2004-09-29 16:10 ` Bill Unruh
2004-09-30  2:10 ` Paul Mackerras
2004-09-30 17:33 ` carlsonj [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16732.17279.778971.646668@carlson.workingcode.com \
    --to=carlsonj@workingcode.com \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).