summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'kmap_atomic' of git://github.com/congwang/linuxLinus Torvalds2012-03-212-11/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull kmap_atomic cleanup from Cong Wang. It's been in -next for a long time, and it gets rid of the (no longer used) second argument to k[un]map_atomic(). Fix up a few trivial conflicts in various drivers, and do an "evil merge" to catch some new uses that have come in since Cong's tree. * 'kmap_atomic' of git://github.com/congwang/linux: (59 commits) feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename] drbd: remove the second argument of k[un]map_atomic() zcache: remove the second argument of k[un]map_atomic() gma500: remove the second argument of k[un]map_atomic() dm: remove the second argument of k[un]map_atomic() tomoyo: remove the second argument of k[un]map_atomic() sunrpc: remove the second argument of k[un]map_atomic() rds: remove the second argument of k[un]map_atomic() net: remove the second argument of k[un]map_atomic() mm: remove the second argument of k[un]map_atomic() lib: remove the second argument of k[un]map_atomic() power: remove the second argument of k[un]map_atomic() kdb: remove the second argument of k[un]map_atomic() udf: remove the second argument of k[un]map_atomic() ubifs: remove the second argument of k[un]map_atomic() squashfs: remove the second argument of k[un]map_atomic() reiserfs: remove the second argument of k[un]map_atomic() ocfs2: remove the second argument of k[un]map_atomic() ntfs: remove the second argument of k[un]map_atomic() ...
| * net: remove the second argument of k[un]map_atomic()Cong Wang2012-03-202-10/+6
| | | | | | | | | | Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com>
* | ixgbe: Fix issues with SR-IOV loopback when flow control is disabledAlexander Duyck2012-03-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows us to avoid a Tx hang when SR-IOV is enabled. This hang can be triggered by sending small packets at a rate that was triggering Rx missed errors from the adapter while the internal Tx switch and at least one VF are enabled. This was all due to the fact that under heavy stress the Rx FIFO never drained below the flow control high water mark. This resulted in the Tx FIFO being head of line blocked due to the fact that it relies on the flow control high water mark to determine when it is acceptable for the Tx to place a packet in the Rx FIFO. The resolution for this is to set the FCRTH value to the RXPBSIZE - 32 so that even if the ring is almost completely full we can still place Tx packets on the Rx ring and drop incoming Rx traffic if we do not have sufficient space available in the Rx FIFO. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2012-03-196-1106/+1286
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
| * | ixgbe: fix namespace issues when FCoE/DCB is not enabledJeff Kirsher2012-03-194-902/+945
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve namespace issues when FCoE or DCB is not enabled. The issue is with certain configurations we end up with namespace problems. A simple example: ixgbe_main.c - defines func A() - uses func A() ixgbe_fcoe.c - uses func A() ixgbe.h - has prototype for func A() For default (FCoE included) all is good. But when it isn't the namespace checker complains about how func A() could be static. To resolve this, created a ixgbe_lib file to contain functions used by DCB/FCoE and their helper functions so that they are always in namespace whether or not DCB/FCoE is enabled. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
| * | ixgbe: Correct flag values set by ixgbe_fix_featuresAlexander Duyck2012-03-193-61/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the variable name data with the variable name features for ixgbe_fix_features and ixgbe_set_features. This helps to make some issues more obvious such as the fact that we were disabling Rx VLAN tag stripping when we should have been forcing it to be enabled when DCB is enabled. In addition there was deprecated code present that was disabling the LRO flag if we had the itr value set too low. I have updated this logic so that we will now allow the LRO flag to be set, but will not enable RSC until the rx-usecs value is high enough to allow enough time for Rx packet coalescing. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: Add support for enabling UDP RSS via the ethtool rx-flow-hash commandAlexander Duyck2012-03-193-1/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for enabling or disabling UDP RSS via the ethtool -N rx-flow-hash command. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: Whitespace cleanupsAlexander Duyck2012-03-191-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | This patch contains several fixes for formatting in regards to whitespace. 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>
| * | ixgbe: Two minor fixes for RSS and FDIR set queues functionsAlexander Duyck2012-03-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two minor issues. The first was the fact that we were setting the return value to false twice in the set_rss_queues function. The second is the fact that we should have been using "min_t(int," instead of "min((int)" in set_fdir_queues. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: drop err_eeprom tag which is at same location as err_sw_initAlexander Duyck2012-03-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The err_eeprom and err_sw_init tags both go to the same location. So instead of maintaining two tags this patch combines them so we only use err_sw_init. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: Move poll routine in order to improve readabilityAlexander Duyck2012-03-191-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change relocates the ixgbe_poll routine so it is right next to the interrupt routine that schedules and calls it. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: cleanup logic for the service timer and VF hang detectionAlexander Duyck2012-03-191-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change just cleans up some of the logic in the service_timer function so that we can avoid unnecessary swapping of the ready value between true to false and back to true. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: Update layout of ixgbe_ring structure to improve cache performanceAlexander Duyck2012-03-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it so that only the 2nd cache line in the ring structure should see frequent updates. The advantage to this is that it should reduce the amount of cross CPU cache bouncing since only the 2nd cache line will be changing between most network transactions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | ixgbe: Store Tx flags and protocol information to tx_buffer soonerAlexander Duyck2012-03-193-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it so that we store the tx_flags and protocol information to the tx_buffer_info structure sooner. This allows us to avoid unnecessary read/write transactions since we are placing the data in the final location earlier. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | | igbvf: Use ETH_ALENJoe Perches2012-03-192-9/+2
|/ / | | | | | | | | | | | | | | Remove an unnecessary #define and use memcpy instead of a loop to copy an ethernet address. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ixgbe: always write DMA for single_mapped value with skbAlexander Duyck2012-03-172-118/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it so that we always write the DMA address for the skb itself on the same tx_buffer struct that the skb is written on. This way we don't need the MAPPED_AS_PAGE flag and we always know it will be the first DMA value that we will have to unmap. In addition I have found an issue in which we were leaking a DMA mapping if the value happened to be 0 which is possible on some platforms. In order to resolve that I have updated the transmit path to use the length instead of the DMA mapping in order to determine if a mapping is actually present. One other tweak in this patch is that it only writes the olinfo information on the first descriptor. As it turns out it isn't necessary to write it for anything but the first descriptor so there is no need to carry it forward. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Write gso_segs and bytcount to the ring soonerAlexander Duyck2012-03-172-25/+21
| | | | | | | | | | | | | | | | | | | | This change makes it so that gso_segs and bytecount are written to the ring sooner. This helps to simplify the logic for the two since segmentation offloads can now update them within their own function. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Place skb on first buffer_info structure to avoid using stack spaceAlexander Duyck2012-03-173-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | Instead of keeping a local copy of the skb on the stack for as long as long as we do it makes sense to instead just place it on the first tx_buffer structure so that we can save space on the stack and avoid unnecessary read/write operations copying the pointer out of the stack and onto the ring later. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Use packets to track Tx completions instead of a seperate valueAlexander Duyck2012-03-172-5/+1
| | | | | | | | | | | | | | | | | | | | A separate value was added to track Tx completions in order to determine if the Tx unit was hung. However we can do the same thing using the number of packets completed without having to add another stat to the Tx ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Modify setup of descriptor flags to avoid conditional jumpsAlexander Duyck2012-03-171-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it more likely that the descriptor flags setup will use cmov instructions instead of conditional jumps when setting up the flags. The advantage to this is that the code should just flow a bit more smoothly. To do this it is necessary to set the TX_FLAGS_CSUM bit in tx_flags when doing TSO so that we also do the checksum in addition to the segmentation offload. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Make certain that all frames fit minimum size requirementsAlexander Duyck2012-03-171-1/+17
| | | | | | | | | | | | | | | | | | This change makes certain that any packet we attempt to transmit will meet minimum size requirements for the hardware. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: cleanup logic in ixgbe_change_mtuAlexander Duyck2012-03-171-8/+12
| | | | | | | | | | | | | | | | | | | | This change is meant to just cleanup the logic in ixgbe_change_mtu since we are making it unnecessarily complex due to a workaround required for 82599 when SR-IOV is enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Replace standard receive path with a page based receiveAlexander Duyck2012-03-173-430/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the existing Rx hot-path in the ixgbe driver with a new implementation that is based on performing a double buffered receive. The ixgbe driver already had something similar in place for its' packet split path, however in that case we were still receiving the header for the packet into the sk_buff. The big change here is the entire receive path will receive into pages only, and then pull the header out of the page and copy it into the sk_buff data. There are several motivations behind this approach. First, this allows us to avoid several cache misses as we were taking a set of cache misses for allocating the sk_buff and then another set for receiving data into the sk_buff. We are able to avoid these misses on receive now as we allocate the sk_buff when data is available. Second we are able to see a considerable performance gain when an IOMMU is enabled because we are no longer unmapping every buffer on receive. Instead we can delay the unmap until we are unable to use the page, and instead we can simply call sync_single_range on the half of the page that contains new data. Finally we are able to drop a considerable amount of code from the driver as we no longer have to support 2 different receive modes, packet split and one buffer. This allows us to optimize the Rx path further since less branching is required. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Support RX-ALL feature flag.Ben Greear2012-03-171-2/+23
| | | | | | | | | | | | | | | | | | | | | | This allows the NIC to receive all frames available, including those with bad FCS, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Support sending custom Ethernet FCS.Ben Greear2012-03-171-0/+3
| | | | | | | | | | | | | | | | | | Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | igb: Support RX-ALL feature flag.Ben Greear2012-03-172-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | This allows the NIC to receive all frames available, including those with bad FCS, un-matched vlans, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | igb: Support sending custom Ethernet FCS.Ben Greear2012-03-171-0/+4
| | | | | | | | | | | | | | | | | | Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: dcb: use DCB config values for FCoE traffic class on openJohn Fastabend2012-03-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabling and enabling DCB can cause FCoE hardware initialization to occur on the incorrect traffic class when the up2tc mapping has not yet been reconfigured. Fix this by using the DCB configuration maps that are correct and will be pushed at mqprio after DCB driver setup completes successfully. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Fix race condition where RX buffer could become corrupted.Atita Shirwaikar2012-03-146-24/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition in the reset path where the RX buffer could become corrupted during Fdir configuration.This is due to a HW bug.The fix right now is to lock the buffer while we do the fdir configuration.Since we were using similar workaround for another bug, I moved the existing code to a function and reused it.HW team also recommended that IXGBE_MAX_SECRX_POLL value be changed from 30 to 40.The erratum for this bug will be published in the next release 82599 Spec Update Signed-off-by: Atita Shirwaikar <atita.shirwaikar@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: use typed min/max functions where possibleJesse Brandeburg2012-03-142-8/+8
| | | | | | | | | | | | | | | | using the form min((int)var, ver)) is replaced by min_t(int, ...) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: fix obvious return value bug.Don Skidmore2012-03-141-1/+2
| | | | | | | | | | | | | | | | | | This is clearly a typeo where we are not checking the return value from get_link_capabilities but should. This patch corrects that. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Replace eitr_low and eitr_high with static values in ixgbe_update_itrAlexander Duyck2012-03-142-17/+8
| | | | | | | | | | | | | | | | | | | | | | There isn't much point in using variables to store the values of eitr_low and eitr_high since they are not user changeable. As such I am replacing them with the constants 10 and 20 in order to avoid any confusion on what the values actually are. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Do not disable read relaxed ordering when DCA is enabledAlexander Duyck2012-03-144-42/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous fix had gone though and disabled relaxed ordering for Rx descriptor read fetching. This was not necessary as this functions correctly and has no ill effects on the system. In addition several of the defines used for the DCA control registers were incorrect in that they indicated descriptor effects when they actually had an impact on either data or header write back. As such I have update these to correctly reflect either DATA or HEAD. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgb: Remove unnecessary defines, use pr_debugJoe Perches2012-03-142-14/+2
| | | | | | | | | | | | | | | | | | | | | | Use the current logging styles. Remove unnecessary _DEBUG_DRIVER_ and PFX, use pr_debug. Coalesce format. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Simplify logic for ethtool loopback frame creation and testingAlexander Duyck2012-03-121-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes it a bit easier to do the loopback frame creating and testing. Previously we were doing an and to drop the last bit, and then dividing the frame_size by 2 in order to get locations for frame bytes and testing. Instead we can simplify it by just shifting the register one bit to the right and using that for the frame offsets. This change also replaces all instances of rx_buffer_info with just rx_buffer since that is closer to the name of the actual structure being used and can save a few extra characters. In addition I have updated the logic for cleaning up a test frame so that we pass an rx_buffer instead of the sk_buff. The main motivation behind this is changes that will replace the sk_buff with just a page in the future. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Add iterator for cycling through rings on a q_vectorAlexander Duyck2012-03-122-8/+12
| | | | | | | | | | | | | | | | | | | | Since there are multiple spots where we have to cycle through all of the rings on a q_vector it makes sense to just add a function for iterating through all of them. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Allocate rings as part of the q_vectorAlexander Duyck2012-03-123-257/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the rings a part of the q_vector directly instead of indirectly. Specifically on x86 systems this helps to avoid any cache set conflicts between the q_vector, the tx_rings, and the rx_rings as the critical stride is 4K and in order to cross that boundary you would need to have over 15 rings on a single q_vector. In addition this allows for smarter allocations when Flow Director is enabled. Previously Flow Director would set the irq_affinity hints based on the CPU and was still using a node interleaving approach which on some systems would end up with the two values mismatched. With the new approach we can set the affinity for the irq_vector and use the CPU for that affinity to determine the node value for the node and the rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Drop unnecessary napi_schedule_prep and spare blank line from ixgbe_intrAlexander Duyck2012-03-121-5/+2
| | | | | | | | | | | | | | | | | | | | This patch is a minor cleanup to address the unnecessary use of napi_schedule_prep in ixgbe_intr and to also remove a blank line that is not needed since it is separating a comment from the line it is explaining. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Default to queue pairs when number of queues is less than CPUsAlexander Duyck2012-03-122-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | The old code had several errors in how it was determining the vector budget. In order to simplify things this patch updates the code so that it will attempt to always allocated paired Rx/Tx vectors instead of attempting to allocate individual vectors when the number of queues is less than the number of CPUs. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Correct Adaptive Interrupt Moderation so that it will change valuesAlexander Duyck2012-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | This change corrects an issue in which Adaptive Interrupt Moderation was not changing values due to the fact that we were performing an and operation on the resultant value that was causing the value to never change from the default 20K interrupts per second. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Address issues with Tx WHTRESH value not being set correctlyAlexander Duyck2012-03-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This change is meant to address the fact that the tx_itr_setting was dropping to 0 when no separate Tx vectors were provided. This had resulted in the driver incorrectly configuring the Tx ring with a WTHRESH of 1 in order to avoid Tx hangs even though that was not necessary. This change makes it so that we instead take a look at the Tx ring's q_vector to determine if the ring will have an ITR value less than 8us. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Reorder adapter contents for better cache utilizationAlexander Duyck2012-03-121-46/+48
| | | | | | | | | | | | | | | | | | This change moves several frequently accessed items together into one cache line in order to reduce cache misses in the hot-path. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: Do no clear Tx status bits since eop_desc provides enough infoAlexander Duyck2012-03-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There isn't any need to clear the status bits in the descriptors due to the fact that the eop_desc provides enough information for us to know that we have cleaned to the last packet that the software has put on the ring. The status bits are cleared as a part of putting the frame on the ring so as long as we do not read the descriptor bit prior to reading the value eop_desc we should be able to guarantee that we will not clean beyond the end of the current data stream. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF stateAlexander Duyck2012-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are seeing dev_watchdog hangs on several drivers. I suspect this is due to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link change, and then not being cleared by netdev_tx_reset_queue. This change corrects that. In addition we were seeing dev_watchdog hangs on igb after running the ethtool tests. We found this to be due to the fact that the ethtool test runs the same logic as ndo_start_xmit, but we were never clearing the XOFF flag since the loopback test in ethtool does not do byte queue accounting. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: add support for byte queue limitsAlexander Duyck2012-03-122-0/+12
| | | | | | | | | | | | | | | | | | This adds support for byte queue limits (BQL). Based on patch from Eric Dumazet for igb. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com>
* | ixgbe: remove tie between NAPI work limits and interrupt moderationJeff Kirsher2012-03-121-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted by Ben Hutchings and David Miller, work limits for NAPI should not be tied to interrupt moderation parameters. This should be handled by NAPI, possibly through sysfs. Neil Horman & Stephen Hemminger are working on a solution for NAPI currently. In the meantime, remove this tie between work limits and interrupt moderation. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
* | igb: fix ethtool offline testJeff Kirsher2012-03-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug was introduced with the following patch: Commmit bdbc063129e811264cd6c311d8c2d9b95de01231 Author: Eric Dumazet <eric.dumazet@gmail.com> igb: Add support for byte queue limits. The ethtool offline tests will cause a perpetual link flap, this is because the tests also need to account for byte queue limits (BQL). CC: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
* | net: dcb: getnumtcs()/setnumtcs() should return an intJohn Fastabend2012-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {g|s}etnumtcs() today returns a u8 that is only used by the DCB code to verify no error occurred. Today the driver implementations return negative error codes which end up being non-zero so the logic works out but triggers some sparse warnings. To fix the sparse warnings convert the return value to an int. CC: Eilon Greenstein <eilong@broadcom.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | ixgbe: dcb: check setup_tc return codesJohn Fastabend2012-03-021-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dcb netlink code calls setup_tc to init hardware traffic classes to use for DCB. At some call sites the return values are not checked for errors and in one case may return -EINVAL back to the net/dcbnl.c caller which is expecting a u8. This fixes some smatch hits and although failures are never seen in practive its best to check return codes. Reported-by: Dan Carenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | e100: Show short v/s long rx length errors in ethtool stats.Ben Greear2012-03-021-0/+3
| | | | | | | | | | | | Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>