diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 03:35:11 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 03:35:11 +0400 |
commit | 708e16892e1646594a29eaa7ac7b209b600b9fd2 (patch) | |
tree | fe7c31bc0edef84eb1075c7e195340047d6aaa17 /Documentation/networking/packet_mmap.txt | |
parent | f3c87a8999c28f2948ebd407574f7e9fb5c577b2 (diff) | |
parent | a847825970e741e20a09c659978baa34016b63bc (diff) | |
download | linux-708e16892e1646594a29eaa7ac7b209b600b9fd2.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (39 commits)
Add missing maintainer countries in CREDITS
Fix bytes <-> kilobytes typo in Kconfig for ramdisk
fix a typo in Documentation/pi-futex.txt
BUG_ON conversion for fs/xfs/
BUG_ON() conversion in fs/nfsd/
BUG_ON conversion for fs/reiserfs
BUG_ON cleanups in arch/i386
BUG_ON cleanup in drivers/net/tokenring/
BUG_ON cleanup for drivers/md/
kerneldoc-typo in led-class.c
debugfs: spelling fix
rcutorture: Fix incorrect description of default for nreaders parameter
parport: Remove space in function calls
Michal Wronski: update contact info
Spelling fix: "control" instead of "cotrol"
reboot parameter in Documentation/kernel-parameters.txt
Fix copy&waste bug in comment in scripts/kernel-doc
remove duplicate "until" from kernel/workqueue.c
ite_gpio fix tabbage
fix file specification in comments
...
Fixed trivial path conflicts due to removed files:
arch/mips/dec/boot/decstation.c, drivers/char/ite_gpio.c
Diffstat (limited to 'Documentation/networking/packet_mmap.txt')
-rw-r--r-- | Documentation/networking/packet_mmap.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index aaf99d5f0dad..12a008a5c221 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt @@ -66,7 +66,7 @@ the following process: [setup] socket() -------> creation of the capture socket setsockopt() ---> allocation of the circular buffer (ring) - mmap() ---------> maping of the allocated buffer to the + mmap() ---------> mapping of the allocated buffer to the user process [capture] poll() ---------> to wait for incoming packets @@ -93,7 +93,7 @@ The destruction of the socket and all associated resources is done by a simple call to close(fd). Next I will describe PACKET_MMAP settings and it's constraints, -also the maping of the circular buffer in the user process and +also the mapping of the circular buffer in the user process and the use of this buffer. -------------------------------------------------------------------------------- @@ -153,8 +153,8 @@ we will get the following buffer structure: A frame can be of any size with the only condition it can fit in a block. A block can only hold an integer number of frames, or in other words, a frame cannot -be spawn accross two blocks so there are some datails you have to take into -account when choosing the frame_size. See "Maping and use of the circular +be spawned accross two blocks, so there are some details you have to take into +account when choosing the frame_size. See "Mapping and use of the circular buffer (ring)". @@ -215,8 +215,8 @@ called pg_vec, its size limits the number of blocks that can be allocated. block #1 -kmalloc allocates any number of bytes of phisically contiguous memory from -a pool of pre-determined sizes. This pool of memory is mantained by the slab +kmalloc allocates any number of bytes of physically contiguous memory from +a pool of pre-determined sizes. This pool of memory is maintained by the slab allocator which is at the end the responsible for doing the allocation and hence which imposes the maximum memory that kmalloc can allocate. @@ -262,7 +262,7 @@ i386 architecture: <pagesize> = 4096 bytes <max-order> = 11 -and a value for <frame size> of 2048 byteas. These parameters will yield +and a value for <frame size> of 2048 bytes. These parameters will yield <block number> = 131072/4 = 32768 blocks <block size> = 4096 << 11 = 8 MiB. @@ -278,7 +278,7 @@ an i386 kernel's memory size is limited to 1GiB. All memory allocations are not freed until the socket is closed. The memory allocations are done with GFP_KERNEL priority, this basically means that the allocation can wait and swap other process' memory in order to allocate -the nececessary memory, so normally limits can be reached. +the necessary memory, so normally limits can be reached. Other constraints ------------------- @@ -296,7 +296,7 @@ the following (from include/linux/if_packet.h): - struct tpacket_hdr - pad to TPACKET_ALIGNMENT=16 - struct sockaddr_ll - - Gap, chosen so that packet data (Start+tp_net) alignes to + - Gap, chosen so that packet data (Start+tp_net) aligns to TPACKET_ALIGNMENT=16 - Start+tp_mac: [ Optional MAC header ] - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. @@ -311,14 +311,14 @@ the following (from include/linux/if_packet.h): tp_frame_size must be a multiple of TPACKET_ALIGNMENT tp_frame_nr must be exactly frames_per_block*tp_block_nr -Note that tp_block_size should be choosed to be a power of two or there will +Note that tp_block_size should be chosen to be a power of two or there will be a waste of memory. -------------------------------------------------------------------------------- -+ Maping and use of the circular buffer (ring) ++ Mapping and use of the circular buffer (ring) -------------------------------------------------------------------------------- -The maping of the buffer in the user process is done with the conventional +The mapping of the buffer in the user process is done with the conventional mmap function. Even the circular buffer is compound of several physically discontiguous blocks of memory, they are contiguous to the user space, hence just one call to mmap is needed: |