aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-06-15 11:31:06 -0400
committerPatrick McHardy <kaber@trash.net>2010-06-15 11:31:06 -0400
commitf9181f4ffc71d7b7dd1906c9a11d51d6659220ae (patch)
tree194f22e8216a1b9ee2c0dd019142202d73a7dc87 /Documentation
parent0902b469bd25065aa0688c3cee6f11744c817e7c (diff)
parent1ab6c163dee279559e3a62d774af7e4c4c9b4c67 (diff)
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts: include/net/netfilter/xt_rateest.h net/bridge/br_netfilter.c net/netfilter/nf_conntrack_core.c Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt2
-rw-r--r--Documentation/networking/bonding.txt84
-rw-r--r--Documentation/networking/packet_mmap.txt26
-rw-r--r--Documentation/networking/pktgen.txt5
4 files changed, 115 insertions, 2 deletions
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 3ba0b945aaf8..f2430a7974e1 100644
--- a/Documentation/filesystems/nfs/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
@@ -124,6 +124,8 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
124 124
125 <hostname> Name of the client. May be supplied by autoconfiguration, 125 <hostname> Name of the client. May be supplied by autoconfiguration,
126 but its absence will not trigger autoconfiguration. 126 but its absence will not trigger autoconfiguration.
127 If specified and DHCP is used, the user provided hostname will
128 be carried in the DHCP request to hopefully update DNS record.
127 129
128 Default: Client IP address is used in ASCII notation. 130 Default: Client IP address is used in ASCII notation.
129 131
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 61f516b135b4..d0914781830e 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -49,6 +49,7 @@ Table of Contents
493.3 Configuring Bonding Manually with Ifenslave 493.3 Configuring Bonding Manually with Ifenslave
503.3.1 Configuring Multiple Bonds Manually 503.3.1 Configuring Multiple Bonds Manually
513.4 Configuring Bonding Manually via Sysfs 513.4 Configuring Bonding Manually via Sysfs
523.5 Overriding Configuration for Special Cases
52 53
534. Querying Bonding Configuration 544. Querying Bonding Configuration
544.1 Bonding Configuration 554.1 Bonding Configuration
@@ -1318,8 +1319,87 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval
1318echo +eth2 > /sys/class/net/bond1/bonding/slaves 1319echo +eth2 > /sys/class/net/bond1/bonding/slaves
1319echo +eth3 > /sys/class/net/bond1/bonding/slaves 1320echo +eth3 > /sys/class/net/bond1/bonding/slaves
1320 1321
1321 13223.5 Overriding Configuration for Special Cases
13224. Querying Bonding Configuration 1323----------------------------------------------
1324When using the bonding driver, the physical port which transmits a frame is
1325typically selected by the bonding driver, and is not relevant to the user or
1326system administrator. The output port is simply selected using the policies of
1327the selected bonding mode. On occasion however, it is helpful to direct certain
1328classes of traffic to certain physical interfaces on output to implement
1329slightly more complex policies. For example, to reach a web server over a
1330bonded interface in which eth0 connects to a private network, while eth1
1331connects via a public network, it may be desirous to bias the bond to send said
1332traffic over eth0 first, using eth1 only as a fall back, while all other traffic
1333can safely be sent over either interface. Such configurations may be achieved
1334using the traffic control utilities inherent in linux.
1335
1336By default the bonding driver is multiqueue aware and 16 queues are created
1337when the driver initializes (see Documentation/networking/multiqueue.txt
1338for details). If more or less queues are desired the module parameter
1339tx_queues can be used to change this value. There is no sysfs parameter
1340available as the allocation is done at module init time.
1341
1342The output of the file /proc/net/bonding/bondX has changed so the output Queue
1343ID is now printed for each slave:
1344
1345Bonding Mode: fault-tolerance (active-backup)
1346Primary Slave: None
1347Currently Active Slave: eth0
1348MII Status: up
1349MII Polling Interval (ms): 0
1350Up Delay (ms): 0
1351Down Delay (ms): 0
1352
1353Slave Interface: eth0
1354MII Status: up
1355Link Failure Count: 0
1356Permanent HW addr: 00:1a:a0:12:8f:cb
1357Slave queue ID: 0
1358
1359Slave Interface: eth1
1360MII Status: up
1361Link Failure Count: 0
1362Permanent HW addr: 00:1a:a0:12:8f:cc
1363Slave queue ID: 2
1364
1365The queue_id for a slave can be set using the command:
1366
1367# echo "eth1:2" > /sys/class/net/bond0/bonding/queue_id
1368
1369Any interface that needs a queue_id set should set it with multiple calls
1370like the one above until proper priorities are set for all interfaces. On
1371distributions that allow configuration via initscripts, multiple 'queue_id'
1372arguments can be added to BONDING_OPTS to set all needed slave queues.
1373
1374These queue id's can be used in conjunction with the tc utility to configure
1375a multiqueue qdisc and filters to bias certain traffic to transmit on certain
1376slave devices. For instance, say we wanted, in the above configuration to
1377force all traffic bound to 192.168.1.100 to use eth1 in the bond as its output
1378device. The following commands would accomplish this:
1379
1380# tc qdisc add dev bond0 handle 1 root multiq
1381
1382# tc filter add dev bond0 protocol ip parent 1: prio 1 u32 match ip dst \
1383 192.168.1.100 action skbedit queue_mapping 2
1384
1385These commands tell the kernel to attach a multiqueue queue discipline to the
1386bond0 interface and filter traffic enqueued to it, such that packets with a dst
1387ip of 192.168.1.100 have their output queue mapping value overwritten to 2.
1388This value is then passed into the driver, causing the normal output path
1389selection policy to be overridden, selecting instead qid 2, which maps to eth1.
1390
1391Note that qid values begin at 1. Qid 0 is reserved to initiate to the driver
1392that normal output policy selection should take place. One benefit to simply
1393leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
1394driver that is now present. This awareness allows tc filters to be placed on
1395slave devices as well as bond devices and the bonding driver will simply act as
1396a pass-through for selecting output queues on the slave device rather than
1397output port selection.
1398
1399This feature first appeared in bonding driver version 3.7.0 and support for
1400output slave selection was limited to round-robin and active-backup modes.
1401
14024 Querying Bonding Configuration
1323================================= 1403=================================
1324 1404
13254.1 Bonding Configuration 14054.1 Bonding Configuration
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 98f71a5cef00..2546aa4dc232 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -493,6 +493,32 @@ The user can also use poll() to check if a buffer is available:
493 pfd.events = POLLOUT; 493 pfd.events = POLLOUT;
494 retval = poll(&pfd, 1, timeout); 494 retval = poll(&pfd, 1, timeout);
495 495
496-------------------------------------------------------------------------------
497+ PACKET_TIMESTAMP
498-------------------------------------------------------------------------------
499
500The PACKET_TIMESTAMP setting determines the source of the timestamp in
501the packet meta information. If your NIC is capable of timestamping
502packets in hardware, you can request those hardware timestamps to used.
503Note: you may need to enable the generation of hardware timestamps with
504SIOCSHWTSTAMP.
505
506PACKET_TIMESTAMP accepts the same integer bit field as
507SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE
508and SOF_TIMESTAMPING_RAW_HARDWARE values are recognized by
509PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over
510SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set.
511
512 int req = 0;
513 req |= SOF_TIMESTAMPING_SYS_HARDWARE;
514 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req))
515
516If PACKET_TIMESTAMP is not set, a software timestamp generated inside
517the networking stack is used (the behavior before this setting was added).
518
519See include/linux/net_tstamp.h and Documentation/networking/timestamping
520for more information on hardware timestamps.
521
496-------------------------------------------------------------------------------- 522--------------------------------------------------------------------------------
497+ THANKS 523+ THANKS
498-------------------------------------------------------------------------------- 524--------------------------------------------------------------------------------
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 61bb645d50e0..75e4fd708ccb 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -151,6 +151,8 @@ Examples:
151 151
152 pgset stop aborts injection. Also, ^C aborts generator. 152 pgset stop aborts injection. Also, ^C aborts generator.
153 153
154 pgset "rate 300M" set rate to 300 Mb/s
155 pgset "ratep 1000000" set rate to 1Mpps
154 156
155Example scripts 157Example scripts
156=============== 158===============
@@ -241,6 +243,9 @@ src6
241flows 243flows
242flowlen 244flowlen
243 245
246rate
247ratep
248
244References: 249References:
245ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ 250ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
246ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ 251ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/