Skip to content

Commit

Permalink
docs: networking: packet_mmap: fix old config reference
Browse files Browse the repository at this point in the history
Before commit 889b8f9 ("packet: Kill CONFIG_PACKET_MMAP.") there
used to be a CONFIG_PACKET_MMAP config symbol that depended on
CONFIG_PACKET. The text still implies that PACKET_MMAP can be disabled.
Remove that from the text, as well as reference to old kernel versions.

Also, drop reference to broken link to information for pre 2.6.5
kernels.

Make a slight working improvement (s/In/On/) while at it.

Signed-off-by: Baruch Siach <[email protected]>
Link: https://lore.kernel.org/r/80089f3783372c8fd7833f28ce774a171b2ef252.1609232919.git.baruch@tkos.co.il
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
baruchsiach authored and kuba-moo committed Jan 4, 2021
1 parent 17e9456 commit e4da63c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Documentation/networking/packet_mmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Abstract
========

This file documents the mmap() facility available with the PACKET
socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for
socket interface. This type of sockets is used for

i) capture network traffic with utilities like tcpdump,
ii) transmit network traffic, or any other that needs raw
Expand All @@ -25,12 +25,12 @@ Please send your comments to
Why use PACKET_MMAP
===================

In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very
Non PACKET_MMAP capture process (plain AF_PACKET) is very
inefficient. It uses very limited buffers and requires one system call to
capture each packet, it requires two if you want to get packet's timestamp
(like libpcap always does).

In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
On the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size
configurable circular buffer mapped in user space that can be used to either
send or receive packets. This way reading packets just needs to wait for them,
most of the time there is no need to issue a single system call. Concerning
Expand Down Expand Up @@ -252,8 +252,7 @@ PACKET_MMAP setting constraints

In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch),
the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or
16384 in a 64 bit architecture. For information on these kernel versions
see http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt
16384 in a 64 bit architecture.

Block size limit
----------------
Expand Down

0 comments on commit e4da63c

Please sign in to comment.