summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-18ixgbe: Add support for WoL on 82599 SFP+ LOMJacob Keller
This patch adds software support for WoL for the 82599 SFP+ LOM device, (ID 0x8976) Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: in shutdown, do netif_running() under rtnl_lockakepner
During shutdown it's possible for __dev_close() (which holds rtnl_lock) to clear the __LINK_STATE_START bit, and for ixgbe to then read that bit (without holding rtnl_lock), and then not fail to free irqs, etc. The result is a crash like this: ------------[ cut here ]------------ kernel BUG at drivers/pci/msi.c:313! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map CPU 1 Pid: 5910, comm: reboot Tainted: P ---------------- 2.6.32 #1 empty RIP: 0010:[<ffffffff81305c2b>] [<ffffffff81305c2b>] free_msi_irqs+0x11b/0x130 RSP: 0018:ffff880185c9bc88 EFLAGS: 00010282 RAX: ffff880219f58bc0 RBX: ffff88021ac53b00 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000246 RDI: 000000000000004a RBP: ffff880185c9bcc8 R08: 0000000000000002 R09: 0000000000000106 R10: 0000000000000000 R11: 0000000000000006 R12: ffff88021e524778 R13: 0000000000000001 R14: ffff88021e524000 R15: 0000000000000000 FS: 00007f90821b7700(0000) GS:ffff880028220000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f90818bd010 CR3: 0000000132c64000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process reboot (pid: 5910, threadinfo ffff880185c9a000, task ffff88021bf04a80) Stack: ffff880185c9bc98 000000018130529d ffff880185c9bcc8 ffff88021e524000 <0> 0000000000000004 ffff88021948c700 0000000000000000 ffff880185c9bda7 <0> ffff880185c9bce8 ffffffff81305cbd ffff880185c9bce8 ffff88021948c700 Call Trace: [<ffffffff81305cbd>] pci_disable_msix+0x3d/0x50 [<ffffffffa00501d5>] ixgbe_reset_interrupt_capability+0x65/0x90 [ixgbe] [<ffffffffa00512f6>] ixgbe_clear_interrupt_scheme+0xb6/0xd0 [ixgbe] [<ffffffffa005330b>] __ixgbe_shutdown+0x5b/0x200 [ixgbe] [<ffffffffa00534ca>] ixgbe_shutdown+0x1a/0x60 [ixgbe] [<ffffffff812f6c7c>] pci_device_shutdown+0x2c/0x50 [<ffffffff813727fb>] device_shutdown+0x4b/0x160 [<ffffffff8107d98c>] kernel_restart_prepare+0x2c/0x40 ehci timer_action, mod_timer io_watchdog [<ffffffff8107d9e6>] kernel_restart+0x16/0x60 [<ffffffff8107dbfd>] sys_reboot+0x1ad/0x200 [<ffffffff811676cf>] ? __d_free+0x3f/0x60 [<ffffffff81167748>] ? d_free+0x58/0x60 [<ffffffff8116f7c0>] ? mntput_no_expire+0x30/0x100 [<ffffffff81152b11>] ? __fput+0x191/0x200 [<ffffffff816565fe>] ? do_page_fault+0x3e/0xa0 [<ffffffff8100b132>] system_call_fastpath+0x16/0x1b Code: 4c 89 ef e8 98 8c e3 ff 4d 39 f4 48 8b 43 10 75 cf 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f c9 c3 49 8b 7d 20 e8 07 5a d3 ff eb c9 <0f> 0b 0f 1f 00 eb fb 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 ehci timer_action, mod_timer io_watchdog RIP [<ffffffff81305c2b>] free_msi_irqs+0x11b/0x130 RSP <ffff880185c9bc88> ---[ end trace 27de882a0fe75593 ]--- (This was seen on a pretty old kernel/driver, but looks like the same bug is still possible.) Signed-off-by: <akepner@riverbed.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== This series contains updates to ixgbe only. v2- Dropped the following 2 patches from the series: ixgbe: Support using build_skb in the case that jumbo frames are disabled ixgbe: walk pci-e bus to find minimum width Ben Hutchings found a bug with Alex's patch, so that patch was dropped permanently. Jacob's "walk PCIe bus" patch is being re-worked for a more generic solution so that other drivers can benefit. In the remaining patches... Alex provides a fix where we were incorrectly checking the entire frag_off field when we only wanted the fragment offset. Alex also cleans up the check for PAGE_SIZE, since the default configuration allocates 32K for all buffers. Emil provides a change to the calculation of eerd so that it is consistent between the read and write functions by using | instead of +. Jacob adds support for displaying PCIe Gen3 link speed, which was previously missing from the ixgbe driver. He also provides a patch to clean up ixgbe_get_bus_info_generic to call some conversion functions, which are used also in another patch provided by Jacob. Jacob modifies the driver to enable certain devices (which have an internal switch) to read from the physical slot rather than reading data from the internal switch. Don provides a couple of fixes (which are more appropriate for net-next), one of which resolves an issue where ixgbe was only turning on the laser when the adapter was up which caused issues for those who wanted to access the MNG firmware while the port was in a down state. The other fix is for WoL when currently linked at 1G. Lastly Don bumps the driver version keep the in-kernel driver up to date with the current functionality. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-18tcp: introduce TCPSpuriousRtxHostQueues SNMP counterEric Dumazet
Host queues (Qdisc + NIC) can hold packets so long that TCP can eventually retransmit a packet before the first transmit even left the host. Its not clear right now if we could avoid this in the first place : - We could arm RTO timer not at the time we enqueue packets, but at the time we TX complete them (tcp_wfree()) - Cancel the sending of the new copy of the packet if prior one is still in queue. This patch adds instrumentation so that we can at least see how often this problem happens. TCPSpuriousRtxHostQueues SNMP counter is incremented every time we detect the fast clone is not yet freed in tcp_transmit_skb() Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Yuchung Cheng <ycheng@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Tom Herbert <therbert@google.com> Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-18fec: Remove unneeded asm header filesFabio Estevam
There is nothing in the driver that requires <asm/coldfire.h> and <asm/mcfsim.h>. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-18ixgbe: bump version numberDon Skidmore
Bump the version number reflect the corresponding functionality in the out of tree driver. Signed-of-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Fix 1G link WoLDon Skidmore
We reset during the shutdown path which will reset AUTOC register. This would change LMS to 10G. If we were currently linked at 1G we will lose link, which is a bad thing if we wanted WoL to work. For the fix I needed to know if WoL is supported so I created a new bool in the ixgbe_hw struct. If this is set we will not allow the reset to change the current LMS value in AUTOC. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: fix MNG FW support when adapter not upDon Skidmore
We were only turning the laser on when the adapter was up. This causes issues for those who wanted to access the MNG FW while the port was in a down state. This patch makes sure the laser is turned on in probe and remain up even after the port is brought down. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: enable devices with internal switch to read pci parentJacob Keller
This patch modifies the driver to enable certain devices, which have an internal switch, to read data from the physical slot rather than reading data from the internal switch. The internal switch will always report the same PCI width and speed, which is not useful compared to knowing the width and speed of the slot the physical card is plugged into. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: create conversion functions from link_status to bus/speedJacob Keller
This patch cleans up ixgbe_get_bus_info_generic to call some conversion functions, which are used also in a follow on patch that needs to convert between the link_status PCIe config values into ixgbe's internal enum representations. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Enable support for recognizing PCI-e Gen3 link speedJacob Keller
This patch adds support for displaying PCIe Gen3 link speed, which was previously missing from the driver. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Drop check for PAGE_SIZE from ixgbe_xmit_frame_ringAlexander Duyck
The check for PAGE_SIZE is pointless now that the default configuration is to allocate 32K for all buffers. Since the Tx descriptor limit is 16K we can just drop the check and always compare the descriptors to the maximum size supported. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: don't do arithmetic operations on bitmasksEmil Tantilov
Make the calculation of eerd consistent between the read and write functions by using | instead of + for IXGBE_EEPROM_RW_REG_START Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-18ixgbe: Mask off check of frag_off as we only want fragment offsetAlexander Duyck
We were incorrectly checking the entire frag_off field when we only wanted the fragment offset. As a result we were not pulling in TCP headers when the DNF flag was set. To correct that we will now check for frag off using the IP_OFFSET mask. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-04-17Merge branch 'tipc-ipoib'David S. Miller
Patrick McHardy says: ==================== The following patchset adds support for running TIPC over InfiniBand. The patchset consists of three parts (+ a minor fix for the ethernet media type): - Preparation: removal of an the unused str2addr callback and move of the bcast_addr from struct tipc_media to struct tipc_bearer. This is necessary because InfiniBand doesn't have a fixed broadcast address like ethernet, so it needs to be initialized with the device's broadcast address when the bearer is enabled - Introduction of a TIPC InfiniBand media type. A new media type is needed to deal with the different address sizes - Support for ETH_P_TIPC in IPoIB Since the last posting I've addressed all feedback I received and rebased to the current net-next tree. I consider these patches ready for merging. Since they mainly affect TIPC code, I'd propose to have them either go through the TIPC tree or through Dave directly (not sure how TIPC patches are managed). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17IPoIB: add support for TIPC protocolPatrick McHardy
Support TIPC in the IPoIB driver. Since IPoIB now keeps track of its own neighbour entries and doesn't require the packet to have a dst_entry anymore, the only necessary changes are to: - not drop multicast TIPC packets because of the unknown ethernet type - handle unicast TIPC packets similar to IPv4/IPv6 unicast packets in ipoib_start_xmit(). An alternative would be to remove all ethertype limitations since they're not necessary anymore, all TIPC needs to know about is ARP and RARP since it wants to always perform "path find", even if a path is already known. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17tipc: add InfiniBand media typePatrick McHardy
Add InfiniBand media type based on the ethernet media type. The only real difference is that in case of InfiniBand, we need the entire 20 bytes of space reserved for media addresses, so the TIPC media type ID is not explicitly stored in the packet payload. Sample output of tipc-config: # tipc-config -v -addr -netid -nt=all -p -m -b -n -ls node address: <10.1.4> current network id: 4711 Type Lower Upper Port Identity Publication Scope 0 167776257 167776257 <10.1.1:1855512577> 1855512578 cluster 167776260 167776260 <10.1.4:1216454657> 1216454658 zone 1 1 1 <10.1.4:1216479235> 1216479236 node Ports: 1216479235: bound to {1,1} 1216454657: bound to {0,167776260} Media: eth ib Bearers: ib:ib0 Nodes known: <10.1.1>: up Link <broadcast-link> Window:20 packets RX packets:0 fragments:0/0 bundles:0/0 TX packets:0 fragments:0/0 bundles:0/0 RX naks:0 defs:0 dups:0 TX naks:0 acks:0 dups:0 Congestion bearer:0 link:0 Send queue max:0 avg:0 Link <10.1.4:ib0-10.1.1:ib0> ACTIVE MTU:2044 Priority:10 Tolerance:1500 ms Window:50 packets RX packets:80 fragments:0/0 bundles:0/0 TX packets:40 fragments:0/0 bundles:0/0 TX profile sample:22 packets average:54 octets 0-64:100% -256:0% -1024:0% -4096:0% -16384:0% -32768:0% -66000:0% RX states:410 probes:213 naks:0 defs:0 dups:0 TX states:410 probes:197 naks:0 acks:0 dups:0 Congestion bearer:0 link:0 Send queue max:1 avg:0 Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17tipc: set skb->protocol in eth_media packet transmissionPatrick McHardy
The skb->protocol field is used by packet classifiers and for AF_PACKET cooked format, TIPC needs to set it properly. Fixes packet classification and ethertype of 0x0000 in cooked captures: Out 20:c9:d0:43:12:d9 ethertype Unknown (0x0000), length 56: 0x0000: 5b50 0028 0000 30d4 0100 1000 0100 1001 [P.(..0......... 0x0010: 0000 03e8 0000 0001 20c9 d043 12d9 0000 ...........C.... 0x0020: 0000 0000 0000 0000 ........ Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17tipc: move bcast_addr from struct tipc_media to struct tipc_bearerPatrick McHardy
Some network protocols, like InfiniBand, don't have a fixed broadcast address but one that depends on the configuration. Move the bcast_addr to struct tipc_bearer and initialize it with the broadcast address of the network device when the bearer is enabled. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17tipc: remove unused str2addr media callbackPatrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: cdc_ether: silence sparse __CHECK_ENDIAN__ warningBjørn Mork
Remove warning introduced by commit 418fc57 ("usbnet: cdc-ether: apply usbnet_link_change"): CHECK .../drivers/net/usb/cdc_ether.c .../drivers/net/usb/cdc_ether.c:409:46: warning: incorrect type in argument 2 (different base types) .../drivers/net/usb/cdc_ether.c:409:46: expected bool [unsigned] [usertype] <noident> .../drivers/net/usb/cdc_ether.c:409:46: got restricted __le16 [usertype] wValue Cc: Ming Lei <ming.lei@canonical.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_ulpq: remove 'malloced' struct memberDaniel Borkmann
The structure sctp_ulpq is embedded into sctp_association and never separately allocated, also ulpq->malloced is always 0, so that kfree() is never called. Therefore, remove this code. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_bind_addr: remove dead codeDaniel Borkmann
The sctp_bind_addr structure has a 'malloced' member that is always set to 0, thus in sctp_bind_addr_free() the kfree() part can never be called. This part is embedded into sctp_ep_common anyway and never alloced. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_transport: remove unused variableDaniel Borkmann
sctp_transport's member 'malloced' is set to 1, never evaluated and the structure is kfreed anyway. So just remove it. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: outqueue: simplify sctp_outq_uncork functionDaniel Borkmann
Just a minor edit to simplify the function. No need for this error variable here. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_outq: remove 'malloced' from its structDaniel Borkmann
sctp_outq is embedded into sctp_association, and thus never kmalloced in any way. Also, malloced is always 0, thus kfree() is never called. Therefore, remove that dead piece of code. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_inq: remove dead codeDaniel Borkmann
sctp_inq is never kmalloced, since it's integrated into sctp_ep_common and only initialized from eps and assocs. Therefore, remove the dead code from there. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17net: sctp: sctp_ssnmap: remove 'malloced' element from structDaniel Borkmann
sctp_ssnmap_init() can only be called from sctp_ssnmap_new() where malloced is always set to 1. Thus, when we call sctp_ssnmap_free() the test for map->malloced evaluates always to true. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-17Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch Jesse Gross says: ==================== A number of improvements for net-next/3.10. Highlights include: * Properly exposing linux/openvswitch.h to userspace after the uapi changes. * Simplification of locking. It immediately makes things simpler to reason about and avoids holding RTNL mutex for longer than necessary. In the near future it will also enable tunnel registration and more fine-grained locking. * Miscellaneous cleanups and simplifications. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16atl1: Protect atl1_suspend with CONFIG_PM_SLEEPFabio Estevam
commit 7b7a2bbb690 (atl1: Remove unneeded PM_OPS definitions) removed the definition of atl1_suspend for the !CONFIG_PM_SLEEP case. So only call atl1_suspend() when CONFIG_PM_SLEEP is defined and fix the following build error from randconfig: drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_shutdown': drivers/net/ethernet/atheros/atlx/atl1.c:2888:2: error: implicit declaration of function 'atl1_suspend' [-Werror=implicit-function-declaration] Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller
Marc Kleine-Budde says: ==================== this is a pull-request for net-next/master. It consists of a patch by Oliver Hartkopp. In this patch he cleans up the sja1000 header file by using a common prefix for all sja1000 defines. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16fec: Use SIMPLE_DEV_PM_OPSFabio Estevam
Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler. Also change CONFIG_PM to CONFIG_PM_SLEEP. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16pch_gbe: minor: report the actual error on MTU changeVeaceslav Falico
If we can't _up() after changing the MTU, report the actual error instead of -ENOMEM. It can be really misleading cause pch_gbe is usually used in scenarios where the memory amount is really small, and thus hiding the real cause. Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16vxlan: Allow setting destination to unicast address.Atzm Watanabe
This patch allows setting VXLAN destination to unicast address. It allows that VXLAN can be used as peer-to-peer tunnel without multicast. v4: generalize struct vxlan_dev, "gaddr" is replaced with vxlan_rdst. "GROUP" attribute is replaced with "REMOTE". they are based by David Stevens's comments. v3: move a new attribute REMOTE into the last of an enum list based by Stephen Hemminger's comments. v2: use a new attribute REMOTE instead of GROUP based by Cong Wang's comments. Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16packet: minor: add generic tpacket_uhdr to access packet headersDaniel Borkmann
There is no need to add a dozen unions each time at the start of the function. So, do this once and use it instead. Thus, we can remove some duplicate code and make it more readable. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16sctp: Add buffer utilization fields to /proc/net/sctp/assocsDilip Daya
sctp: Add buffer utilization fields to /proc/net/sctp/assocs This patch adds the following fields to /proc/net/sctp/assocs output: - sk->sk_wmem_alloc as "wmema" (transmit queue bytes committed) - sk->sk_wmem_queued as "wmemq" (persistent queue size) - sk->sk_sndbuf as "sndbuf" (size of send buffer in bytes) - sk->sk_rcvbuf as "rcvbuf" (size of receive buffer in bytes) When small DATA chunks containing 136 bytes data are sent the TX_QUEUE (assoc->sndbuf_used) reaches a maximum of 40.9% of sk_sndbuf value when peer.rwnd = 0. This was diagnosed from sk_wmem_alloc value reaching maximum value of sk_sndbuf. TX_QUEUE (assoc->sndbuf_used), sk_wmem_alloc and sk_wmem_queued values are incremented in sctp_set_owner_w() for outgoing data chunks. Having access to the above values in /proc/net/sctp/assocs will provide a better understanding of SCTP buffer management. With patch applied, example output when peer.rwnd = 0 where: ASSOC ffff880132298000 is sender ffff880125343000 is receiver ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE \ ffff880132298000 ffff880124a0a0c0 2 1 3 29325 1 214656 0 \ ffff880125343000 ffff8801237d7700 2 1 3 36210 2 0 524520 \ UID INODE LPORT RPORT LADDRS <-> RADDRS HBINT INS OUTS \ 0 25108 3455 3456 *10.4.8.3 <-> *10.5.8.3 7500 2 2 \ 0 27819 3456 3455 *10.5.8.3 <-> *10.4.8.3 7500 2 2 \ MAXRT T1X T2X RTXC wmema wmemq sndbuf rcvbuf 4 0 0 72 525633 440320 524288 524288 4 0 0 0 1 0 524288 524288 Signed-off-by: Dilip Daya <dilip.daya@hp.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16tlan: cancel work at remove pathDevendra Naga
the work has been scheduled from interrupt, and not been cancelled when the driver is unloaded, which doesn't remove the work item from the global workqueue. call the cancel_work_sync when the driver is removed (rmmod'ed). Cc: Sriram <srk@ti.com> Cc: Cyril Chemparathy <cyril@ti.com> Cc: Vinay Hegde <vinay.hegde@ti.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16neighbour: Convert NEIGH_PRINTK to neigh_dbgJoe Perches
Update debugging messages to a more current style. Emit these debugging messages at KERN_DEBUG instead of KERN_DEFAULT. Add and use neigh_dbg(level, fmt, ...) macro Add dynamic_debug capability via pr_debug Convert embedded function names to "%s: ", __func__ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16at86rf230: change irq handling to prevent lockups with edge type irqSascha Herrmann
Implemented separate irq handling for edge and level type interrupt configuration. For edge type interrupts calls to disable_irq_nosync() and enable_irq() are removed. The at86rf230 resets the irq line only after the irq status register is read. Disabling the irq can lock the driver in situations where a irq is set by the radio while the driver is still reading the frame buffer. With irq_type configuration set to 0 the original behavior is preserverd. Additional the irq filter register is set to filter out all unused interrupts and the irq status register is read in the probe function to clear the irq line. Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de> Conflicts: drivers/net/ieee802154/at86rf230.c Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16at86rf230: add irq type configuration optionSascha Herrmann
Add option to at86rf230 platform data to configure the type of the interrupt used by the driver. The irq polarity of the device will be configured accordingly. Signed-off-by: Sascha Herrmann <sascha@ps.nvbi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16ks8851: Remove unneeded PM_OPS definitionsFabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases. Remove the unneeded definitions. Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16xgmac: Remove unneeded PM_OPS definitionsFabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases. Remove the unneeded definitions. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16tg3: Remove unneeded PM_OPS definitionsFabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases. Remove the unneeded definitions. Cc: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16atl1: Remove unneeded PM_OPS definitionsFabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases. Remove the unneeded definitions. Cc: Jay Cliburn <jcliburn@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16can: mcp251x: Remove unneeded PM_OPS definitionsFabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases. Remove the unneeded definitions. Cc: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16can: sja1000: use common prefix for all sja1000 definesOliver Hartkopp
This is a follow up patch to: f901b6b can: sja1000: fix define conflict on SH That patch fixed a define conflict between the SH architecture and the sja1000 driver, by addind a prefix to one macro only. This patch consistently renames the prefix of the SJA1000 controller registers from "REG_" to "SJA1000_". Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-04-15openvswitch: Use generic struct pcpu_tstats.Pravin B Shelar
Rather than defining ovs specific stats struct (vport_percpu_stats), we can use existing pcpu_tstats to achieve exactly same functionality. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-04-15openvswitch: Simplify datapath locking.Pravin B Shelar
Currently OVS uses combination of genl and rtnl lock to protect datapath state. This was done due to networking stack locking. But this has complicated locking and there are few lock ordering issues with new tunneling protocols. Following patch simplifies locking by introducing new ovs mutex and now this lock is used to protect entire ovs state. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-04-15Merge branch 'sync_multiple'David S. Miller
Vlad Yasevich says: ==================== Current dev_[uc|mc]_addr_sync() API currently correctly syncs the addresses to the first device. Any subsequent calls to sync will not do anything since the synched variable will be set. This variable is used as an optimization to skip over addresses that have been synched. There are some devices (ex: team) that attempt to do the above. There is other work in progress that needs to above to work corretly. The short series introduces dev_[uc|mc]_addr_synch_multiple() that allows multiple calls to sync to multiple different devices. Original API is left alone and still has the limitation. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-15team: Use new sync_multiple api to sync devices adressess.Vlad Yasevich
Team drivers attempts to sync addresses to each of the port devices; however, the current api doesn't really perform the sync for any device after the first one. Switch to using the new api that will actually sync the addresses to all ports. CC: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>