Re: One question about PACKET_MMAP

From: uaca
Date: Mon Apr 12 2004 - 12:34:46 EST


On Mon, Apr 12, 2004 at 03:29:13PM +0800, Zhao, Forrest wrote:
> Hi, Ulisses
>
> I have a question about PACKET_MMAP.
> Could you tell me whether OS or device driver
> fill in the ring buffers in the kernel?

it's the OS that fills the ring buffer

> Do you have any performance measurement data
> about this feature? Such as the packet drop rate
> in high speed network.

Well, this also depends on how you use it, the libpcap
I used (http://pusa.uv.es/~ulisses/packet_mmap/) copies
the frames from the ring to the user space buffer, so in this
case using PACKET_MMAP only gets the benefit of (nearly) not
issuing any system call (which is very important), but not
reducing the number of times data is copied

In order to be compatible with current libpcap API, I think that is
necessary to copy the data

There is another libpcap that uses PACKET_MMAP, see

http://public.lanl.gov/cpw/

I did not checked that detail about this version. I'm going to look at it now

In my degree's project in Ms.C while using the application I developed
(with libpcap) I could get 54000 packets/second@228Mbps without any lose
the machine had a P-III@800Mhz and a Tigon3 Gigabit Interface.

NOTE that this result includes user space processing of my application,
so what I report maybe quite misleading.

You should also use a NAPI enabled driver for serious benchmarking

I'm not sure if NAPI was working (it was expected), because I did get +10000
interrupts/second


I hope this helps

Ulisses




>
> Thanks,
>
> ------------------------------------------------------------------
> Forrest, Zhao
> Software Engineer
> Intel China Software Lab
> Tel:(086)021-52574545-1399
> -------------------------------------------------------------------
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Debian GNU/Linux: a dream come true
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers." Pablo Picasso

Humans are slow, innaccurate, and brilliant.
Computers are fast, acurrate, and dumb.
Together they are unbeatable

---> Visita http://www.valux.org/ para saber acerca de la <---
---> Asociación Valenciana de Usuarios de Linux <---

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