All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pádraig Brady" <P@draigBrady.com>
To: Joan Raventos <jraventos@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: poll problem with PF_PACKET when using PACKET_RX_RING
Date: Mon, 16 Oct 2006 11:56:41 +0100	[thread overview]
Message-ID: <45336569.5040108@draigBrady.com> (raw)
In-Reply-To: <20061014214328.25873.qmail@web50614.mail.yahoo.com>

Joan Raventos wrote:
> Hello,
>
> In order to use PF_PACKET/SOCK_RAW with PACKET_RX_RING
> one would possibly do (as described in
> Documentation/networking/packet_mmap.txt):
> 1. setup PF_PACKET socket via socket call.
> 2. use setsockopt to change the PF_PACKET socket into
> PACKET_RX_RING mode and alloc the ring.
> 3. mmap the ring.
> 4. use poll with the socket descriptor and then
> directly access the pkts from the mmaped ring.

A few years back I developed a network sniffer
on 2.4.20 using PACKET_MMAP supporting very high packet rates.
When testing with high packet rates, invariably if traffic
was present while the buffers were being setup, the buffer data
would be corrupted. I worked around it by ensuring no packets went
into the stack before the userspace process sniffing the packets was started.

Pádraig.

  parent reply	other threads:[~2006-10-16 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-14 21:43 poll problem with PF_PACKET when using PACKET_RX_RING Joan Raventos
2006-10-15 14:00 ` Patrick McHardy
2006-10-16 10:56 ` Pádraig Brady [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-15 18:10 Joan Raventos
2006-10-16  6:18 ` Patrick McHardy
2006-10-16 19:39 Joan Raventos

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=45336569.5040108@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=jraventos@yahoo.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.