summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ieee802154/dgram: Pass source address in dgram_recvmsgStephen Röttger2013-03-271-0/+10
| | | | | | | | | | | | | This patch lets dgram_recvmsg fill in the sockaddr struct in msg->msg_name with the source address of the packet. This is used by the userland functions recvmsg and recvfrom to get the senders address. [Stefan: Changed from old zigbee legacy tree to mainline] Signed-off-by: Stephen Röttger <stephen.roettger@zero-entropy.de> Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* VXLAN: Fix sparse warnings.Pravin B Shelar2013-03-271-5/+4
| | | | | | | | | | | | Fixes following warning:- drivers/net/vxlan.c:471:35: warning: symbol 'dev' shadows an earlier one drivers/net/vxlan.c:433:26: originally declared here drivers/net/vxlan.c:794:34: warning: symbol 'vxlan' shadows an earlier one drivers/net/vxlan.c:757:26: originally declared here CC: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* MAINTAINERS: Update qlge maintainers listShahed Shaikh2013-03-261-0/+1
| | | | | | | Add myself to qlge maintainers list. Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fec: TX Buffer incorrectly initializedJim Baxter2013-03-261-1/+1
| | | | | | | | | The TX Buffer in fec_enet_alloc_buffers was being initialized with the receive register define BD_ENET_RX_INT instead of the transmit register define BD_ENET_TX_INT Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'stmmac'David S. Miller2013-03-2621-391/+2019
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Giuseppe CAVALLARO says: ==================== These patches enhance the driver adding the PTP support and the initial code for RGMII/SGMII/TBI/RTBI modes. Also this patches review the driver removing some Koption for selecting between chain and ring modes. REally useful to validate the driver also at build time. Before adding PTP, the extended descriptor support has been added because it is mandatory to save HW timestamp in new dedicated descriptors. Also in this case no Koption added. Concerning the PTP, I have hacked/reviewed and tested many part of these patches also verifying the back compatibility on several HW and chips. Concerning the SGMII/RGMII we have already discussed about the support in the net.dev Mailing list with Byungho where these patchs were partially analysed. So I have only ported them against the latest net-next (and on top of PTP). I have added some missing things: e.g. some parts of the ethtool for ANE. As we clarified with Byungho, we will add further enhancements on top of these patches if needed. I have also built all against ARM/SH/X68 platforms and no issues on ST-Boxes. Thx goes to Rayagond that wrote and tested the PTP and to Byungho for SGMII. V2: This Version 2 has the fixes discussed in the ML, for example: o completely remove the Koption... all the decisions are made at probe time o review the PTP patches and better organize them just in two patches o added all the fixes provided by Richard on PTP and CLK driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: update the Doc and Version (PTP+SGMII)Giuseppe CAVALLARO2013-03-262-3/+32
| | | | | | | | | | | | | | | | | | | | This patch updates the stmmac.txt file adding information related to the PTP and SGMII/RGMII supports. Also the patch updates the driver version to: March_2013. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: add the support for PTP hw clock driverRayagond Kokatanur2013-03-268-10/+294
| | | | | | | | | | | | | | | | | | | | | | | | This patch implements PHC (ptp hardware clock) driver for stmmac driver to support 1588 PTP. V2: added support for FINE method, reduced loop delay and review spinlock. Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com> Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: add IEEE PTPv1 and PTPv2 support.Rayagond Kokatanur2013-03-2611-24/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enhances the stmmac driver to support IEEE 1588-2002 PTP (Precision Time Protocol) version 1 and IEEE 1588-2008 PPT version 2. Precision Time Protocol(PTP),which enables precise synchronization of clocks in measurement and control systems implemented with technologies such as network communication,local computing, & distributed objects. Both PTPv1 and PTPv2 is selected at run-time using the HW capability register. The PTPv1 TimeStamp support can be used on chips that have the normal descriptor structures and PTPv2 TimeStamp support can be used on chips that have the Extended descriptors(DES4-5-6-7). All such sanity checks are done and verified by using HW capability register. V2: in this version the ethtool support has been included in this patch; Koptions have been completely removed (previously added to select PTP and PTPv2). PTPv1 and PTPv2 is now added in a single patch instead of two patches. get_timestamp() and get_systemtime() L/H have been combined into single APIs. Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: add tx_skbuff_dma to save descriptors used by PTPRayagond Kokatanur2013-03-264-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new pointer variable called "tx_skbuff_dma" to private data structure. This variable will holds the physical address of packet to be transmitted & same will be used to free/unmap the memory once the corresponding packet is transmitted by device. Prior to this patch the descriptor buffer pointer(ie des2) itself was being used for freeing/unmapping the buffer memory. But in case PTP v1 with normal descriptor the field(des2) will be overwritten by device with timestamp value, hence driver will loose the buffer pointer to be freed/unmapped. Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: initial support to manage pcs modesGiuseppe CAVALLARO2013-03-266-15/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the minimal support to manage the PCS modes (RGMII/SGMII) and restart the ANE. Both TBI and RTBI are not yet supported. Thanks to Byungho that wrote some part of this code and tested SGMII too. The only thing to be fixed is the get/set pause in ethtool. Signed-off-by: Byungho An <bh74.an@samsung.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: start adding pcs and rgmii core irqGiuseppe CAVALLARO2013-03-266-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | This patch starts adding in the main ISR the management of the PCS and RGMII/SGMII core interrupts. This is to help further development on this area. Currently the core irq handler only clears the PCS and S-R_MII interrupts and reports the event in the ethtool stats. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by: Byungho An <bh74.an@samsung.com> Cc: Udit Kumar <udit-dlh.kumar@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: support extend descriptorsGiuseppe CAVALLARO2013-03-2611-218/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is to support the extend descriptors available in the chips newer than the 3.50. In case of the extend descriptors cannot be supported, at runtime, the driver will continue to work using the old style. In detail, this support extends the main descriptor structure adding new descriptors: 4, 5, 6, 7. The desc4 gives us extra information about the received ethernet payload when it is carrying PTP packets or TCP/UDP/ICMP over IP packets. The descriptors 6 and 7 are used for saving HW L/H timestamps (PTP). V2: this new version removes the Koption added in the first implementation because all the checks now to verify if the extended descriptors are actually supported happen at probe time. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: reorganize chain/ring modes removing KoptionsGiuseppe CAVALLARO2013-03-2610-137/+169
|/ | | | | | | | | | | | | | Previously we had two Koptions to decide if the stmmac had to use either a ring or a chain to manage its descriptors. This patch removes the Kernel configuration options and it allow us to use the chain mode by passing a module option. Ring mode continues to be the default. Also with this patch, it will be easier to validate the driver built and guarantee that all the two modes always compile fine. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: cleanup unneeded rcu_read_lock()Veaceslav Falico2013-03-261-2/+1
| | | | | | | | | bond_resend_igmp_join_requests_delayed() calls _resend_igmp_join_requests() under rcu_read_lock(), while it gets its own rcu_read_lock() for the whole function. Remove the lock from the _delayed function. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* MAINTAINERS: add netdev list for PTP (IEEE 1588)Jiri Benc2013-03-261-0/+1
| | | | | Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ptp_pch: fix typo in module parameter descriptionJiri Benc2013-03-261-1/+1
| | | | | Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: wireless: iwlegacy: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han2013-03-261-2/+2
| | | | | | | | | | | | | Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/net/wireless/iwlegacy/common.c:4894:1: warning: 'il_pci_suspend' defined but not used [-Wunused-function] drivers/net/wireless/iwlegacy/common.c:4912:1: warning: 'il_pci_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: atheros: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han2013-03-261-1/+1
| | | | | | | | | | | | Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/net/ethernet/atheros/atlx/atl1.c:2861:12: warning: 'atl1_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: wiznet: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han2013-03-262-4/+4
| | | | | | | | | | | | | | | Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/net/ethernet/wiznet/w5100.c:758:12: warning: 'w5100_suspend' defined but not used [-Wunused-function] drivers/net/ethernet/wiznet/w5100.c:773:12: warning: 'w5100_resume' defined but not used [-Wunused-function] drivers/net/ethernet/wiznet/w5300.c:670:12: warning: 'w5300_suspend' defined but not used [-Wunused-function] drivers/net/ethernet/wiznet/w5300.c:685:12: warning: 'w5300_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'transport-header'David S. Miller2013-03-265-1/+59
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jason Wang says: ==================== We don't set transport header for untrusted packets in the past, but for the follwoing reasons, we need to do it now. - Better packet length estimation (introduced in 1def9238) needs l4 header for gso packets to compute the header length. - Some driver needs l4 header (e.g. ixgbe needs tcp header to do atr). So this patches tries to set transport header for packets from untrusted source (netback, packet, tuntap, macvtap). Plus a fix for better estimation on packet length for DODGY packet. Tested on tun/macvtap/packet, compile test on netback. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net_sched: better precise estimation on packet length for untrusted packetsJason Wang2013-03-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | gso_segs were reset to zero when kernel receive packets from untrusted source. But we use this zero value to estimate precise packet len which is wrong. So this patch tries to estimate the correct gso_segs value before using it in qdisc_pkt_len_init(). Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netback: set transport header before passing it to kernelJason Wang2013-03-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, for the packets receives from netback, before doing header check, kernel just reset the transport header in netif_receive_skb() which pretends non l4 header. This is suboptimal for precise packet length estimation (introduced in 1def9238: net_sched: more precise pkt_len computation) which needs correct l4 header for gso packets. The patch just reuse the header probed by netback for partial checksum packets and tries to use skb_flow_dissect() for other cases, if both fail, just pretend no l4 header. Cc: Eric Dumazet <edumazet@google.com> Cc: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * packet: set transport header before doing xmitJason Wang2013-03-261-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Set the transport header for 1) some drivers (e.g ixgbe needs l4 header to do atr) 2) precise packet length estimation (introduced in 1def9238) needs l4 header to compute header length. So this patch first tries to get l4 header for packet socket through skb_flow_dissect(), and pretend no l4 header if skb_flow_dissect() fails. Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tuntap: set transport header before passing it to kernelJason Wang2013-03-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, for the packets receives from tuntap, before doing header check, kernel just reset the transport header in netif_receive_skb() which pretends no l4 header. This is suboptimal for precise packet length estimation (introduced in 1def9238) which needs correct l4 header for gso packets. So this patch set the transport header to csum_start for partial checksum packets, otherwise it first try skb_flow_dissect(), if it fails, just reset the transport header. Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * macvtap: set transport header before passing skb to lower deviceJason Wang2013-03-261-0/+9
|/ | | | | | | | | | | | | | Set the transport header for 1) some drivers (e.g ixgbe) needs l4 header 2) precise packet length estimation (introduced in 1def9238) needs l4 header to compute header length. For the packets with partial checksum, the patch just set the transport header to csum_start. Otherwise tries to use skb_flow_dissect() to get l4 offset, if it fails, just pretend no l4 header. Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: remove duplicated NLMSG_ALIGNHong zhi guo2013-03-261-1/+1
| | | | | | | | | | | NLMSG_HDRLEN is already aligned value. It's for directly reference without extra alignment. The redundant alignment here may confuse the API users. Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch '6lowpan'David S. Miller2013-03-266-30/+128
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tony Cheneau says: ==================== This patchset fixes serious bugs within the 6LoWPAN modules. I wrote a script (available at [1]) to prove the issues are real. One can try and see that without these patches, most of the test fail (e.g. packet dropped by the receiver or node crashing). With all patches applied, all tests succeed. The tests themselves are very basic: sending ICMP packets, sending UDP packets, sending TCP packets, varying size of the packets. This actually triggers some 6LoWPAN specific code, namely fragmentation, packet reassembly and header compression. This code passed the checkpatch.pl tool with a few warnings, that I believe are OK. It should apply cleanly on the latest net-next. [1]: https://github.com/tcheneau/linux802154-regression-tests ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: modify udp compression/uncompression to match the standardTony Cheneau2013-03-261-3/+36
| | | | | | | | | | | | | | | | The previous code would just compress the UDP header and send the compressed UDP header along with the uncompressed one. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: use the PANID provided by the device instead of a static valueTony Cheneau2013-03-261-2/+4
| | | | | | | | | | Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: obtain IEEE802.15.4 sequence number from the MAC layerTony Cheneau2013-03-261-0/+8
| | | | | | | | | | | | | | | | Sets the sequence number in the frame format. Without this fix, the sequence number is always set to 0. This makes trafic analysis very hard. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac802154: add mac802154_dev_get_dsn()Tony Cheneau2013-03-263-0/+11
| | | | | | | | | | | | | | | | | | | | Bring-over mac802154_dev_get_dsn() function that was present in the Linux ZigBee kernel. This function is called by the 6LoWPAN code in order to properly set the DSN (Data Sequence Number) value in the IEEE 802.15.4 frame. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: store fragment tag values per device instead of net stack wideTony Cheneau2013-03-261-4/+5
| | | | | | | | | | Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: add debug messages for 6LoWPAN fragmentationTony Cheneau2013-03-261-4/+21
| | | | | | | | | | | | | | | | Add pr_debug() call in order to debug 6LoWPAN fragmentation and reassembly. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: fix first fragment (FRAG1) handlingTony Cheneau2013-03-261-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first fragment, FRAG1, must contain some payload according to the specs. However, as it is currently written, the first fragment will remain empty and only contain the 6lowpan headers. This patch also extracts the transport layer information from the first fragment. This information is used later on when uncompressing UDP header. Thanks to Wolf-Bastian Pöttner for noticing that the offset value was not properly initialized. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: use short IEEE 802.15.4 addresses for broadcast destinationTony Cheneau2013-03-261-8/+15
| | | | | | | | | | | | | | | | The IEEE 802.15.4 standard uses the 0xFFFF short address (2 bytes) for message broadcasting. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac802154: turn on ACK when enabled by the upper layersTony Cheneau2013-03-261-0/+2
| | | | | | | | | | Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: always enable link-layer acknowledgmentsTony Cheneau2013-03-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | This feature is especially important when using fragmentation, because the reassembly mechanism cannot recover from the loss of a fragment. Note that some hardware ignore this flag and not will not transmit acknowledgments even if this is set. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: next header is not properly set upon decompression of a UDP header.Tony Cheneau2013-03-261-1/+3
| | | | | | | | | | | | | | This causes a drop of the UDP packet. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * 6lowpan: lowpan_is_iid_16_bit_compressable() does not detect compressible ↵Tony Cheneau2013-03-261-3/+4
|/ | | | | | | | | | address correctly The current test is not RFC6282 compliant. The same issue has been found and fixed in Contiki. This patch is basically a port of their fix. Signed-off-by: Tony Cheneau <tony.cheneau@amnesiak.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: have length check of rtnl msg before derefHong zhi guo2013-03-262-19/+26
| | | | | | | | | | | | | When the legacy array rtm_min still exists, the length check within these functions is covered by rtm_min[RTM_NEWTFILTER], rtm_min[RTM_NEWQDISC] and rtm_min[RTM_NEWTCLASS]. But after Thomas Graf removed rtm_min several days ago, these checks are missing. Other doit functions should be OK. Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ipv6-firewire'David S. Miller2013-03-266-178/+213
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YOSHIFUJI Hideaki says: ==================== This is take 4 of supporting IPv6 over Firewire (IEEE 1394) based on RFC3146. Take 3->4: - Fix receiving 1394 ARP, which comes without arp$tha. - Remove rfc3146 unit directory on module exit. - other minor clean-ups - minimize diffs. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net, ipv6: IPv6 over Firewire (RFC3146) support.YOSHIFUJI Hideaki / 吉藤英明2013-03-263-9/+96
| | | | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net, ipv4 arp: Extend hardware address and remove driver-level ↵YOSHIFUJI Hideaki / 吉藤英明2013-03-264-135/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | packet inspection. Inspection of upper layer protocol is considered harmful, especially if it is about ARP or other stateful upper layer protocol; driver cannot (and should not) have full state of them. IPv4 over Firewire module used to inspect ARP (both in sending path and in receiving path), and record peer's GUID, max packet size, max speed and fifo address. This patch removes such inspection by extending our "hardware address" definition to include other information as well: max packet size, max speed and fifo. By doing this, The neighbour module in networking subsystem can cache them. Note: As we have started ignoring sspd and max_rec in ARP/NDP, those information will not be used in the driver when sending. When a packet is being sent, the IP layer fills our pseudo header with the extended "hardware address", including GUID and fifo. The driver can look-up node-id (the real but rather volatile low-level address) by GUID, and then the module can send the packet to the wire using parameters provided in the extendedn hardware address. This approach is realistic because IP over IEEE1394 (RFC2734) and IPv6 over IEEE1394 (RFC3146) share same "hardware address" format in their address resolution protocols. Here, extended "hardware address" is defined as follows: union fwnet_hwaddr { u8 u[16]; struct { __be64 uniq_id; /* EUI-64 */ u8 max_rec; /* max packet size */ u8 sspd; /* max speed */ __be16 fifo_hi; /* hi 16bits of FIFO addr */ __be32 fifo_lo; /* lo 32bits of FIFO addr */ } __packed uc; }; Note that Hardware address is declared as union, so that we can map full IP address into this, when implementing MCAP (Multicast Cannel Allocation Protocol) for IPv6, but IP and ARP subsystem do not need to know this format in detail. One difference between original ARP (RFC826) and 1394 ARP (RFC2734) is that 1394 ARP Request/Reply do not contain the target hardware address field (aka ar$tha). This difference is handled in the ARP subsystem. CC: Stephan Gatzka <stephan.gatzka@gmail.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net: Ignore spd and max_payload advertised by ARP.YOSHIFUJI Hideaki / 吉藤英明2013-03-261-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stefan Richter <stefanr@s5r6.in-berlin.de> says: | As far as I can tell, it would be best to ignore max_rec and sspd from ARP | and NDP but keep using the respective information from firewire-core | instead (handed over by fwnet_probe()). | | Why? As I noted earlier, RFC 2734:1999 and RFC 3146:2001 were apparently | written with a too simplistic notion of IEEE 1394 bus topology, resulting | in max_rec and sspd in ARP-1394 and NDP-1394 to be useless, IMO. | | Consider a bus like this: | | A ---- B ==== C | | A, B, C are all IP-over-1394 capable nodes. ---- is an S400 cable hop, | and ==== is an S800 cable hop. | | In case of unicasts or multicasts in which node A is involved as | transmitter or receiver, as well as in case of broadcasts, the speeds | S100, S200, S400 work and speed S400 is optimal. | | In case of anything else, IOW in case of unicasts or multicasts in which | only nodes B and C are involved, the speeds S100, S200, S400, S800 work | and speed S800 is optimal. | | Clearly, node A should indicate sspd = S400 in its ARP or NDP packets. | But which sspd should nodes B and C set there? Maybe they set S400, which | would work but would waste half of the available bandwidth in the second | case. Or maybe they set S800, which is OK in the second case but would | prohibit any communication with node A if blindly taken for correct. | | On the other hand, firewire-core *always* gives us the correct and optimum | peer-to-peer speed and asynchronous packet payload, no matter how simple | or complex the bus topology is and no matter in which temporal order nodes | join the bus and are discovered. CC: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net: Allocate address handler before registering net_device.YOSHIFUJI Hideaki / 吉藤英明2013-03-261-12/+10
| | | | | | | | | | | | | | | | | | | | | | Allocate FIFO address before registering net_device. This is preparation to change the pseudo hardware address format for firewire devices to include the offset of the FIFO for receipt of unicast datagrams, instead of mangling ARP/NDP messages in the driver layer. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net: Send L2 multicast via GASP.YOSHIFUJI Hideaki / 吉藤英明2013-03-261-5/+7
| | | | | | | | | | | | | | | | | | Send L2 multicast packet via GASP (Global asynchronous stream packet) by seeing the multicast bit in the L2 hardware address, not by seeing upper- layer protocol address. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * firewire net: Accept IPv4 and ARP only.YOSHIFUJI Hideaki / 吉藤英明2013-03-261-2/+19
|/ | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/davinci_emac: use devres APIsSekhar Nori2013-03-261-30/+16
| | | | | | | | | | | Use devres APIs where possible to simplify error handling in driver probe. While at it, also rename the goto targets in error path to introduce some consistency in how they are named. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'tunnels'David S. Miller2013-03-2620-2179/+1668
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pravin B Shelar says: ==================== Following patch series restructure GRE and IPIP tunneling code to make it modular. It adds ip_tunnel module which acts as generic tunneling layer which has common code. These patches do not change any functionality. v3:v4: - Fixed compilation error in ipv6. - Few coding style fixes. v2-v3: - Use GPL exports for all export symbols. - Set default config NET_IP_TUNNEL to m. v1-v2: - Dropped patch to convert gre_proto_lock to rtnl lock. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * Tunneling: use IP Tunnel stats APIs.Pravin B Shelar2013-03-265-117/+7
| | | | | | | | | | | | | | Use common function get calculate rtnl_link_stats64 stats. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud