summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: ipv6: Add sysctl entry to disable MTU updates from RAHarout Hedeshian2015-01-255-1/+20
| | | | | | | | | | | | | The kernel forcefully applies MTU values received in router advertisements provided the new MTU is less than the current. This behavior is undesirable when the user space is managing the MTU. Instead a sysctl flag 'accept_ra_mtu' is introduced such that the user space can control whether or not RA provided MTU updates should be applied. The default behavior is unchanged; user space must explicitly set this flag to 0 for RA MTUs to be ignored. Signed-off-by: Harout Hedeshian <harouth@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'fib_trie_next'David S. Miller2015-01-253-175/+198
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Duyck says: ==================== Fixes and improvements for recent fib_trie updates While performing testing and prepping the next round of patches I found a few minor issues and improvements that could be made. These changes should help to reduce the overall code size and improve the performance slighlty as I noticed a 20ns or so improvement in my worst-case testing which will likely only result in a 1ns difference with a standard sized trie. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Various clean-ups for handling slenAlexander Duyck2015-01-251-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While doing further work on the fib_trie I noted a few items. First I was using calls that were far more complicated than they needed to be for determining when to push/pull the suffix length. I have updated the code to reflect the simplier logic. The second issue is that I realised we weren't necessarily handling the case of a leaf_info struct surviving a flush. I have updated the logic so that now we will call pull_suffix in the event of having a leaf info value left in the leaf after flushing it. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Move fib_find_alias to file where it is usedAlexander Duyck2015-01-253-19/+20
| | | | | | | | | | | | | | | | | | | | The function fib_find_alias is only accessed by functions in fib_trie.c as such it makes sense to relocate it and cast it as static so that the compiler can take advantage of optimizations it can do to it as a local function. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Use empty_children instead of counting empty nodes in stats collectionAlexander Duyck2015-01-251-7/+1
| | | | | | | | | | | | | | | | | | | | It doesn't make much sense to count the pointers ourselves when empty_children already has a count for the number of NULL pointers stored in the tnode. As such save ourselves the cycles and just use empty_children. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Add collapse() and should_collapse() to resizeAlexander Duyck2015-01-251-35/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch really does two things. First it pulls the logic for determining if we should collapse one node out of the tree and the actual code doing the collapse into a separate pair of functions. This helps to make the changes to these areas more readable. Second it encodes the upper 32b of the empty_children value onto the full_children value in the case of bits == KEYLENGTH. By doing this we are able to handle the case of a 32b node where empty_children would appear to be 0 when it was actually 1ul << 32. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Fall back to slen update on inflate/halve failureAlexander Duyck2015-01-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | This change corrects an issue where if inflate or halve fails we were exiting the resize function without at least updating the slen for the node. To correct this I have moved the update of max_size into the while loop so that it is only decremented on a successful call to either inflate or halve. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Fix RCU bug and merge similar bits of inflate/halveAlexander Duyck2015-01-251-84/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses two issues. The first issue is the fact that I believe I had the RCU freeing sequence slightly out of order. As a result we could get into an issue if a caller went into a child of a child of the new node, then backtraced into the to be freed parent, and then attempted to access a child of a child that may have been consumed in a resize of one of the new nodes children. To resolve this I have moved the resize after we have freed the oldtnode. The only side effect of this is that we will now be calling resize on more nodes in the case of inflate due to the fact that we don't have a good way to test to see if a full_tnode on the new node was there before or after the allocation. This should have minimal impact however since the node should already be correctly size so it is just the cost of calling should_inflate that we will be taking on the node which is only a couple of cycles. The second issue is the fact that inflate and halve were essentially doing the same thing after the new node was added to the trie replacing the old one. As such it wasn't really necessary to keep the code in both functions so I have split it out into two other functions, called replace and update_children. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * fib_trie: Use index & (~0ul << n->bits) instead of index >> n->bitsAlexander Duyck2015-01-251-8/+8
|/ | | | | | | | | | | | In doing performance testing and analysis of the changes I recently found that by shifting the index I had created an unnecessary dependency. I have updated the code so that we instead shift a mask by bits and then just test against that as that should save us about 2 CPU cycles since we can generate the mask while the key and pos are being processed. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mlx4-next'David S. Miller2015-01-2527-347/+1046
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or Gerlitz says: ==================== mlx4: Fix and enhance the device reset flow This series from Yishai Hadas fixes the device reset flow and adds SRIOV support. Reset flows are required whenever a device experiences errors, is unresponsive, or is not in a deterministic state. In such cases, the driver is expected to reset the HW and continue operation. When SRIOV is enabled, these requirements apply both to PF and VF devices. Currently, the mlx4 reset flow doesn't work properly: when a fatal error is detected on the FW internal buffer the chip is not reset and stays in its bad state. There are cases that assumed to be fatal such as non-responsive FW, errors via closing commands but are not handled today. The AER mechanism should also be fixed: - It should use mlx4_load_one instead of __mlx4_init_one which is done upon HCA probing. - It must be aligned with concurrent catas flow, mark device to be in an error state, reset chip, etc. - Port types should be restored to their original values before error occurred. In addition, there the SRIOV use-case isn't supported. In above cases when the device state becomes fatal we must act as follows: 1) Reset the chip and mark the HW device state as in fatal error. 2) Wake up any pending commands, preventing new ones to come in. 3) Restart the software stack. We also address the SRIOV mode as follows: In case the PF detects a fatal error, it lets VFs know about that, then both itself and VFs are restarted asynchronously. However, in case only the VF encountered a fatal case or forced to be reset, they reset the VF stuff and then restart software. changes from V0: No need to call pci_disable_device upon permanent PCI error. This will be done as part of mlx4_remove_one which is called later once we return PCI_ERS_RESULT_DISCONNECT from the pci error handler. Initial toggle value should use only the T bit and not the whole byte value. Not doing so sometimes broke SRIOV as of junky value seen by the VF as a non-ready comm channel ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Reset flow activation upon SRIOV fatal command casesYishai Hadas2015-01-254-41/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When SRIOV commands are executed over the comm-channel and get a fatal error (e.g. timeout, closing command failure) the VF enters into error state and reset flow is activated. To be able to recognize whether the failure was on a closing command, the operational code for the given VHCR command is used. Once the device entered into an error state we prevent redundant error messages from being printed. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Enable device recovery flow with SRIOVYishai Hadas2015-01-258-70/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SRIOV, both the PF and the VF may attempt device recovery whenever they assume that the device is not functioning. When the PF driver resets the device, the VF should detect this and attempt to reinitialize itself. The VF must be able to reset itself under all circumstances, even if the PF is not responsive. The VF shall reset itself in the following cases: 1. Commands are not processed within reasonable time over the communication channel. This is done considering device state and the correct return code based on the command as was done in the native mode, done in the next patch. 2. The VF driver receives an internal error event reported by the PF on the communication channel. This occurs when the PF driver resets the device or when VF is out of sync with the PF. Add 'VF reset' capability, which allows the VF to reinitialize itself even when the PF is not responsive. As PF and VF may run their reset flow simulantanisly, there are several cases that are handled: - Prevent freeing VF resources upon FLR, when PF is in its unloading stage. - Prevent PF getting VF commands before it has finished initializing its resources. - Upon VF startup, check that comm-channel is online before sending commands to the PF and getting timed-out. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Handle AER flow properlyYishai Hadas2015-01-251-6/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix AER callbacks to work properly, it includes: - Refractoring AER to be aligned with Reset flow support. - Sync with concurrent catas flow. In addition, fix the shutdown PCI callback to sync with concurrent catas flow. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Manage interface state for Reset flow casesYishai Hadas2015-01-254-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to manage interface state to sync between reset flow and some other relative cases such as remove_one. This has to be done to prevent certain races. For example in case software stack is down as a result of unload call, the remove_one should skip the unload phase. Implement the remove_one case, handling AER and other cases comes next. The interface can be up/down, upon remove_one, the state will include an extra bit indicating that the device is cleaned-up, forcing other tasks to finish before the final cleanup. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Activate reset flow upon fatal command casesYishai Hadas2015-01-255-27/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We activate reset flow upon command fatal errors, when the device enters an erroneous state, and must be reset. The cases below are assumed to be fatal: FW command timed-out, an error from FW on closing commands, pci is offline when posting/pending a command. In those cases we place the device into an error state: chip is reset, pending commands are awakened and completed immediately. Subsequent commands will return immediately. The return code in the above cases will depend on the command. Commands which free and close resources will return success (because the chip was reset, so callers may safely free their kernel resources). Other commands will return -EIO. Since the device's state was marked as error, the catas poller will detect this and restart the device's software stack (as is done when a FW internal error is directly detected). The device state is protected by a persistent mutex lives on its mlx4_dev, as such no need any more for the hcr_mutex which is removed. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Enhance the catas flow to support device resetYishai Hadas2015-01-254-29/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: - resetting the chip when a fatal error is detected (the current code does not do this). - exposing the ability to enter error state from outside the catas code by calling its functionality. (E.g. FW Command timeout, AER error). - managing a persistent device state. This is needed to sync between reset flow cases. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Refactor the catas flow to work per deviceYishai Hadas2015-01-254-44/+48
| | | | | | | | | | | | | | | | | | | | | | | | Using a WQ per device instead of a single global WQ, this allows independent reset handling per device even when SRIOV is used. This comes as a pre-patch for supporting chip reset for both native and SRIOV. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Set device configuration data to be persistent across resetYishai Hadas2015-01-252-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | When an HCA enters an internal error state, this is detected by the driver. The driver then should reset the HCA and restart the software stack. Keep ports information and some SRIOV configuration in a persistent area to have it valid across reset. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_core: Maintain a persistent memory for mlx4 deviceYishai Hadas2015-01-2524-163/+234
|/ | | | | | | | | Maintain a persistent memory that should survive reset flow/PCI error. This comes as a preparation for coming series to support above flows. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: re-use native hex2bin()Andy Shevchenko2015-01-251-3/+3
| | | | | | | Call hex2bin() library function instead of doing conversion here. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* usbnet: re-use native hex2bin()Andy Shevchenko2015-01-251-9/+8
| | | | | | | | Call hex2bin() library function, instead of doing conversion here. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2015-01-2410-101/+424
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-01-22 This series contains updates to e1000, e1000e, igb, fm10k and virtio_net. Asaf Vertz provides a fix for e1000 to future-proof the time comparisons by using time_after_eq() instead of plain math. Mathias Koehrer provides a fix for e1000e to add a check to e1000_xmit_frame() to ensure a work queue will not be scheduled that has not been initialized. Jacob adds the use of software timestamping via the virtio_net driver. Alex Duyck cleans up page reuse code in igb and fm10k. Cleans up the page reuse code from getting into a state where all the workarounds needed are in place as well as cleaning up oversights, such as using __free_pages instead of put_page to drop a locally allocated page. Richard Cochran provides 4 patches for igb dealing with time sync. First provides a helper function since the code that handles the time sync interrupt is repeated in three different places. Then serializes the access to the time sync interrupt since the registers may be manipulated from different contexts. Enables the use of i210 device interrupt to generate an internal PPS event for adjusting the kernel system time. The i210 device offers a number of special PTP hardware clock features on the Software Defined Pins (SDPs), so added support for two of the possible functions (time stamping external events and periodic output signals). Or Gerlitz fixes fm10k from double setting of NETIF_F_SG since the networking core does it for the driver during registration time. Joe Stringer adds support for up to 104 bytes of inner+outer headers in fm10k and adds an initial check to fail encapsulation offload if these are too large. Matthew increases the timeout for the data path reset based on feedback from the hardware team, since 100us is too short of a time to wait for the data path reset to complete. Alexander Graf provides a fix for igb to indicate failure on VF reset for an empty MAC address, to mirror the behavior of ixgbe. Florian Westphal updates e1000 and e1000e to support txtd update delay via xmit_more, this way we won't update the Tx tail descriptor if the queue has not been stopped and we know at least one more skb will be sent right away. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: e1000e: support txtd update delay via xmit_moreFlorian Westphal2015-01-221-10/+15
| | | | | | | | | | | | | | | | | | Don't update Tx tail descriptor if queue hasn't been stopped and we know at least one more skb will be sent right away. Signed-off-by: Florian Westphal <fw@strlen.de> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * net: e1000: support txtd update delay via xmit_moreFlorian Westphal2015-01-221-6/+9
| | | | | | | | | | | | | | | | | | Don't update Tx tail descriptor if we queue hasn't been stopped and we know at least one more skb will be sent right away. Signed-off-by: Florian Westphal <fw@strlen.de> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Indicate failure on vf reset for empty mac addressAlexander Graf2015-01-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5ac6f91d changed the igb driver to expose a zero (empty) mac address to the VF on reset rather than a random one. However, that behavioral change also requires igbvf driver changes which can be hard especially when we want to talk to proprietary guest OSs. Looking at the code previous to the commit in Linux that made igbvf work with empty mac addresses (8d56b6d), we can see that on reset failure the driver will try to generate a new mac address with both the old and the new code. Furthermore, ixgbe does send reset failure when it detects an empty mac address (35055928c). So I think it's safe to make igb behave the same. With this patch I can successfully run a Windows 8.1 guest with an empty mac address and an assigned igbvf device that has no mac address set by the host. If anyone is aware of a guest driver that chokes on NACK returns of VF RESET commands, please speak up. Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * fm10k: Increase the timeout for the data path resetMatthew Vick2015-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | Based on feedback from the hardware team, 100us is too short of a time to wait for the data path reset to complete and the recommendation is to increase this timeout to 150us. Signed-off-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * fm10k: Check tunnel header length in encap offloadJoe Stringer2015-01-221-0/+6
| | | | | | | | | | | | | | | | | | fm10k supports up to 184 bytes of inner+outer headers. Add an initial check to fail encap offload if these are too large. Signed-off-by: Joe Stringer <joestringer@nicira.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * net/fm10k: Avoid double setting of NETIF_F_SG for the HW encapsulation ↵Or Gerlitz2015-01-221-7/+6
| | | | | | | | | | | | | | | | | | | | | | feature mask The networking core does it for the driver during registration time. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Acked-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: enable auxiliary PHC functions for the i210Richard Cochran2015-01-223-6/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The i210 device offers a number of special PTP Hardware Clock features on the Software Defined Pins (SDPs). This patch adds support for two of the possible functions, namely time stamping external events, and periodic output signals. The assignment of PHC functions to the four SDP can be freely chosen by the user. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: enable internal PPS for the i210Richard Cochran2015-01-222-5/+45
| | | | | | | | | | | | | | | | | | | | The i210 device can produce an interrupt on the full second. This patch allows using this interrupt to generate an internal PPS event for adjusting the kernel system time. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: serialize access to the time sync interrupt registersRichard Cochran2015-01-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The time sync related interrupt registers may be manipulated from different contexts. This patch protects the registers from being asynchronously changed by the reset function. Also, the patch removes a misleading comment. The reset function is disabling a bunch of functions, not enabling them. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: refactor time sync interrupt handlingRichard Cochran2015-01-221-30/+19
| | | | | | | | | | | | | | | | | | | | The code that handles the time sync interrupt is repeated in three different places. This patch refactors the identical code blocks into a single helper function. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * fm10k: Clean-up page reuse codeAlexander Duyck2015-01-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the page reuse code getting it into a state where all the workarounds needed are in place as well as cleaning up a few minor oversights such as using __free_pages instead of put_page to drop a locally allocated page. It also cleans up how we clear the descriptor status bits. Previously they were zeroed as a part of clearing the hdr_addr. However the hdr_addr is a 64 bit field and 64 bit writes can be a bit more expensive on on 32 bit systems. Since we are no longer using the header split feature the upper 32 bits of the address no longer need to be cleared. As a result we can just clear the status bits and leave the length and VLAN fields as-is which should provide more information in debugging. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * igb: Clean-up page reuse codeAlexander Duyck2015-01-221-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the page reuse code getting it into a state where all the workarounds needed are in place as well as cleaning up a few minor oversights such as using __free_pages instead of put_page to drop a locally allocated page. It also cleans up how we clear the descriptor status bits. Previously they were zeroed as a part of clearing the hdr_addr. However the hdr_addr is a 64 bit field and 64 bit writes can be a bit more expensive on on 32 bit systems. Since we are no longer using the header split feature the upper 32 bits of the address no longer need to be cleared. As a result we can just clear the status bits and leave the length and VLAN fields as-is which should provide more information in debugging. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * virtio_net: add software timestamp supportJacob Keller2015-01-221-0/+4
| | | | | | | | | | | | | | | | This patch enables the use of software timestamping via the virtio_net driver. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: Fix 82572EI that has no hardware timestamp supportMathias Koehrer2015-01-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the Intel 82527EI (driver: e1000e) there is an issue when running the ptpd2 program, that leads to a kernel oops. The reason is here that in e1000_xmit_frame() a work queue will be scheduled that has not been initialized in this case. The work queue "tx_hwstamp_work" will only be initialized if adapter->flags & FLAG_HAS_HW_TIMESTAMP set. This check is missing in e1000_xmit_frame(). The following patch adds the missing check. Signed-off-by: Mathias Koehrer <mathias.koehrer@etas.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000: fix time comparisonAsaf Vertz2015-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | To be future-proof and for better readability the time comparisons are modified to use time_after_eq() instead of plain, error-prone math. Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Acked-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | Merge branch 'vxlan_tx'David S. Miller2015-01-247-65/+65
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tom Herbert says: ==================== vxlan: Don't use UDP socket for transmit UDP socket is not pertinent to transmit for UDP tunnels, checksum enablement can be done without a socket. This patch set eliminates reference to a socket in udp_tunnel_xmit functions and in VXLAN transmit. Also, make GBP, RCO, can CSUM6_RX flags visible to receive socket and only match these for shareable socket. v2: Fix geneve to call udp_tunnel_xmit with good arguments. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | vxlan: Eliminate dependency on UDP socket in transmit pathTom Herbert2015-01-243-41/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the vxlan transmit path there is no need to reference the socket for a tunnel which is needed for the receive side. We do, however, need the vxlan_dev flags. This patch eliminate references to the socket in the transmit path, and changes VXLAN_F_UNSHAREABLE to be VXLAN_F_RCV_FLAGS. This mask is used to store the flags applicable to receive (GBP, CSUM6_RX, and REMCSUM_RX) in the vxlan_sock flags. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | udp: Do not require sock in udp_tunnel_xmit_skbTom Herbert2015-01-245-26/+29
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The UDP tunnel transmit functions udp_tunnel_xmit_skb and udp_tunnel6_xmit_skb include a socket argument. The socket being passed to the functions (from VXLAN) is a UDP created for receive side. The only thing that the socket is used for in the transmit functions is to get the setting for checksum (enabled or zero). This patch removes the argument and and adds a nocheck argument for checksum setting. This eliminates the unnecessary dependency on a UDP socket for UDP tunnel transmit. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: fec: fix the warning found by dma debugNimrod Andy2015-01-241-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable kernel config "CONFIG_HAVE_DMA_API_DEBUG", FEC have kernel warning: [ 6.650444] fec 2188000.ethernet: DMA-API: device driver tries to free DMA memory it has not allocated [ 6.664289] Modules linked in: [ 6.667378] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 3.19.0-rc4-00688-g8834016-dirty #150 [ 6.675841] Hardware name: Freescale i.MX6 SoloX (Device Tree) [ 6.681698] Backtrace: [ 6.684189] [<80011e3c>] (dump_backtrace) from [<80011fdc>] (show_stack+0x18/0x1c) [ 6.691789] r6:80890154 r5:00000000 r4:00000000 r3:00000000 [ 6.697533] [<80011fc4>] (show_stack) from [<806d2d88>] (dump_stack+0x80/0x9c) [ 6.704799] [<806d2d08>] (dump_stack) from [<8002a4e4>] (warn_slowpath_common+0x7c/0xb4) [ 6.712917] r5:00000445 r4:00000000 [ 6.716544] [<8002a468>] (warn_slowpath_common) from [<8002a5c0>] (warn_slowpath_fmt+0x38/0x40) [ 6.725265] r8:809a2ee8 r7:00000000 r6:00000000 r5:00000000 r4:00000042 [ 6.732087] [<8002a58c>] (warn_slowpath_fmt) from [<802d6268>] (check_unmap+0x86c/0x98c) [ 6.740202] r3:808c79bc r2:8089060c [ 6.743826] [<802d59fc>] (check_unmap) from [<802d65e4>] (debug_dma_unmap_page+0x80/0x88) [ 6.752029] r10:00000000 r9:00000000 r8:00000000 r7:00000001 r6:be12a410 r5:00000000 [ 6.759967] r4:00000042 [ 6.762538] [<802d6564>] (debug_dma_unmap_page) from [<80440248>] (fec_enet_rx_napi+0x7ec/0xb9c) [ 6.771345] r7:00000400 r6:be3e4000 r5:bf08fa20 r4:be036000 [ 6.777094] [<8043fa5c>] (fec_enet_rx_napi) from [<8056ae24>] (net_rx_action+0x134/0x324) [ 6.785297] r10:be089e60 r9:80998180 r8:ffff8d68 r7:0000012c r6:00000040 r5:00000001 [ 6.793239] r4:be036718 [ 6.795801] [<8056acf0>] (net_rx_action) from [<8002db24>] (__do_softirq+0x138/0x2d0) [ 6.803655] r10:00000003 r9:00000003 r8:80996378 r7:8099c080 r6:00000100 r5:8099c08c [ 6.811593] r4:00000000 [ 6.814157] [<8002d9ec>] (__do_softirq) from [<8002dd00>] (run_ksoftirqd+0x44/0x5c) [ 6.821836] r10:00000000 r9:00000000 r8:809b133c r7:00000000 r6:00000001 r5:00000000 [ 6.829775] r4:be027e80 [ 6.832346] [<8002dcbc>] (run_ksoftirqd) from [<80048290>] (smpboot_thread_fn+0x154/0x1c4) [ 6.840649] [<8004813c>] (smpboot_thread_fn) from [<80044780>] (kthread+0xdc/0xf8) [ 6.848224] r10:00000000 r8:00000000 r7:8004813c r6:be027e80 r5:be027ec0 r4:00000000 [ 6.856179] [<800446a4>] (kthread) from [<8000ebc8>] (ret_from_fork+0x14/0x2c) [ 6.863425] r7:00000000 r6:00000000 r5:800446a4 r4:be027ec0 [ 6.869156] ---[ end trace 861cf914d2461a8b ]--- There have one bug in .fec_enet_tx_queue() function to unmap the DMA memory: For SG or TSO, get one buffer descriptor and then unmap the related DMA memory, and then get the next buffer descriptor, loop to while() to check "TX_READY". If "TX_READY" bit still __IS__ existed in the BD (The next fraglist or next TSO packet is not transmited complitely), exit the current clean work. When the next work is triggered, it still repeat above step with the same BD. The potential issue is that unmap the same DMA memory for multiple times. The patch fix the clean work for SG and TSO packet. Reported-by: Anand Moon <moon.linux@yahoo.com> Reported-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'be2net-next'David S. Miller2015-01-245-261/+236
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sathya Perla says: ==================== be2net: patch set Hi David, as the below patch-set includes minor bug fixes and some code re-org, pls consider applying it to the "net-next" tree. Thanks! Patch 1 fixes a bit of code duplication involving interface object creation code. Patch 2 ensures that when a flow-control FW cmd fails, the adapter state continues to reflect the old values. This allows for correct reporting on subsequent ethtool "get". Patch 3 returns proper error for link config change on BE3/Lancer Patch 4 adds a kernel log message for FW boot error on Lancer Patch 5 adds a function reset on Lancer as a part of the function init sequence. Patch 6 moves some FW-cmd definitions that belong in be_cmds.h, but were placed in be_hw.h Patch 7 resets the "bw_min" field while configuring "bw_max" needed for TX rate limiting config. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: Fix TX rate limiting on Lancer/Skyhawk-R VFsKalesh AP2015-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When max_tx_rate is set via bw_max in the NIC resource desc, bw_min must be set to 0. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: move definitions related to FW cmdsfrom be_hw.h to be_cmds.hVasundhara Volam2015-01-243-224/+176
| | | | | | | | | | | | | | | | | | | | | | | | Some FW cmd related definitions were included in be_hw.h Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: issue function reset cmd in resume pathKalesh AP2015-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Lancer FW is picky about requiring a function reset FW cmd as a part of the initialization sequence. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: add a log message for POST timeout in LancerKalesh AP2015-01-241-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a log message in case of POST timeout in Lancer to help debugging failure cases. It also logs sliport_status register value in case of POST timeout. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: fail VF link config change via ndo_set_vf_link_state() on BE3/LancerKalesh AP2015-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The support for this exists only in skyhawk FW. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: fix failure case in setting flow controlKalesh AP2015-01-242-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the FW cmd to set flow control fails, the adapter state must simply reflect the old values. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | be2net: move interface create code to a separate routineKalesh AP2015-01-241-20/+29
|/ / | | | | | | | | | | | | | | This removes a bit of duplication of code that initializes the en_flags. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'stmmac-dwmac-rk'David S. Miller2015-01-244-44/+25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Romain Perier says: ==================== net: stmmac: dwmac-rk: Fix phy regulator issues This series fixes few issues in dwmac-rk: 1. Voltage settings was hardcoded into the driver for the phy regulator. The driver now uses the default voltage settings found in the devicetree, which are applied throught the regulator framework. 2. The regulator name used to power on or power off the phy was put in the devicetree variable "phy_regulator", which is not standard and added a lot of code for nothing. The driver now uses the devicetree property "phy-supply" and the corresponding functions to manipulate this regulator. The corresponding devicetree files are also updated. As this new binding for rk3288 has not been released with any official kernel yet (not until 3.20), I don't need to care about keeping compatibility with the old non standard property. ==================== Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud