aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-15net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASKTom Herbert1-1/+1
The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the set of features for offloading all checksums. This is a mask of the checksum offload related features bits. It is incorrect to set both NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for features of a device. This patch: - Changes instances of NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK (where NETIF_F_ALL_CSUM is being used as a mask). - Changes bonding, sfc/efx, ipvlan, macvlan, vlan, and team drivers to use NEITF_F_HW_CSUM in features list instead of NETIF_F_ALL_CSUM. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-15sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRCTom Herbert1-1/+1
The SCTP checksum is really a CRC and is very different from the standards 1's complement checksum that serves as the checksum for IP protocols. This offload interface is also very different. Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these differences. The term CSUM should be reserved in the stack to refer to the standard 1's complement IP checksum. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-12i40e/i40evf: Bump i40e to 1.4.8 and i40evf to 1.4.4Catherine Sullivan1-1/+1
Bump. Change-ID: I2b8976bde070244de144e2ed8990b083de39f332 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-12i40e: clean whole mac filter listShannon Nelson1-8/+11
Clean the whole mac filter list when resetting after an intermediate add or delete push to the firmware. The code had evolved from using a list from the stack to a heap allocation, but the memset() didn't follow the change correctly. This now cleans the whole list rather that just part of the first element. Change-ID: I4cd03d5a103b7407dd8556a3a231e800f2d6f2d5 Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-12i40e: hush little warningsMitch Williams1-6/+12
These messages seem big and scary, but they're really not. The driver can fully recover from any of these. The overflow error in particular can happen when enabling a bunch of VFs and the VF driver is not blacklisted. Since these messages are really for debugging purposes, reclassify them as such. Change-ID: I628d0f5e135e7063450ba05393a50b7af23aa6d7 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-12i40e: Opcode and structures required by OEM Post Update AQ command and add new NVM arq messageMichal Kosiarz1-0/+1
This is a part of implementation which contains data structures and opcode for new AQ command. There's a new ARQ message that gets sent near the end of the NVM update process that the driver should recognize and ignore, rather than printing an Unknown Event error. Change-ID: I04830a5bcae14823e16b9424cc4165e169336c1f Signed-off-by: Michal Kosiarz <michal.kosiarz@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-12i40e: properly delete VF MAC filtersMitch Williams1-0/+36
The virtual channel interface was using incorrect semantics to remove MAC addresses, which would leave incorrect filters active when using VLANs. To correct this, add a new function that unconditionally removes MAC addresses from all VLANs, and call this function when the VF requests a MAC filter removal. Change-ID: I69826908ae4f6c847f5bf9b32f11faa760189c74 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-12i40e: chomp the BIT(_ULL)Jesse Brandeburg1-15/+15
BIT_ULL was used on a u32 or less where it can simply be BIT. This fixes some trivial static analyzer warnings. Chomp, chomp. Tested with objdump of binary before and after, no changes to code. Change-ID: I6245e9abd447192dbde1669c747aeb2878126c7d Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-06Revert "i40e: remove CONFIG_I40E_VXLAN"Singhai, Anjali1-6/+6
This reverts commit 8fe269991aece394a7ed274f525d96c73f94109a. The case where VXLAN is a module and i40e driver is inbuilt will not be handled properly with this change since i40e will have an undefined symbol vxlan_get_rx_port in it. v2: Add a signed-off-by. Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-03Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller1-128/+112
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2015-12-03 This series contains updates to i40e and i40evf only. Mitch updates the i40evf driver by increasing the maximum number of queues, since future devices will allow for more queue pairs. Cleans up a duplicate printing of the driver info string done in init, since it is already done in probe. Cleaned up the several allocations which did not need to be at atomic level, where GFP_KERNEL would work just fine. Then makes i40e_sync_vsi_filters() a more mature function, make having a common exit point so it will properly release the busy lock on the VSI and propagate errors to the callers. Then does some whitespace housekeeping in i40evf. Kiran moves and updates the detection/recovery of transmit queue hang code to service_task from tx_timeout function. Also fixed memory leak when users program flow-director filter using ethtool (sideband filter programming), the cause being the check of 'tx_buffer->skb' was preventing 'raw_buf' from being freed as part of the cleanup. Jesse enabled the ability to turn off/on packet split using ethtool priv flags. Then does some housekeeping for both the i40e and i40evf drivers which includes: remove unused/useless code, correct whitespace, remove duplicate #include, fix incorrect comment, etc... Neerav cleans up functions to gather Flow Control Rx XOFF stats, since the recent change in the driver logic for checking transmit hang has been moved, so these functions do not do anything meaningful any longer. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-03i40e: Fix i40e_print_features() VEB mode outputJoe Perches1-23/+19
Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string building") added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in function i40e_print_features. Fix it. Miscellanea: - Remove unnecessary string variable - Add space before not after fixed strings - Use kmalloc not kzalloc - Don't initialize i to 0, use result of first snprintf Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-03i40e/i40evf: Bump version to 1.4.7 for i40e and 1.4.3 for i40evfCatherine Sullivan1-1/+1
Bump. Change-ID: Id8c83c64c973349a722bab40d285ad8ded8c28f7 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-03i40e: Remove separate functions gathering XOFF Rx statsNeerav Parikh1-70/+7
The separate functions to gather Flow control Rx XOFF stats was to determine if the Tx for a queue was paused due to Link Flow Control(LFC) or Priority Flow Control(PFC). But, with recent change in the i40e driver the logic for checking th Tx hang has been removed and these functions don't do anything meaningful. Hence, there is no need to keep these separate functions to gather Rx XOFF stats for LFC or PFC. This patch removes these functions and moves the stat collection for XOFF Rx to the i40e_update_pf_stats() that collects all the PF stats. Change-ID: Iec1452dac3a6766f0d968e754cb407530d7c60cd Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-03i40e: remove CONFIG_I40E_VXLANJesse Brandeburg1-6/+6
Instead of having our own custom symbol, we can just rely on whether or not the kernel has the feature enabled. In this case use IS_ENABLED(CONFIG_VXLAN) in order to handle built-in or module in the current BKM way. Change-ID: I5890fbb518ff8ed6bb07c3362fb0a8a829f9b241 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-03i40e: propagate properlyMitch Williams1-45/+68
i40e_sync_vsi_filters() is the surly teenager of this driver. It says it's going to report errors, but it doesn't actually do that most of the time. And when it does, it leaves a mess. Change this function to have a common exit point so it will properly release the busy lock on the VSI. Propagate errors to the callers. Finally, adjust a few callers to check for and deal with errors from this function. Change-ID: Ic6af4956491e72402ebb3c538a3c31a0ad7f8667 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-03i40e: Detection and recovery of TX queue hung logic moved to service_task from tx_timeoutKiran Patil1-6/+30
This patch contains following changes: - detection and recovery logic (issue SW interrupt) has been moved to service_task from timeout function. - added some more debug info from tx_timeout. Logic to detect and recover TX queue hung is now two step process: - service_task detects TX queue hung and sets a bit(hung_detected) if it was not set. - if bit was set (means this is back-back hung condition detected), issue SW interrupt and clear the bit. - napi_poll clears the bit unconditionally since it cleans TX/RX queues. Change-ID: Ieed03a48927c845a988b3ff375090bf37caeb903 Signed-off-by: Kiran Patil <kiran.patil@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: remove unused argumentJesse Brandeburg1-5/+11
With the final edition of the patches to remove sleeps from the driver's entry points, the grab_rtnl argument is no longer needed, so partially revert the commit that added it. Change-ID: Ib9778476242586cc9e58b670f5f48d415cb59003 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: fix: do not sleep in netdev_opsJesse Brandeburg1-24/+20
The driver was being called by VLAN, bonding, teaming operations that expected to be able to hold locks like rcu_read_lock(). This causes the driver to be held to the requirement to not sleep, and was found by the kernel debug options for checking sleep inside critical section, and the locking validator. Change-ID: Ibc68c835f5ffa8ffe0638ffe910a66fc5649a7f7 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e/i40evf: Bump i40e version to 1.4.4 and i40evf to 1.4.1Catherine Sullivan1-1/+1
Bump. Change-ID: I00ebbb2e5e5572f947502b8f6db4d94f666d6b14 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: fix confusing messageHelin Zhang1-1/+2
This patch fixes the confusing kernel message of enabled RSS size, by reporting it together with the hardware maximum RSS size. Change-ID: I64864dbfbc13beccc180a7871680def1f3d5a339 Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: Update error messagingCarolyn Wyborny1-6/+10
This patch fixes an issue where adminq init failures always provided a message that NVM was newer than expected. This is not always the case for init_adminq failures. Without this patch, if adminq init fails for any reason, newer NVM message would be given. This problem is fixed by adding a check for that specific error condition and a different hopefully helpful message otherwise. Change-ID: Iaeaebee4e398989eae40bb70f943ab66a3a521a5 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: rename rss_size to alloc_rss_size in i40e_pfHelin Zhang1-13/+18
This patch renames rss_size to alloc_rss_size in i40e_pf, which is clearer and avoids confusion. It also adds comments to the other related structure members to help clarify usage. Change-ID: Ia90090609d006ab589cb639975bb8a0af795d16f Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-01i40e: add new fields to store user configurationHelin Zhang1-5/+47
This patch adds new fields to i40e_vsi to store user configured RSS config data and code to use it. Signed-off-by: Helin Zhang <helin.zhang@intel.com> Change-ID: I73886469dca9e9f6b16d842182a87f3f4009f95d Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: Bump version to 1.4.2Catherine Sullivan1-2/+2
Bump. Change-ID: I2d1ce93b2ce74e4eef2394c932aef52cba99713f Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: create a generic configure rss functionHelin Zhang1-11/+74
This patch renames the old pf-specific function in order to clarify its scope. This patch also creates a more generic configure RSS function with the old name. This patch also creates a new more generic function to get RSS configuration, using the appropriate method. Change-ID: Ieddca2707b708ef19f1ebccdfd03a0a0cd63d3af Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: rework the functions to configure RSS with similar parametersHelin Zhang1-25/+70
Adjust the RSS configure functions so that there is a generic way to hook to ethtool hooks. Change-ID: If446e34fcfaf1bc3320d9d319829a095b5976e67 Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: Move the saving of old link info from handle_link_event to link_eventCatherine Sullivan1-4/+3
The watchdog only calls link_event not handle_link_event which means that we need to save the old information in link_event. Previously when polling we were comparing current data to the old data saved the last time we actually received a link event. This means that the polling would only fix link status changes in one direction depending on what the last old data saved off was. Change-ID: Ie590f30fdbcb133d0ddad4e07e3eb1aad58255b3 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e/i40evf: Add a stat to track how many times we have to do a force WBAnjali Singhai Jain1-1/+4
When in NAPI with interrupts disabled, the HW needs to be forced to do a write back on TX if the number of descriptors pending are less than a cache line. This stat helps keep track of how many times we get into this situation. Change-ID: I76c1bcc7ebccd6bffcc5aa33bfe05f2fa1c9a984 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: Workaround fix for mss < 256 issueAnjali Singhai Jain1-0/+27
HW/NVM sets a limit of no less than 256 bytes for MSS. Stack can send as low as 76 bytes MSS. This patch lowers the HW limit to 64 bytes to avoid MDDs from firing and causing a reset when the MSS is lower than 256. Change-ID: I36b500a6bb227d283c3e321a7718e0672b11fab0 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: remove BUG_ON from feature string buildingShannon Nelson1-16/+18
There's really no reason to kill the kernel thread just because of a little info string. This reworks the code to use snprintf's limiting to assure that the string is never too long, and WARN_ON to still put out a warning that we might want to look at the feature list length. Prompted by a recent Linus diatribe. Change-ID: If52ba5ca1c2344d8bf454a31bbb805eb5d2c5802 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-25i40e: Change BUG_ON to WARN_ON in service event completeShannon Nelson1-1/+1
There's no need to kill the thread and eventually the kernel in this case. In fact, the remainder of the code won't hurt anything anyway, so just complain that we're here and move along. Prompted by a recent Linus diatribe. Change-ID: Iec020d8bcfedffc1cd2553cc6905fd915bb3e670 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+1
Conflicts: net/ipv6/xfrm6_output.c net/openvswitch/flow_netlink.c net/openvswitch/vport-gre.c net/openvswitch/vport-vxlan.c net/openvswitch/vport.c net/openvswitch/vport.h The openvswitch conflicts were overlapping changes. One was the egress tunnel info fix in 'net' and the other was the vport ->send() op simplification in 'net-next'. The xfrm6_output.c conflicts was also a simplification overlapping a bug fix. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-23i40e/i40evf: Bump i40e to 1.3.46 and i40evf to 1.3.33Catherine Sullivan1-1/+1
Bump up the version... Change-ID: Ib8d501021671ba20250115ed54330e2c182255b7 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-23i40e: fix inconsistent statuses after a PF resetHelin Zhang1-0/+20
This patch fixes a problem of possibly getting inconsistent flow control statuses after a PF reset. Requested_mode was being set with a default value during probing, but the initial HW state could be different from this mode. Change-ID: I772bf07b78616e87086418d4bd87954b66fa17cd Signed-off-by: Helin Zhang <helin.zhang@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-23i40e: Fix VEB/VEPA bridge mode mismatch issueAkeem G Abodunrin1-3/+13
Fix i40e_is_vsi_uplink_mode_veb to check if bridge is actually in VEB mode before allowing LB in the add VSI routine, instead of unconditionally returning VEB bridge mode. Change-ID: I162397b1bdd02367735fe9baaeb51465be2a3ce9 Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-23i40e/i40evf: Add a workaround to drop all flow control framesAnjali Singhai Jain1-0/+18
This patch adds a workaround to drop any flow control frames from being transmitted from any VSI. FW can still send flow control frames if flow control is enabled. With this patch in place a malicious VF cannot send flow control or PFC packets out on the wire. Change-ID: I4303b24e98b93066d2767fec24dfe78be591c277 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-22i40e: fix annoying messageJesse Brandeburg1-0/+1
The driver was printing a message about not being able to assign VMDq because of a lack of MSI-X vectors. This was because a line was missing that initialized a variable, simply a merge error. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-21Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller1-60/+267
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-10-19 This series contains updates to i40e and i40evf only. Kiran adds a spinlock around code accessing VSI MAC filter list to ensure that we are synchronizing access to the filter list, otherwise we can end up with multiple accesses at the same time which can cause the VSI MAC filter list to get in an unstable or corrupted state. Jesse fixes overlong BIT defines, where the RSS enabling call were mistakenly missed. Also fixes a bug where the enable function was enabling the interrupt twice while trying to update the two interrupt throttle rate thresholds for Rx and Tx, while refactoring the IRQ enable function to simplify reading the flow. Addressed the high CPU utilization of some small streaming workloads that the driver should reduce CPU in. Anjali fixes two X722 issues with respect to EEPROM checksum verify and reading NVM version info. Fixed where a mask value was accidentally replaced with a bit mask causing Flow Director sideband to be broken. Alex Duyck fixes areas of the drivers which run from hard interrupt context or with interrupts already disabled in netpoll, so use napi_schedule_irqoff() instead of napi_schedule(). Mitch fixes the VF drivers to not easily give up when it is not able to communicate with the PF driver. Carolyn fixes a problem where our tools MAC loopback test, after driver unbind would fail because the hardware was configured for multiqueue and unbind operation did not clear this configuration. Also fixed a issue where the NVMUpdate tool gets bad data from the PHY when using the PHY NVM feature because of contention on the MDIO interface from getting PHY capability calls from the driver during regular operations. Catherine fixed an issue where we were checking if autoneg was allowed to change before checking if autoneg was changing, these checks need to be in the reverse order. Jean Sacren fixes up an function header comment to align the kernel-docs with the actual code. v2: Cleaned up the use of spin_is_locked() in patch 1 based on feedback from David Miller, since it always evaluates to zero on uni-processor builds ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+2
Conflicts: drivers/net/usb/asix_common.c net/ipv4/inet_connection_sock.c net/switchdev/switchdev.c In the inet_connection_sock.c case the request socket hashing scheme is completely different in net-next. The other two conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-19i40e/i40evf: Bump i40e to 1.3.38 and i40evf to 1.3.25Catherine Sullivan1-1/+1
Bump. Change-ID: Id0a7ecaa491f88ce94c9eba4901e592a56044ee0 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e: declare rather than initialize int objectJean Sacren1-1/+1
'err' would be overwritten immediately, so we should declare it only rather than initialize it to zero. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e: fix kernel-doc argument nameJean Sacren1-1/+1
The second argument name in the kernel-doc argument list for i40e_features_check() was slightly off. Fix it for the kernel doc. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e: Fix for Tools loopback test failing after driver loadCarolyn Wyborny1-0/+5
This patch fixes a problem where our Tools MAC Loopback test, after driver unbind would fail. This was because the hw was configured for multiqueue and unbind operation did not clear this configuration. The problem is fixed by resetting this configuration in i40e_remove. Change-ID: I130c05138319182ed1476d3a0b5222d6a6320af9 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e/i40evf: adjust interrupt throttle less frequentlyJesse Brandeburg1-0/+2
The adaptive ITR (interrupt throttle rate) algorithm was adjusting the hardware's interrupt rate too frequently. This caused a lot of variation in the interrupt rate for fairly constant workloads. Change the code to have a counter and adjust only once every N number of interrupts. Change-ID: I0460f1f86571037484eca5aca36ac4d889cb8389 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e/i40evf: use napi_schedule_irqoff()Alexander Duyck1-2/+4
The i40e_intr and i40e/i40evf_msix_clean_rings functions run from hard interrupt context or with interrupts already disabled in netpoll. They can use napi_schedule_irqoff() instead of napi_schedule() Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-19i40e: Lock for VSI's MAC filter listKiran Patil1-55/+253
This patch introduces a spinlock which is to be used for synchronizing access to VSI's MAC filter list. This patch also synchronizes execution of other codepaths which are accessing VSI's MAC filter list with execution of service_task:sync_vsi_filters. In function i40e_add_vsi, copied out LAA MAC address instead of cloning MAC filter entry because only MAC address is needed to remove MAC VLAN filter from FW/HW. Change-ID: I0e10ac7c715d44aa994239642aa4d57c998573a2 Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-16i40e/i40evf: Bump i40e to 1.3.34 and i40evf to 1.3.21Catherine Sullivan1-1/+1
Bump. Change-ID: I7ec818a507554648675b9b245ced9e6b6bd9ed4e Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-16i40e/i40evf: moderate interrupts differentlyJesse Brandeburg1-3/+7
The XL710 hardware has a different interrupt moderation design that can support a limit of total interrupts per second per vector, in addition to the "number of interrupts per second" controls already established in the driver. This combination of hardware features allows us to set very low default latency settings but minimize the total CPU utilization by not making too many interrupts, should the user desire. The current driver implementation is still enabling the dynamic moderation in the driver, and only using the rx/tx-usecs limit in ethtool to limit the interrupt rate per second, by default. The new code implemented in this patch 2) adds init/use of the new "Interrupt Limit" register 3) adds ethtool knob to control/report the limits above Usage is ethtool -C ethx rx-usecs-high <value> Where <value> is number of microseconds to create a rate of 1/N interrupts per second, regardless of rx-usecs or tx-usecs values. Since there is a credit based scheme in the hardware, the rx-usecs and tx-usecs can be configured for very low latency for short bursts, but once the credit runs out the refill rate on the credits is limited by rx-usecs-high. Change-ID: I3a1075d3296123b0f4f50623c779b027af5b188d Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-16i40e: generate fewer startup messagesShannon Nelson1-8/+12
Cut down on the number of startup log entries by putting a couple behind debug flags and combining a couple others into a single line. Change-ID: I708089f086308f84d43f8b6f0e8a634a02d058fb Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-10-16i40e/i40evf: Drop useless "IN_NETPOLL" flagAlexander Duyck1-2/+0
The code in i40e and i40evf is using an "IN_NETPOLL" flag that has never added any value due to the fact that the Rx clean-up is handled in NAPI. As such the flag was set, the queue was scheduled via NAPI, and then polled from the netpoll controller and if any Rx packets were processed the were processed in the wrong context. In addition the flag itself just added an unneeded conditional to the hot-path so it can safely be dropped and save us a few instructions. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>