aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 13:01:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 13:01:50 -0400
commit3c4cfadef6a1665d9cd02a543782d03d3e6740c6 (patch)
tree3df72faaacd494d5ac8c9668df4f529b1b5e4457 /Documentation
parente017507f37d5cb8b541df165a824958bc333bec3 (diff)
parent320f5ea0cedc08ef65d67e056bcb9d181386ef2c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David S Miller: 1) Remove the ipv4 routing cache. Now lookups go directly into the FIB trie and use prebuilt routes cached there. No more garbage collection, no more rDOS attacks on the routing cache. Instead we now get predictable and consistent performance, no matter what the pattern of traffic we service. This has been almost 2 years in the making. Special thanks to Julian Anastasov, Eric Dumazet, Steffen Klassert, and others who have helped along the way. I'm sure that with a change of this magnitude there will be some kind of fallout, but such things ought the be simple to fix at this point. Luckily I'm not European so I'll be around all of August to fix things :-) The major stages of this work here are each fronted by a forced merge commit whose commit message contains a top-level description of the motivations and implementation issues. 2) Pre-demux of established ipv4 TCP sockets, saves a route demux on input. 3) TCP SYN/ACK performance tweaks from Eric Dumazet. 4) Add namespace support for netfilter L4 conntrack helpers, from Gao Feng. 5) Add config mechanism for Energy Efficient Ethernet to ethtool, from Yuval Mintz. 6) Remove quadratic behavior from /proc/net/unix, from Eric Dumazet. 7) Support for connection tracker helpers in userspace, from Pablo Neira Ayuso. 8) Allow userspace driven TX load balancing functions in TEAM driver, from Jiri Pirko. 9) Kill off NLMSG_PUT and RTA_PUT macros, more gross stuff with embedded gotos. 10) TCP Small Queues, essentially minimize the amount of TCP data queued up in the packet scheduler layer. Whereas the existing BQL (Byte Queue Limits) limits the pkt_sched --> netdevice queuing levels, this controls the TCP --> pkt_sched queueing levels. From Eric Dumazet. 11) Reduce the number of get_page/put_page ops done on SKB fragments, from Alexander Duyck. 12) Implement protection against blind resets in TCP (RFC 5961), from Eric Dumazet. 13) Support the client side of TCP Fast Open, basically the ability to send data in the SYN exchange, from Yuchung Cheng. Basically, the sender queues up data with a sendmsg() call using MSG_FASTOPEN, then they do the connect() which emits the queued up fastopen data. 14) Avoid all the problems we get into in TCP when timers or PMTU events hit a locked socket. The TCP Small Queues changes added a tcp_release_cb() that allows us to queue work up to the release_sock() caller, and that's what we use here too. From Eric Dumazet. 15) Zero copy on TX support for TUN driver, from Michael S. Tsirkin. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1870 commits) genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEP r8169: revert "add byte queue limit support". ipv4: Change rt->rt_iif encoding. net: Make skb->skb_iif always track skb->dev ipv4: Prepare for change of rt->rt_iif encoding. ipv4: Remove all RTCF_DIRECTSRC handliing. ipv4: Really ignore ICMP address requests/replies. decnet: Don't set RTCF_DIRECTSRC. net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse. ipv4: Remove redundant assignment rds: set correct msg_namelen openvswitch: potential NULL deref in sample() tcp: dont drop MTU reduction indications bnx2x: Add new 57840 device IDs tcp: avoid oops in tcp_metrics and reset tcpm_stamp niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value niu: Fix to check for dma mapping errors. net: Fix references to out-of-scope variables in put_cmsg_compat() net: ethernet: davinci_emac: add pm_runtime support net: ethernet: davinci_emac: Remove unnecessary #include ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/80211.tmpl1
-rw-r--r--Documentation/connector/cn_test.c13
-rw-r--r--Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt29
-rw-r--r--Documentation/devicetree/bindings/net/can/fsl-flexcan.txt3
-rw-r--r--Documentation/devicetree/bindings/net/davinci_emac.txt41
-rw-r--r--Documentation/devicetree/bindings/net/fsl-fec.txt6
-rw-r--r--Documentation/devicetree/bindings/net/phy.txt12
-rw-r--r--Documentation/devicetree/bindings/net/stmmac.txt3
-rw-r--r--Documentation/feature-removal-schedule.txt44
-rw-r--r--Documentation/networking/batman-adv.txt5
-rw-r--r--Documentation/networking/bonding.txt6
-rw-r--r--Documentation/networking/bridge.txt13
-rw-r--r--Documentation/networking/caif/Linux-CAIF.txt91
-rw-r--r--Documentation/networking/can.txt186
-rw-r--r--Documentation/networking/ip-sysctl.txt62
-rw-r--r--Documentation/networking/openvswitch.txt2
-rw-r--r--Documentation/networking/s2io.txt14
-rw-r--r--Documentation/networking/stmmac.txt36
-rw-r--r--Documentation/networking/vxge.txt7
-rw-r--r--Documentation/nfc/nfc-hci.txt33
20 files changed, 449 insertions, 158 deletions
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index f3e214f9e25..42e7f030cb1 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -404,7 +404,6 @@
404!Finclude/net/mac80211.h ieee80211_get_tkip_p1k 404!Finclude/net/mac80211.h ieee80211_get_tkip_p1k
405!Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv 405!Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv
406!Finclude/net/mac80211.h ieee80211_get_tkip_p2k 406!Finclude/net/mac80211.h ieee80211_get_tkip_p2k
407!Finclude/net/mac80211.h ieee80211_key_removed
408 </chapter> 407 </chapter>
409 408
410 <chapter id="powersave"> 409 <chapter id="powersave">
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index 7764594778d..adcca0368d6 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -69,9 +69,13 @@ static int cn_test_want_notify(void)
69 return -ENOMEM; 69 return -ENOMEM;
70 } 70 }
71 71
72 nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh)); 72 nlh = nlmsg_put(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh), 0);
73 if (!nlh) {
74 kfree_skb(skb);
75 return -EMSGSIZE;
76 }
73 77
74 msg = (struct cn_msg *)NLMSG_DATA(nlh); 78 msg = nlmsg_data(nlh);
75 79
76 memset(msg, 0, size0); 80 memset(msg, 0, size0);
77 81
@@ -117,11 +121,6 @@ static int cn_test_want_notify(void)
117 pr_info("request was sent: group=0x%x\n", ctl->group); 121 pr_info("request was sent: group=0x%x\n", ctl->group);
118 122
119 return 0; 123 return 0;
120
121nlmsg_failure:
122 pr_err("failed to send %u.%u\n", msg->seq, msg->ack);
123 kfree_skb(skb);
124 return -EINVAL;
125} 124}
126#endif 125#endif
127 126
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt b/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt
new file mode 100644
index 00000000000..7c86d5e28a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/broadcom-bcm87xx.txt
@@ -0,0 +1,29 @@
1The Broadcom BCM87XX devices are a family of 10G Ethernet PHYs. They
2have these bindings in addition to the standard PHY bindings.
3
4Compatible: Should contain "broadcom,bcm8706" or "broadcom,bcm8727" and
5 "ethernet-phy-ieee802.3-c45"
6
7Optional Properties:
8
9- broadcom,c45-reg-init : one of more sets of 4 cells. The first cell
10 is the MDIO Manageable Device (MMD) address, the second a register
11 address within the MMD, the third cell contains a mask to be ANDed
12 with the existing register value, and the fourth cell is ORed with
13 he result to yield the new register value. If the third cell has a
14 value of zero, no read of the existing value is performed.
15
16Example:
17
18 ethernet-phy@5 {
19 reg = <5>;
20 compatible = "broadcom,bcm8706", "ethernet-phy-ieee802.3-c45";
21 interrupt-parent = <&gpio>;
22 interrupts = <12 8>; /* Pin 12, active low */
23 /*
24 * Set PMD Digital Control Register for
25 * GPIO[1] Tx/Rx
26 * GPIO[0] R64 Sync Acquired
27 */
28 broadcom,c45-reg-init = <1 0xc808 0xff8f 0x70>;
29 };
diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
index f31b686d455..8ff324eaa88 100644
--- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
+++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -11,6 +11,9 @@ Required properties:
11 11
12- reg : Offset and length of the register set for this device 12- reg : Offset and length of the register set for this device
13- interrupts : Interrupt tuple for this device 13- interrupts : Interrupt tuple for this device
14
15Optional properties:
16
14- clock-frequency : The oscillator frequency driving the flexcan device 17- clock-frequency : The oscillator frequency driving the flexcan device
15 18
16Example: 19Example:
diff --git a/Documentation/devicetree/bindings/net/davinci_emac.txt b/Documentation/devicetree/bindings/net/davinci_emac.txt
new file mode 100644
index 00000000000..48b259e29e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/davinci_emac.txt
@@ -0,0 +1,41 @@
1* Texas Instruments Davinci EMAC
2
3This file provides information, what the device node
4for the davinci_emac interface contains.
5
6Required properties:
7- compatible: "ti,davinci-dm6467-emac";
8- reg: Offset and length of the register set for the device
9- ti,davinci-ctrl-reg-offset: offset to control register
10- ti,davinci-ctrl-mod-reg-offset: offset to control module register
11- ti,davinci-ctrl-ram-offset: offset to control module ram
12- ti,davinci-ctrl-ram-size: size of control module ram
13- ti,davinci-rmii-en: use RMII
14- ti,davinci-no-bd-ram: has the emac controller BD RAM
15- phy-handle: Contains a phandle to an Ethernet PHY.
16 if not, davinci_emac driver defaults to 100/FULL
17- interrupts: interrupt mapping for the davinci emac interrupts sources:
18 4 sources: <Receive Threshold Interrupt
19 Receive Interrupt
20 Transmit Interrupt
21 Miscellaneous Interrupt>
22
23Optional properties:
24- local-mac-address : 6 bytes, mac address
25
26Example (enbw_cmc board):
27 eth0: emac@1e20000 {
28 compatible = "ti,davinci-dm6467-emac";
29 reg = <0x220000 0x4000>;
30 ti,davinci-ctrl-reg-offset = <0x3000>;
31 ti,davinci-ctrl-mod-reg-offset = <0x2000>;
32 ti,davinci-ctrl-ram-offset = <0>;
33 ti,davinci-ctrl-ram-size = <0x2000>;
34 local-mac-address = [ 00 00 00 00 00 00 ];
35 interrupts = <33
36 34
37 35
38 36
39 >;
40 interrupt-parent = <&intc>;
41 };
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
index 4616fc28ee8..d5363922140 100644
--- a/Documentation/devicetree/bindings/net/fsl-fec.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -7,10 +7,14 @@ Required properties:
7- phy-mode : String, operation mode of the PHY interface. 7- phy-mode : String, operation mode of the PHY interface.
8 Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii", 8 Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
9 "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii". 9 "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii".
10- phy-reset-gpios : Should specify the gpio for phy reset
11 10
12Optional properties: 11Optional properties:
13- local-mac-address : 6 bytes, mac address 12- local-mac-address : 6 bytes, mac address
13- phy-reset-gpios : Should specify the gpio for phy reset
14- phy-reset-duration : Reset duration in milliseconds. Should present
15 only if property "phy-reset-gpios" is available. Missing the property
16 will have the duration be 1 millisecond. Numbers greater than 1000 are
17 invalid and 1 millisecond will be used instead.
14 18
15Example: 19Example:
16 20
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index bb8c742eb8c..7cd18fbfcf7 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -14,10 +14,20 @@ Required properties:
14 - linux,phandle : phandle for this node; likely referenced by an 14 - linux,phandle : phandle for this node; likely referenced by an
15 ethernet controller node. 15 ethernet controller node.
16 16
17Optional Properties:
18
19- compatible: Compatible list, may contain
20 "ethernet-phy-ieee802.3-c22" or "ethernet-phy-ieee802.3-c45" for
21 PHYs that implement IEEE802.3 clause 22 or IEEE802.3 clause 45
22 specifications. If neither of these are specified, the default is to
23 assume clause 22. The compatible list may also contain other
24 elements.
25
17Example: 26Example:
18 27
19ethernet-phy@0 { 28ethernet-phy@0 {
20 linux,phandle = <2452000> 29 compatible = "ethernet-phy-ieee802.3-c22";
30 linux,phandle = <2452000>;
21 interrupt-parent = <40000>; 31 interrupt-parent = <40000>;
22 interrupts = <35 1>; 32 interrupts = <35 1>;
23 reg = <0>; 33 reg = <0>;
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index 1f62623f8c3..060bbf098ef 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -1,7 +1,8 @@
1* STMicroelectronics 10/100/1000 Ethernet driver (GMAC) 1* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
2 2
3Required properties: 3Required properties:
4- compatible: Should be "st,spear600-gmac" 4- compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac"
5 For backwards compatibility: "st,spear600-gmac" is also supported.
5- reg: Address and length of the register set for the device 6- reg: Address and length of the register set for the device
6- interrupt-parent: Should be the phandle for the interrupt controller 7- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device 8 that services interrupts for this device
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 56000b33340..61d1a89baea 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -249,15 +249,6 @@ Who: Ravikiran Thirumalai <kiran@scalex86.org>
249 249
250--------------------------- 250---------------------------
251 251
252What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS
253 (in net/core/net-sysfs.c)
254When: 3.5
255Why: Over 1K .text/.data size reduction, data is available in other
256 ways (ioctls)
257Who: Johannes Berg <johannes@sipsolutions.net>
258
259---------------------------
260
261What: sysfs ui for changing p4-clockmod parameters 252What: sysfs ui for changing p4-clockmod parameters
262When: September 2009 253When: September 2009
263Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and 254Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
@@ -414,21 +405,6 @@ Who: Jean Delvare <khali@linux-fr.org>
414 405
415---------------------------- 406----------------------------
416 407
417What: xt_connlimit rev 0
418When: 2012
419Who: Jan Engelhardt <jengelh@medozas.de>
420Files: net/netfilter/xt_connlimit.c
421
422----------------------------
423
424What: ipt_addrtype match include file
425When: 2012
426Why: superseded by xt_addrtype
427Who: Florian Westphal <fw@strlen.de>
428Files: include/linux/netfilter_ipv4/ipt_addrtype.h
429
430----------------------------
431
432What: i2c_driver.attach_adapter 408What: i2c_driver.attach_adapter
433 i2c_driver.detach_adapter 409 i2c_driver.detach_adapter
434When: September 2011 410When: September 2011
@@ -449,6 +425,19 @@ Who: Hans Verkuil <hans.verkuil@cisco.com>
449 425
450---------------------------- 426----------------------------
451 427
428What: CONFIG_CFG80211_WEXT
429When: as soon as distributions ship new wireless tools, ie. wpa_supplicant 1.0
430 and NetworkManager/connman/etc. that are able to use nl80211
431Why: Wireless extensions are deprecated, and userland tools are moving to
432 using nl80211. New drivers are no longer using wireless extensions,
433 and while there might still be old drivers, both new drivers and new
434 userland no longer needs them and they can't be used for an feature
435 developed in the past couple of years. As such, compatibility with
436 wireless extensions in new drivers will be removed.
437Who: Johannes Berg <johannes@sipsolutions.net>
438
439----------------------------
440
452What: g_file_storage driver 441What: g_file_storage driver
453When: 3.8 442When: 3.8
454Why: This driver has been superseded by g_mass_storage. 443Why: This driver has been superseded by g_mass_storage.
@@ -589,6 +578,13 @@ Why: Remount currently allows changing bound subsystems and
589 578
590---------------------------- 579----------------------------
591 580
581What: xt_recent rev 0
582When: 2013
583Who: Pablo Neira Ayuso <pablo@netfilter.org>
584Files: net/netfilter/xt_recent.c
585
586----------------------------
587
592What: KVM debugfs statistics 588What: KVM debugfs statistics
593When: 2013 589When: 2013
594Why: KVM tracepoints provide mostly equivalent information in a much more 590Why: KVM tracepoints provide mostly equivalent information in a much more
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 75a592365af..8f3ae4a6147 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -211,6 +211,11 @@ The debug output can be changed at runtime using the file
211 211
212will enable debug messages for when routes change. 212will enable debug messages for when routes change.
213 213
214Counters for different types of packets entering and leaving the
215batman-adv module are available through ethtool:
216
217# ethtool --statistics bat0
218
214 219
215BATCTL 220BATCTL
216------ 221------
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index bfea8a33890..6b1c7110534 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -1210,7 +1210,7 @@ options, you may wish to use the "max_bonds" module parameter,
1210documented above. 1210documented above.
1211 1211
1212 To create multiple bonding devices with differing options, it is 1212 To create multiple bonding devices with differing options, it is
1213preferrable to use bonding parameters exported by sysfs, documented in the 1213preferable to use bonding parameters exported by sysfs, documented in the
1214section below. 1214section below.
1215 1215
1216 For versions of bonding without sysfs support, the only means to 1216 For versions of bonding without sysfs support, the only means to
@@ -1950,7 +1950,7 @@ access to fail over to. Additionally, the bonding load balance modes
1950support link monitoring of their members, so if individual links fail, 1950support link monitoring of their members, so if individual links fail,
1951the load will be rebalanced across the remaining devices. 1951the load will be rebalanced across the remaining devices.
1952 1952
1953 See Section 13, "Configuring Bonding for Maximum Throughput" 1953 See Section 12, "Configuring Bonding for Maximum Throughput"
1954for information on configuring bonding with one peer device. 1954for information on configuring bonding with one peer device.
1955 1955
195611.2 High Availability in a Multiple Switch Topology 195611.2 High Availability in a Multiple Switch Topology
@@ -2620,7 +2620,7 @@ be found at:
2620 2620
2621https://lists.sourceforge.net/lists/listinfo/bonding-devel 2621https://lists.sourceforge.net/lists/listinfo/bonding-devel
2622 2622
2623 Discussions regarding the developpement of the bonding driver take place 2623 Discussions regarding the development of the bonding driver take place
2624on the main Linux network mailing list, hosted at vger.kernel.org. The list 2624on the main Linux network mailing list, hosted at vger.kernel.org. The list
2625address is: 2625address is:
2626 2626
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt
index a7ba5e4e2c9..a27cb6214ed 100644
--- a/Documentation/networking/bridge.txt
+++ b/Documentation/networking/bridge.txt
@@ -1,7 +1,14 @@
1In order to use the Ethernet bridging functionality, you'll need the 1In order to use the Ethernet bridging functionality, you'll need the
2userspace tools. These programs and documentation are available 2userspace tools.
3at http://www.linuxfoundation.org/en/Net:Bridge. The download page is 3
4http://prdownloads.sourceforge.net/bridge. 4Documentation for Linux bridging is on:
5 http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
6
7The bridge-utilities are maintained at:
8 git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
9
10Additionally, the iproute2 utilities can be used to configure
11bridge devices.
5 12
6If you still have questions, don't hesitate to post to the mailing list 13If you still have questions, don't hesitate to post to the mailing list
7(more info https://lists.linux-foundation.org/mailman/listinfo/bridge). 14(more info https://lists.linux-foundation.org/mailman/listinfo/bridge).
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt
index e52fd62bef3..0aa4bd381be 100644
--- a/Documentation/networking/caif/Linux-CAIF.txt
+++ b/Documentation/networking/caif/Linux-CAIF.txt
@@ -19,60 +19,36 @@ and host. Currently, UART and Loopback are available for Linux.
19Architecture: 19Architecture:
20------------ 20------------
21The implementation of CAIF is divided into: 21The implementation of CAIF is divided into:
22* CAIF Socket Layer, Kernel API, and Net Device. 22* CAIF Socket Layer and GPRS IP Interface.
23* CAIF Core Protocol Implementation 23* CAIF Core Protocol Implementation
24* CAIF Link Layer, implemented as NET devices. 24* CAIF Link Layer, implemented as NET devices.
25 25
26 26
27 RTNL 27 RTNL
28 ! 28 !
29 ! +------+ +------+ +------+ 29 ! +------+ +------+
30 ! +------+! +------+! +------+! 30 ! +------+! +------+!
31 ! ! Sock !! !Kernel!! ! Net !! 31 ! ! IP !! !Socket!!
32 ! ! API !+ ! API !+ ! Dev !+ <- CAIF Client APIs 32 +-------> !interf!+ ! API !+ <- CAIF Client APIs
33 ! +------+ +------! +------+ 33 ! +------+ +------!
34 ! ! ! ! 34 ! ! !
35 ! +----------!----------+ 35 ! +-----------+
36 ! +------+ <- CAIF Protocol Implementation 36 ! !
37 +-------> ! CAIF ! 37 ! +------+ <- CAIF Core Protocol
38 ! Core ! 38 ! ! CAIF !
39 +------+ 39 ! ! Core !
40 +--------!--------+ 40 ! +------+
41 ! ! 41 ! +----------!---------+
42 +------+ +-----+ 42 ! ! ! !
43 ! ! ! TTY ! <- Link Layer (Net Devices) 43 ! +------+ +-----+ +------+
44 +------+ +-----+ 44 +--> ! HSI ! ! TTY ! ! USB ! <- Link Layer (Net Devices)
45 45 +------+ +-----+ +------+
46 46
47Using the Kernel API
48----------------------
49The Kernel API is used for accessing CAIF channels from the
50kernel.
51The user of the API has to implement two callbacks for receive
52and control.
53The receive callback gives a CAIF packet as a SKB. The control
54callback will
55notify of channel initialization complete, and flow-on/flow-
56off.
57
58
59 struct caif_device caif_dev = {
60 .caif_config = {
61 .name = "MYDEV"
62 .type = CAIF_CHTY_AT
63 }
64 .receive_cb = my_receive,
65 .control_cb = my_control,
66 };
67 caif_add_device(&caif_dev);
68 caif_transmit(&caif_dev, skb);
69
70See the caif_kernel.h for details about the CAIF kernel API.
71 47
72 48
73I M P L E M E N T A T I O N 49I M P L E M E N T A T I O N
74=========================== 50===========================
75=========================== 51
76 52
77CAIF Core Protocol Layer 53CAIF Core Protocol Layer
78========================================= 54=========================================
@@ -88,17 +64,13 @@ The Core CAIF implementation contains:
88 - Simple implementation of CAIF. 64 - Simple implementation of CAIF.
89 - Layered architecture (a la Streams), each layer in the CAIF 65 - Layered architecture (a la Streams), each layer in the CAIF
90 specification is implemented in a separate c-file. 66 specification is implemented in a separate c-file.
91 - Clients must implement PHY layer to access physical HW
92 with receive and transmit functions.
93 - Clients must call configuration function to add PHY layer. 67 - Clients must call configuration function to add PHY layer.
94 - Clients must implement CAIF layer to consume/produce 68 - Clients must implement CAIF layer to consume/produce
95 CAIF payload with receive and transmit functions. 69 CAIF payload with receive and transmit functions.
96 - Clients must call configuration function to add and connect the 70 - Clients must call configuration function to add and connect the
97 Client layer. 71 Client layer.
98 - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed 72 - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed
99 to the called function (except for framing layers' receive functions 73 to the called function (except for framing layers' receive function)
100 or if a transmit function returns an error, in which case the caller
101 must free the packet).
102 74
103Layered Architecture 75Layered Architecture
104-------------------- 76--------------------
@@ -109,11 +81,6 @@ Implementation. The support functions include:
109 CAIF Packet has functions for creating, destroying and adding content 81 CAIF Packet has functions for creating, destroying and adding content
110 and for adding/extracting header and trailers to protocol packets. 82 and for adding/extracting header and trailers to protocol packets.
111 83
112 - CFLST CAIF list implementation.
113
114 - CFGLUE CAIF Glue. Contains OS Specifics, such as memory
115 allocation, endianness, etc.
116
117The CAIF Protocol implementation contains: 84The CAIF Protocol implementation contains:
118 85
119 - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol 86 - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol
@@ -128,7 +95,7 @@ The CAIF Protocol implementation contains:
128 control and remote shutdown requests. 95 control and remote shutdown requests.
129 96
130 - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual 97 - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual
131 External Interface). This layer encodes/decodes VEI frames. 98 External Interface). This layer encodes/decodes VEI frames.
132 99
133 - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP 100 - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP
134 traffic), encodes/decodes Datagram frames. 101 traffic), encodes/decodes Datagram frames.
@@ -170,7 +137,7 @@ The CAIF Protocol implementation contains:
170 +---------+ +---------+ 137 +---------+ +---------+
171 ! ! 138 ! !
172 +---------+ +---------+ 139 +---------+ +---------+
173 | | | Serial | 140 | | | Serial |
174 | | | CFSERL | 141 | | | CFSERL |
175 +---------+ +---------+ 142 +---------+ +---------+
176 143
@@ -186,24 +153,20 @@ In this layered approach the following "rules" apply.
186 layer->dn->transmit(layer->dn, packet); 153 layer->dn->transmit(layer->dn, packet);
187 154
188 155
189Linux Driver Implementation 156CAIF Socket and IP interface
190=========================== 157===========================
191 158
192Linux GPRS Net Device and CAIF socket are implemented on top of the 159The IP interface and CAIF socket API are implemented on top of the
193CAIF Core protocol. The Net device and CAIF socket have an instance of 160CAIF Core protocol. The IP Interface and CAIF socket have an instance of
194'struct cflayer', just like the CAIF Core protocol stack. 161'struct cflayer', just like the CAIF Core protocol stack.
195Net device and Socket implement the 'receive()' function defined by 162Net device and Socket implement the 'receive()' function defined by
196'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and 163'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and
197receive of packets is handled as by the rest of the layers: the 'dn->transmit()' 164receive of packets is handled as by the rest of the layers: the 'dn->transmit()'
198function is called in order to transmit data. 165function is called in order to transmit data.
199 166
200The layer on top of the CAIF Core implementation is
201sometimes referred to as the "Client layer".
202
203
204Configuration of Link Layer 167Configuration of Link Layer
205--------------------------- 168---------------------------
206The Link Layer is implemented as Linux net devices (struct net_device). 169The Link Layer is implemented as Linux network devices (struct net_device).
207Payload handling and registration is done using standard Linux mechanisms. 170Payload handling and registration is done using standard Linux mechanisms.
208 171
209The CAIF Protocol relies on a loss-less link layer without implementing 172The CAIF Protocol relies on a loss-less link layer without implementing
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index ac295399f0d..820f55344ed 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -22,7 +22,8 @@ This file contains
22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER 22 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
23 4.1.3 RAW socket option CAN_RAW_LOOPBACK 23 4.1.3 RAW socket option CAN_RAW_LOOPBACK
24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS 24 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
25 4.1.5 RAW socket returned message flags 25 4.1.5 RAW socket option CAN_RAW_FD_FRAMES
26 4.1.6 RAW socket returned message flags
26 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) 27 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
27 4.3 connected transport protocols (SOCK_SEQPACKET) 28 4.3 connected transport protocols (SOCK_SEQPACKET)
28 4.4 unconnected transport protocols (SOCK_DGRAM) 29 4.4 unconnected transport protocols (SOCK_DGRAM)
@@ -41,7 +42,8 @@ This file contains
41 6.5.1 Netlink interface to set/get devices properties 42 6.5.1 Netlink interface to set/get devices properties
42 6.5.2 Setting the CAN bit-timing 43 6.5.2 Setting the CAN bit-timing
43 6.5.3 Starting and stopping the CAN network device 44 6.5.3 Starting and stopping the CAN network device
44 6.6 supported CAN hardware 45 6.6 CAN FD (flexible data rate) driver support
46 6.7 supported CAN hardware
45 47
46 7 Socket CAN resources 48 7 Socket CAN resources
47 49
@@ -232,16 +234,16 @@ solution for a couple of reasons:
232 arbitration problems and error frames caused by the different 234 arbitration problems and error frames caused by the different
233 ECUs. The occurrence of detected errors are important for diagnosis 235 ECUs. The occurrence of detected errors are important for diagnosis
234 and have to be logged together with the exact timestamp. For this 236 and have to be logged together with the exact timestamp. For this
235 reason the CAN interface driver can generate so called Error Frames 237 reason the CAN interface driver can generate so called Error Message
236 that can optionally be passed to the user application in the same 238 Frames that can optionally be passed to the user application in the
237 way as other CAN frames. Whenever an error on the physical layer 239 same way as other CAN frames. Whenever an error on the physical layer
238 or the MAC layer is detected (e.g. by the CAN controller) the driver 240 or the MAC layer is detected (e.g. by the CAN controller) the driver
239 creates an appropriate error frame. Error frames can be requested by 241 creates an appropriate error message frame. Error messages frames can
240 the user application using the common CAN filter mechanisms. Inside 242 be requested by the user application using the common CAN filter
241 this filter definition the (interested) type of errors may be 243 mechanisms. Inside this filter definition the (interested) type of
242 selected. The reception of error frames is disabled by default. 244 errors may be selected. The reception of error messages is disabled
243 The format of the CAN error frame is briefly described in the Linux 245 by default. The format of the CAN error message frame is briefly
244 header file "include/linux/can/error.h". 246 described in the Linux header file "include/linux/can/error.h".
245 247
2464. How to use Socket CAN 2484. How to use Socket CAN
247------------------------ 249------------------------
@@ -273,7 +275,7 @@ solution for a couple of reasons:
273 275
274 struct can_frame { 276 struct can_frame {
275 canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ 277 canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
276 __u8 can_dlc; /* data length code: 0 .. 8 */ 278 __u8 can_dlc; /* frame payload length in byte (0 .. 8) */
277 __u8 data[8] __attribute__((aligned(8))); 279 __u8 data[8] __attribute__((aligned(8)));
278 }; 280 };
279 281
@@ -375,6 +377,51 @@ solution for a couple of reasons:
375 nbytes = sendto(s, &frame, sizeof(struct can_frame), 377 nbytes = sendto(s, &frame, sizeof(struct can_frame),
376 0, (struct sockaddr*)&addr, sizeof(addr)); 378 0, (struct sockaddr*)&addr, sizeof(addr));
377 379
380 Remark about CAN FD (flexible data rate) support:
381
382 Generally the handling of CAN FD is very similar to the formerly described
383 examples. The new CAN FD capable CAN controllers support two different
384 bitrates for the arbitration phase and the payload phase of the CAN FD frame
385 and up to 64 bytes of payload. This extended payload length breaks all the
386 kernel interfaces (ABI) which heavily rely on the CAN frame with fixed eight
387 bytes of payload (struct can_frame) like the CAN_RAW socket. Therefore e.g.
388 the CAN_RAW socket supports a new socket option CAN_RAW_FD_FRAMES that
389 switches the socket into a mode that allows the handling of CAN FD frames
390 and (legacy) CAN frames simultaneously (see section 4.1.5).
391
392 The struct canfd_frame is defined in include/linux/can.h:
393
394 struct canfd_frame {
395 canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
396 __u8 len; /* frame payload length in byte (0 .. 64) */
397 __u8 flags; /* additional flags for CAN FD */
398 __u8 __res0; /* reserved / padding */
399 __u8 __res1; /* reserved / padding */
400 __u8 data[64] __attribute__((aligned(8)));
401 };
402
403 The struct canfd_frame and the existing struct can_frame have the can_id,
404 the payload length and the payload data at the same offset inside their
405 structures. This allows to handle the different structures very similar.
406 When the content of a struct can_frame is copied into a struct canfd_frame
407 all structure elements can be used as-is - only the data[] becomes extended.
408
409 When introducing the struct canfd_frame it turned out that the data length
410 code (DLC) of the struct can_frame was used as a length information as the
411 length and the DLC has a 1:1 mapping in the range of 0 .. 8. To preserve
412 the easy handling of the length information the canfd_frame.len element
413 contains a plain length value from 0 .. 64. So both canfd_frame.len and
414 can_frame.can_dlc are equal and contain a length information and no DLC.
415 For details about the distinction of CAN and CAN FD capable devices and
416 the mapping to the bus-relevant data length code (DLC), see chapter 6.6.
417
418 The length of the two CAN(FD) frame structures define the maximum transfer
419 unit (MTU) of the CAN(FD) network interface and skbuff data length. Two
420 definitions are specified for CAN specific MTUs in include/linux/can.h :
421
422 #define CAN_MTU (sizeof(struct can_frame)) == 16 => 'legacy' CAN frame
423 #define CANFD_MTU (sizeof(struct canfd_frame)) == 72 => CAN FD frame
424
378 4.1 RAW protocol sockets with can_filters (SOCK_RAW) 425 4.1 RAW protocol sockets with can_filters (SOCK_RAW)
379 426
380 Using CAN_RAW sockets is extensively comparable to the commonly 427 Using CAN_RAW sockets is extensively comparable to the commonly
@@ -383,7 +430,7 @@ solution for a couple of reasons:
383 defaults are set at RAW socket binding time: 430 defaults are set at RAW socket binding time:
384 431
385 - The filters are set to exactly one filter receiving everything 432 - The filters are set to exactly one filter receiving everything
386 - The socket only receives valid data frames (=> no error frames) 433 - The socket only receives valid data frames (=> no error message frames)
387 - The loopback of sent CAN frames is enabled (see chapter 3.2) 434 - The loopback of sent CAN frames is enabled (see chapter 3.2)
388 - The socket does not receive its own sent frames (in loopback mode) 435 - The socket does not receive its own sent frames (in loopback mode)
389 436
@@ -434,7 +481,7 @@ solution for a couple of reasons:
434 4.1.2 RAW socket option CAN_RAW_ERR_FILTER 481 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
435 482
436 As described in chapter 3.4 the CAN interface driver can generate so 483 As described in chapter 3.4 the CAN interface driver can generate so
437 called Error Frames that can optionally be passed to the user 484 called Error Message Frames that can optionally be passed to the user
438 application in the same way as other CAN frames. The possible 485 application in the same way as other CAN frames. The possible
439 errors are divided into different error classes that may be filtered 486 errors are divided into different error classes that may be filtered
440 using the appropriate error mask. To register for every possible 487 using the appropriate error mask. To register for every possible
@@ -472,7 +519,69 @@ solution for a couple of reasons:
472 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, 519 setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
473 &recv_own_msgs, sizeof(recv_own_msgs)); 520 &recv_own_msgs, sizeof(recv_own_msgs));
474 521
475 4.1.5 RAW socket returned message flags 522 4.1.5 RAW socket option CAN_RAW_FD_FRAMES
523
524 CAN FD support in CAN_RAW sockets can be enabled with a new socket option
525 CAN_RAW_FD_FRAMES which is off by default. When the new socket option is
526 not supported by the CAN_RAW socket (e.g. on older kernels), switching the
527 CAN_RAW_FD_FRAMES option returns the error -ENOPROTOOPT.
528
529 Once CAN_RAW_FD_FRAMES is enabled the application can send both CAN frames
530 and CAN FD frames. OTOH the application has to handle CAN and CAN FD frames
531 when reading from the socket.
532
533 CAN_RAW_FD_FRAMES enabled: CAN_MTU and CANFD_MTU are allowed
534 CAN_RAW_FD_FRAMES disabled: only CAN_MTU is allowed (default)
535
536 Example:
537 [ remember: CANFD_MTU == sizeof(struct canfd_frame) ]
538
539 struct canfd_frame cfd;
540
541 nbytes = read(s, &cfd, CANFD_MTU);
542
543 if (nbytes == CANFD_MTU) {
544 printf("got CAN FD frame with length %d\n", cfd.len);
545 /* cfd.flags contains valid data */
546 } else if (nbytes == CAN_MTU) {
547 printf("got legacy CAN frame with length %d\n", cfd.len);
548 /* cfd.flags is undefined */
549 } else {
550 fprintf(stderr, "read: invalid CAN(FD) frame\n");
551 return 1;
552 }
553
554 /* the content can be handled independently from the received MTU size */
555
556 printf("can_id: %X data length: %d data: ", cfd.can_id, cfd.len);
557 for (i = 0; i < cfd.len; i++)
558 printf("%02X ", cfd.data[i]);
559
560 When reading with size CANFD_MTU only returns CAN_MTU bytes that have
561 been received from the socket a legacy CAN frame has been read into the
562 provided CAN FD structure. Note that the canfd_frame.flags data field is
563 not specified in the struct can_frame and therefore it is only valid in
564 CANFD_MTU sized CAN FD frames.
565
566 As long as the payload length is <=8 the received CAN frames from CAN FD
567 capable CAN devices can be received and read by legacy sockets too. When
568 user-generated CAN FD frames have a payload length <=8 these can be send
569 by legacy CAN network interfaces too. Sending CAN FD frames with payload
570 length > 8 to a legacy CAN network interface returns an -EMSGSIZE error.
571
572 Implementation hint for new CAN applications:
573
574 To build a CAN FD aware application use struct canfd_frame as basic CAN
575 data structure for CAN_RAW based applications. When the application is
576 executed on an older Linux kernel and switching the CAN_RAW_FD_FRAMES
577 socket option returns an error: No problem. You'll get legacy CAN frames
578 or CAN FD frames and can process them the same way.
579
580 When sending to CAN devices make sure that the device is capable to handle
581 CAN FD frames by checking if the device maximum transfer unit is CANFD_MTU.
582 The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall.
583
584 4.1.6 RAW socket returned message flags
476 585
477 When using recvmsg() call, the msg->msg_flags may contain following flags: 586 When using recvmsg() call, the msg->msg_flags may contain following flags:
478 587
@@ -527,7 +636,7 @@ solution for a couple of reasons:
527 636
528 rcvlist_all - list for unfiltered entries (no filter operations) 637 rcvlist_all - list for unfiltered entries (no filter operations)
529 rcvlist_eff - list for single extended frame (EFF) entries 638 rcvlist_eff - list for single extended frame (EFF) entries
530 rcvlist_err - list for error frames masks 639 rcvlist_err - list for error message frames masks
531 rcvlist_fil - list for mask/value filters 640 rcvlist_fil - list for mask/value filters
532 rcvlist_inv - list for mask/value filters (inverse semantic) 641 rcvlist_inv - list for mask/value filters (inverse semantic)
533 rcvlist_sff - list for single standard frame (SFF) entries 642 rcvlist_sff - list for single standard frame (SFF) entries
@@ -573,10 +682,13 @@ solution for a couple of reasons:
573 dev->type = ARPHRD_CAN; /* the netdevice hardware type */ 682 dev->type = ARPHRD_CAN; /* the netdevice hardware type */
574 dev->flags = IFF_NOARP; /* CAN has no arp */ 683 dev->flags = IFF_NOARP; /* CAN has no arp */
575 684
576 dev->mtu = sizeof(struct can_frame); 685 dev->mtu = CAN_MTU; /* sizeof(struct can_frame) -> legacy CAN interface */
577 686
578 The struct can_frame is the payload of each socket buffer in the 687 or alternative, when the controller supports CAN with flexible data rate:
579 protocol family PF_CAN. 688 dev->mtu = CANFD_MTU; /* sizeof(struct canfd_frame) -> CAN FD interface */
689
690 The struct can_frame or struct canfd_frame is the payload of each socket
691 buffer (skbuff) in the protocol family PF_CAN.
580 692
581 6.2 local loopback of sent frames 693 6.2 local loopback of sent frames
582 694
@@ -784,15 +896,41 @@ solution for a couple of reasons:
784 $ ip link set canX type can restart-ms 100 896 $ ip link set canX type can restart-ms 100
785 897
786 Alternatively, the application may realize the "bus-off" condition 898 Alternatively, the application may realize the "bus-off" condition
787 by monitoring CAN error frames and do a restart when appropriate with 899 by monitoring CAN error message frames and do a restart when
788 the command: 900 appropriate with the command:
789 901
790 $ ip link set canX type can restart 902 $ ip link set canX type can restart
791 903
792 Note that a restart will also create a CAN error frame (see also 904 Note that a restart will also create a CAN error message frame (see
793 chapter 3.4). 905 also chapter 3.4).
906
907 6.6 CAN FD (flexible data rate) driver support
908
909 CAN FD capable CAN controllers support two different bitrates for the
910 arbitration phase and the payload phase of the CAN FD frame. Therefore a
911 second bittiming has to be specified in order to enable the CAN FD bitrate.
912
913 Additionally CAN FD capable CAN controllers support up to 64 bytes of
914 payload. The representation of this length in can_frame.can_dlc and
915 canfd_frame.len for userspace applications and inside the Linux network
916 layer is a plain value from 0 .. 64 instead of the CAN 'data length code'.
917 The data length code was a 1:1 mapping to the payload length in the legacy
918 CAN frames anyway. The payload length to the bus-relevant DLC mapping is
919 only performed inside the CAN drivers, preferably with the helper
920 functions can_dlc2len() and can_len2dlc().
921
922 The CAN netdevice driver capabilities can be distinguished by the network
923 devices maximum transfer unit (MTU):
924
925 MTU = 16 (CAN_MTU) => sizeof(struct can_frame) => 'legacy' CAN device
926 MTU = 72 (CANFD_MTU) => sizeof(struct canfd_frame) => CAN FD capable device
927
928 The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall.
929 N.B. CAN FD capable devices can also handle and send legacy CAN frames.
930
931 FIXME: Add details about the CAN FD controller configuration when available.
794 932
795 6.6 Supported CAN hardware 933 6.7 Supported CAN hardware
796 934
797 Please check the "Kconfig" file in "drivers/net/can" to get an actual 935 Please check the "Kconfig" file in "drivers/net/can" to get an actual
798 list of the support CAN hardware. On the Socket CAN project website 936 list of the support CAN hardware. On the Socket CAN project website
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 6f896b94abd..406a5226220 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -468,6 +468,19 @@ tcp_syncookies - BOOLEAN
468 SYN flood warnings in logs not being really flooded, your server 468 SYN flood warnings in logs not being really flooded, your server
469 is seriously misconfigured. 469 is seriously misconfigured.
470 470
471tcp_fastopen - INTEGER
472 Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data
473 in the opening SYN packet. To use this feature, the client application
474 must not use connect(). Instead, it should use sendmsg() or sendto()
475 with MSG_FASTOPEN flag which performs a TCP handshake automatically.
476
477 The values (bitmap) are:
478 1: Enables sending data in the opening SYN on the client
479 5: Enables sending data in the opening SYN on the client regardless
480 of cookie availability.
481
482 Default: 0
483
471tcp_syn_retries - INTEGER 484tcp_syn_retries - INTEGER
472 Number of times initial SYNs for an active TCP connection attempt 485 Number of times initial SYNs for an active TCP connection attempt
473 will be retransmitted. Should not be higher than 255. Default value 486 will be retransmitted. Should not be higher than 255. Default value
@@ -551,6 +564,25 @@ tcp_thin_dupack - BOOLEAN
551 Documentation/networking/tcp-thin.txt 564 Documentation/networking/tcp-thin.txt
552 Default: 0 565 Default: 0
553 566
567tcp_limit_output_bytes - INTEGER
568 Controls TCP Small Queue limit per tcp socket.
569 TCP bulk sender tends to increase packets in flight until it
570 gets losses notifications. With SNDBUF autotuning, this can
571 result in a large amount of packets queued in qdisc/device
572 on the local machine, hurting latency of other flows, for
573 typical pfifo_fast qdiscs.
574 tcp_limit_output_bytes limits the number of bytes on qdisc
575 or device to reduce artificial RTT/cwnd and reduce bufferbloat.
576 Note: For GSO/TSO enabled flows, we try to have at least two
577 packets in flight. Reducing tcp_limit_output_bytes might also
578 reduce the size of individual GSO packet (64KB being the max)
579 Default: 131072
580
581tcp_challenge_ack_limit - INTEGER
582 Limits number of Challenge ACK sent per second, as recommended
583 in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks)
584 Default: 100
585
554UDP variables: 586UDP variables:
555 587
556udp_mem - vector of 3 INTEGERs: min, pressure, max 588udp_mem - vector of 3 INTEGERs: min, pressure, max
@@ -857,9 +889,19 @@ accept_source_route - BOOLEAN
857 FALSE (host) 889 FALSE (host)
858 890
859accept_local - BOOLEAN 891accept_local - BOOLEAN
860 Accept packets with local source addresses. In combination with 892 Accept packets with local source addresses. In combination
861 suitable routing, this can be used to direct packets between two 893 with suitable routing, this can be used to direct packets
862 local interfaces over the wire and have them accepted properly. 894 between two local interfaces over the wire and have them
895 accepted properly.
896
897 rp_filter must be set to a non-zero value in order for
898 accept_local to have an effect.
899
900 default FALSE
901
902route_localnet - BOOLEAN
903 Do not consider loopback addresses as martian source or destination
904 while routing. This enables the use of 127/8 for local routing purposes.
863 default FALSE 905 default FALSE
864 906
865rp_filter - INTEGER 907rp_filter - INTEGER
@@ -1398,6 +1440,20 @@ path_max_retrans - INTEGER
1398 1440
1399 Default: 5 1441 Default: 5
1400 1442
1443pf_retrans - INTEGER
1444 The number of retransmissions that will be attempted on a given path
1445 before traffic is redirected to an alternate transport (should one
1446 exist). Note this is distinct from path_max_retrans, as a path that
1447 passes the pf_retrans threshold can still be used. Its only
1448 deprioritized when a transmission path is selected by the stack. This
1449 setting is primarily used to enable fast failover mechanisms without
1450 having to reduce path_max_retrans to a very low value. See:
1451 http://www.ietf.org/id/draft-nishida-tsvwg-sctp-failover-05.txt
1452 for details. Note also that a value of pf_retrans > path_max_retrans
1453 disables this feature
1454
1455 Default: 0
1456
1401rto_initial - INTEGER 1457rto_initial - INTEGER
1402 The initial round trip timeout value in milliseconds that will be used 1458 The initial round trip timeout value in milliseconds that will be used
1403 in calculating round trip times. This is the initial time interval 1459 in calculating round trip times. This is the initial time interval
diff --git a/Documentation/networking/openvswitch.txt b/Documentation/networking/openvswitch.txt
index b8a048b8df3..8fa2dd1e792 100644
--- a/Documentation/networking/openvswitch.txt
+++ b/Documentation/networking/openvswitch.txt
@@ -118,7 +118,7 @@ essentially like this, ignoring metadata:
118Naively, to add VLAN support, it makes sense to add a new "vlan" flow 118Naively, to add VLAN support, it makes sense to add a new "vlan" flow
119key attribute to contain the VLAN tag, then continue to decode the 119key attribute to contain the VLAN tag, then continue to decode the
120encapsulated headers beyond the VLAN tag using the existing field 120encapsulated headers beyond the VLAN tag using the existing field
121definitions. With this change, an TCP packet in VLAN 10 would have a 121definitions. With this change, a TCP packet in VLAN 10 would have a
122flow key much like this: 122flow key much like this:
123 123
124 eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...) 124 eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...)
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index 4be0c039edb..d2a9f43b554 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -136,16 +136,6 @@ For more information, please review the AMD8131 errata at
136http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/ 136http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
13726310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf 13726310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf
138 138
1396. Available Downloads 1396. Support
140Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up
141to date, also the latest "s2io" code (including support for 2.4 kernels) is
142available via "Support" link on the Neterion site: http://www.neterion.com.
143
144For Xframe User Guide (Programming manual), visit ftp site ns1.s2io.com,
145user: linuxdocs password: HALdocs
146
1477. Support
148For further support please contact either your 10GbE Xframe NIC vendor (IBM, 140For further support please contact either your 10GbE Xframe NIC vendor (IBM,
149HP, SGI etc.) or click on the "Support" link on the Neterion site: 141HP, SGI etc.)
150http://www.neterion.com.
151
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index 5cb9a197246..c676b9cedbd 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -257,9 +257,11 @@ reset procedure etc).
257 o Makefile 257 o Makefile
258 o stmmac_main.c: main network device driver; 258 o stmmac_main.c: main network device driver;
259 o stmmac_mdio.c: mdio functions; 259 o stmmac_mdio.c: mdio functions;
260 o stmmac_pci: PCI driver;
261 o stmmac_platform.c: platform driver
260 o stmmac_ethtool.c: ethtool support; 262 o stmmac_ethtool.c: ethtool support;
261 o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts 263 o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts
262 Only tested on ST40 platforms based. 264 (only tested on ST40 platforms based);
263 o stmmac.h: private driver structure; 265 o stmmac.h: private driver structure;
264 o common.h: common definitions and VFTs; 266 o common.h: common definitions and VFTs;
265 o descs.h: descriptor structure definitions; 267 o descs.h: descriptor structure definitions;
@@ -269,9 +271,11 @@ reset procedure etc).
269 o dwmac100_core: MAC 100 core and dma code; 271 o dwmac100_core: MAC 100 core and dma code;
270 o dwmac100_dma.c: dma funtions for the MAC chip; 272 o dwmac100_dma.c: dma funtions for the MAC chip;
271 o dwmac1000.h: specific header file for the MAC; 273 o dwmac1000.h: specific header file for the MAC;
272 o dwmac_lib.c: generic DMA functions shared among chips 274 o dwmac_lib.c: generic DMA functions shared among chips;
273 o enh_desc.c: functions for handling enhanced descriptors 275 o enh_desc.c: functions for handling enhanced descriptors;
274 o norm_desc.c: functions for handling normal descriptors 276 o norm_desc.c: functions for handling normal descriptors;
277 o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes;
278 o mmc_core.c/mmc.h: Management MAC Counters;
275 279
2765) Debug Information 2805) Debug Information
277 281
@@ -304,7 +308,27 @@ All these are only useful during the developing stage
304and should never enabled inside the code for general usage. 308and should never enabled inside the code for general usage.
305In fact, these can generate an huge amount of debug messages. 309In fact, these can generate an huge amount of debug messages.
306 310
3076) TODO: 3116) Energy Efficient Ethernet
312
313Energy Efficient Ethernet(EEE) enables IEEE 802.3 MAC sublayer along
314with a family of Physical layer to operate in the Low power Idle(LPI)
315mode. The EEE mode supports the IEEE 802.3 MAC operation at 100Mbps,
3161000Mbps & 10Gbps.
317
318The LPI mode allows power saving by switching off parts of the
319communication device functionality when there is no data to be
320transmitted & received. The system on both the side of the link can
321disable some functionalities & save power during the period of low-link
322utilization. The MAC controls whether the system should enter or exit
323the LPI mode & communicate this to PHY.
324
325As soon as the interface is opened, the driver verifies if the EEE can
326be supported. This is done by looking at both the DMA HW capability
327register and the PHY devices MCD registers.
328To enter in Tx LPI mode the driver needs to have a software timer
329that enable and disable the LPI mode when there is nothing to be
330transmitted.
331
3327) TODO:
308 o XGMAC is not supported. 333 o XGMAC is not supported.
309 o Add the EEE - Energy Efficient Ethernet
310 o Add the PTP - precision time protocol 334 o Add the PTP - precision time protocol
diff --git a/Documentation/networking/vxge.txt b/Documentation/networking/vxge.txt
index d2e2997e6fa..bb76c667a47 100644
--- a/Documentation/networking/vxge.txt
+++ b/Documentation/networking/vxge.txt
@@ -91,10 +91,3 @@ v) addr_learn_en
91 virtualization environment. 91 virtualization environment.
92 Valid range: 0,1 (disabled, enabled respectively) 92 Valid range: 0,1 (disabled, enabled respectively)
93 Default: 0 93 Default: 0
94
954) Troubleshooting:
96-------------------
97
98To resolve an issue with the source code or X3100 series adapter, please collect
99the statistics, register dumps using ethool, relevant logs and email them to
100support@neterion.com.
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt
index 320f9336c78..89a339c9b07 100644
--- a/Documentation/nfc/nfc-hci.txt
+++ b/Documentation/nfc/nfc-hci.txt
@@ -178,3 +178,36 @@ ANY_GET_PARAMETER to the reader A gate to get information on the target
178that was discovered). 178that was discovered).
179 179
180Typically, such an event will be propagated to NFC Core from MSGRXWQ context. 180Typically, such an event will be propagated to NFC Core from MSGRXWQ context.
181
182Error management
183----------------
184
185Errors that occur synchronously with the execution of an NFC Core request are
186simply returned as the execution result of the request. These are easy.
187
188Errors that occur asynchronously (e.g. in a background protocol handling thread)
189must be reported such that upper layers don't stay ignorant that something
190went wrong below and know that expected events will probably never happen.
191Handling of these errors is done as follows:
192
193- driver (pn544) fails to deliver an incoming frame: it stores the error such
194that any subsequent call to the driver will result in this error. Then it calls
195the standard nfc_shdlc_recv_frame() with a NULL argument to report the problem
196above. shdlc stores a EREMOTEIO sticky status, which will trigger SMW to
197report above in turn.
198
199- SMW is basically a background thread to handle incoming and outgoing shdlc
200frames. This thread will also check the shdlc sticky status and report to HCI
201when it discovers it is not able to run anymore because of an unrecoverable
202error that happened within shdlc or below. If the problem occurs during shdlc
203connection, the error is reported through the connect completion.
204
205- HCI: if an internal HCI error happens (frame is lost), or HCI is reported an
206error from a lower layer, HCI will either complete the currently executing
207command with that error, or notify NFC Core directly if no command is executing.
208
209- NFC Core: when NFC Core is notified of an error from below and polling is
210active, it will send a tag discovered event with an empty tag list to the user
211space to let it know that the poll operation will never be able to detect a tag.
212If polling is not active and the error was sticky, lower levels will return it
213at next invocation.