aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e
AgeCommit message (Collapse)AuthorFilesLines
2013-10-29i40e: fix error return code in i40e_probe()Wei Yongjun1-1/+3
Fix to return -ENOMEM in the memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-24i40e: remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: Bump versionCatherine Sullivan1-1/+1
Update the driver version. Signed-off-by: Catherine Sullivan <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: use pf_id for pf function id in qtx_ctlShannon Nelson2-3/+3
Simplify code by using an already existing variable. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: check vsi ptrs before dumping themShannon Nelson1-16/+23
Make sure there really are rings and queues before trying to dump information in them. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: reorder block declarations in debugfsShannon Nelson1-8/+8
This is a cleanup of the local variables declared at the beginning of each function. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: tweaking icr0 handling for legacy irqShannon Nelson3-8/+8
Fix the overactive irq issue seen in testing and allow use of the legacy interrupt. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: refactor fdir setup functionJesse Brandeburg1-45/+33
This function did a lot of unnecessary cpu_to_xxx(foo) and making it worse, each of these calls caused a lot of line wrapping. Fix look and feel via a refactor of this function. No functional changes. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: fix sign extension issueJesse Brandeburg1-6/+6
This is a fix for an issue reported by coverity, reported by Hannes Frederic Sowa. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Hannes Frederic Sowa <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: fix use of untrusted scalar value warningJesse Brandeburg1-16/+18
This is a fix for an issue reported by coverity, reported by Hannes Frederic Sowa. I'm unable to test if this patch actually fixes the coverity reported issue, feedback is welcome. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Hannes Frederic Sowa <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: clamp debugfs nvm read commandJesse Brandeburg1-3/+5
This issue was identified by the coverity checker where we were not checking the upper limit on reads, reported by Hannes Frederic Sowa. Implement more specific limits on reads (min 1k, max 4k) Signed-off-by: Jesse Brandeburg <[email protected]> CC: Hannes Frederic Sowa <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: debugfs fixupsJesse Brandeburg1-12/+26
debugfs fixes for issues found by coverity. This issue was identified by the coverity checker, reported by Hannes Frederic Sowa. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Hannes Frederic Sowa <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: fixup legacy interrupt handlingShannon Nelson1-6/+12
There were a number of little bugs in the error handling of irq setup, most of which ended up panicing the kernel, and are addressed by this patch, along with a couple formatting issues. Legacy interrupts (including MSI) are used only in the case of failure to allocate MSI-X interrupts. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: assign correct vector to VFMitch Williams1-1/+1
Correct math error when assigning MSI-X vectors to VFs. The vectors-per-vf value reported by the hardware already conveniently reports one less than the actual value. Signed-off-by: Mitch Williams <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: don't free nonexistent ringsMitch Williams1-5/+6
Not all VSIs have rings! Check to see if rings were actually allocated before freeing them. This prevents a panic when tx_rings[0] is not allocated. Signed-off-by: Mitch Williams <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-22i40e: do not flush after re-enabling interruptsJesse Brandeburg2-3/+2
Hot path doesn't need read-flush after interrupt enable, and this flush really causes a lot of extra cpu utilization. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Bump versionCatherine Sullivan1-1/+1
Update the version number of the driver. Signed-off-by: Catherine Sullivan <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Add support for 64 bit netstatsAlexander Duyck4-15/+95
This change brings support for 64 bit netstats to the driver. Previously the stats were 64 bit but highly racy due to the fact that 64 bit transactions are not atomic on 32 bit systems. This change makes is so that the 64 bit byte and packet stats are reliable on all architectures. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Move rings from pointer to array to array of pointersAlexander Duyck6-185/+204
Allocate the queue pairs individually instead of as a group. This allows for much easier queue management as it is possible to dynamically resize the queues without having to free and allocate the entire block. Ease statistic collection by treating Tx/Rx queue pairs as a single unit. Each pair is allocated together and starts with a Tx queue and ends with an Rx queue. By ordering them this way it is possible to know the Rx offset based on a pointer to the Tx queue. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Replace ring container array with linked listAlexander Duyck3-53/+58
This replaces the ring container array with a linked list. The idea is to make the logic much easier to deal with since this will allow us to call a simple helper function from the q_vectors to go through the entire list. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Move q_vectors from pointer to array to array of pointersAlexander Duyck4-60/+112
Allocate the q_vectors individually. The advantage to this is that it allows for easier freeing and allocation. In addition it makes it so that we could do node specific allocations at some point in the future. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Split bytes and packets from Rx/Tx statsAlexander Duyck5-26/+28
This makes it so that the Tx and Rx byte and packet counts are separated from the rest of the statistics. This allows for better isolation of these stats when we move them into the 64 bit statistics. Simplify things by re-ordering how the stats display in ethtool. Instead of displaying all of the Tx queues as a block, followed by all the Rx queues, the new order is Tx[0], Rx[0], Tx[1], Rx[1], ..., Tx[n], Rx[n]. This reduces the loops and cleans up the display for testing purposes since it is very easy to verify if flow director is doing the right thing as the Tx and Rx queue pair are shown in pairs. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Add support for Tx byte queue limitsAlexander Duyck1-0/+15
Implement BQL (byte queue limit) support in i40e. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Drop dead code and flags from Tx hotpathAlexander Duyck2-27/+5
Drop Tx flag and TXSW which is tested but never set. As a result of this change we can drop a complicated check that always resulted in the final result of i40e_tx_csum being equal to the CHECKSUM_PARTIAL value. As such we can replace the entire function call with just a check for skb->summed == CHECKSUM_PARTIAL. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: clean up Tx fast pathAlexander Duyck2-99/+122
Sync the fast path for i40e_tx_map and i40e_clean_tx_irq so that they are similar to igb and ixgbe. - Only update the Tx descriptor ring in tx_map - Make skb mapping always on the first buffer in the chain - Drop the use of MAPPED_AS_PAGE Tx flag - Only store flags on the first buffer_info structure Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Do not directly increment Tx next_to_useAlexander Duyck1-21/+25
Avoid directly incrementing next_to_use for multiple reasons. The main reason being that if we directly increment it then it can attain a state where it is equal to the ring count. Technically this is a state it should not be able to reach but the way this is written it now can. This patch pulls the value off into a register and then increments it and writes back either the value or 0 depending on if the value is equal to the ring count. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Cleanup Tx buffer info layoutAlexander Duyck2-15/+14
- drop the mapped_as_page u8 from the Tx buffer info as it was unused - use the DMA unmap accessors for Tx DMA - replace checks of DMA with checks of the unmap length to verify if an unmap is needed - update the Tx buffer layout to make it consistent with igb, ixgbe Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Drop unused completed statAlexander Duyck3-5/+2
The Tx "completed" stat was part of the original rewrite for detecting Tx hangs. However some time ago in ixgbe I determined that we could just use the packets stat instead. Since then this stat was removed from ixgbe and it serves no purpose in i40e so it can be dropped. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-10-09i40e: Link code updatesAnjali Singhai1-2/+6
Link events should not print to the log until the device is administratively up. Signed-off-by: Anjali Singhai <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-27i40e: clean up coccicheck reported errorsJesse Brandeburg2-5/+4
coccicheck shows: drivers/net/ethernet/intel/i40e/i40e_adminq.c:704:2-8: Replace memcpy with struct assignment drivers/net/ethernet/intel/i40e/i40e_adminq.c:763:1-7: Replace memcpy with struct assignment drivers/net/ethernet/intel/i40e/i40e_adminq.c:810:2-8: Replace memcpy with struct assignment drivers/net/ethernet/intel/i40e/i40e_common.c:510:2-8: Replace memcpy with struct assignment Fix each of them with a *a = *b; Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-27i40e: better return valuesJesse Brandeburg1-16/+21
As mentioned by Joe Perches, clean up return values in some functions making sure to have consistent return types, not mixing types. A couple of Joe's comments suggested returning void, but since the functions in question are ndo defined, the return values are fixed. So make a comment in the header that notes this is a function called by net_device_ops. v2: fix post increment bug in return CC: Joe Perches <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-27i40e: convert ret to aq_retJesse Brandeburg1-55/+52
When calling admin queue functions the driver should use aq_ret variable to help make clear that the return value is not a regular return variable. This allows for clean up of the return types that were previously converted to int. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-27i40e: small clean ups from reviewJesse Brandeburg1-3/+3
As mentioned by Joe Perches clean up a loop flow. Signed-off-by: Jesse Brandeburg <[email protected]> CC: Joe Perches <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-27i40e: use common failure flowJesse Brandeburg1-6/+6
As mentioned by Joe Perches, we should be using foo = alloc(...) if (!foo) return -ENOMEM; return 0; Signed-off-by: Jesse Brandeburg <[email protected]> CC: Joe Perches <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: include i40e in kernel properJesse Brandeburg1-0/+44
This patch adds the changes for Kconfig, i40e.txt, MAINTAINERS, Kbuild and new i40e/Makefile to build i40e with the kernel. New driver build option is CONFIG_I40E Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: debugfs interfaceJesse Brandeburg1-0/+2076
This driver includes a debugfs interface for developers to get more hardware information in real-time. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: init code and hardware supportJesse Brandeburg16-0/+13813
This patch implements the hardware specific init and management. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: implement virtual device interfaceJesse Brandeburg3-0/+2823
While not part of this patch series, an i40evf driver is on its way, and uses these files to communicate to the PF driver. This patch contains the header and implementation files for the PF to VF interface. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Mitch Williams <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: driver core headersJesse Brandeburg3-0/+899
This patch contains the main driver header files, containing structures and data types specific to the linux driver. i40e_osdep.h contains some code that helps us adapt our OS agnostic code to Linux. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: driver ethtool coreJesse Brandeburg1-0/+1449
This patch contains the ethtool interface and implementation. The goal in this patch series is minimal functionality while not including much in the way of "set support." Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: transmit, receive, and NAPIJesse Brandeburg1-0/+1817
This patch contains the transmit, receive, and NAPI routines, as well as ancillary routines. This file is code that is (will be) used by both the VF and PF drivers. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-11i40e: main driver coreJesse Brandeburg1-0/+7375
This is the driver for the Intel(R) Ethernet Controller XL710 Family. This driver is targeted at basic ethernet functionality only, and will be improved upon further as time goes on. This patch contains the driver entry points but does not include transmit and receive (see the next patch in the series) routines. Signed-off-by: Jesse Brandeburg <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> CC: PJ Waskiewicz <[email protected]> CC: [email protected] Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>