aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-25net: dsa: Ensure that port array elements are initialized before being usedGuenter Roeck3-17/+13
A network device notifier can be called for one or more of the created slave devices before all slave devices have been registered. This can result in a mismatch between ds->phys_port_mask and the registered devices by the time the call is made, and it can result in a slave device being added to a bridge before its entry in ds->ports[] has been initialized. Rework the initialization code to initialize entries in ds->ports[] in dsa_slave_create. With this change, dsa_slave_create no longer needs to return slave_dev but can return an error code instead. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24i40e/i40evf: Update driver versionsSravanthi Tangeda2-3/+3
Bump i40e to 1.2.9 and i40evf 1.2.3 Also update the copyright year. Change-ID: I345d777e94abd0acffe6a28793f675d251a86299 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40evf: Add more info to interrupt vector namesCarolyn Wyborny1-1/+2
This patch adds the netdev name to the VF misc vector name. Without this patch, all the interrupts show the same info, so it difficult to distinguish them. Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Use ethtool private flags to display NPAR statusGreg Rose2-0/+44
Allow an application to query the i40e driver's private flags to get the status of NPAR enablement. This will be used by applications to determine if there are NPAR specific features available. Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Set FLAG_RD when sending buffer FW must readKevin Scott1-1/+1
Set FLAG_RD for send_driver_version AQ command. Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: print Rx packet split statusMitch Williams1-2/+4
Add the RX routine in use to the features log message. Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: setup FCoE device typeVasu Dev1-0/+6
Setup FCoE netdev device type as "fcoe", so that it shows up in sysfs as FCoE device. Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Set BUF flag for Set Version AQ commandKevin Scott1-1/+1
BUF flag must be set for indirect AQ command. Change-ID: I6819718a47baf69d1a91ebaed89f735ed6e86025 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add support for getlink, setlink ndo opsNeerav Parikh6-22/+196
Add support for bridge offload ndo_ops getlink and setlink to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE. The support is only enabled in case of a PF VSI and not available for any other VSI type. By default the i40e driver inserts a bridge as part of the bring-up when a FDIR type VSI and/or a FCoE VSI is created. This bridge is created in VEB mode by default i.e. after creating the bridge using "Add VEB" AQ command the loopback for the PF's default VSI is enabled. The patch adds capability where all the VSIs created as downlink to the bridge inherits the loopback property and enables loopback only if the uplink bridge is operating in VEB mode. Hence, there is no need to explicitly enable loopback as part of allocating resources for SR-IOV VFs and call to do that has been removed. In case a user-request is made either via "bridge" utility or using the bridge netlink interface that requires to change the hardware bridge mode then that would require a PF reset and rebuild of the switch hierarchy. Also update the copyright year. Change-ID: I4d78fc1c83158efda29ba7be92239b74f75d6d25 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Implement configfs for NPAR BW configurationGreg Rose4-8/+369
Add configfs controls to get, set and commit NPAR BW configurations. We export three controls: min_bw - Can take a value from 0 to 100 inclusive max_bw - Can take a value from 1 to 100 inclusive commit - A write-only control that accepts only a value of 1 and will cause the BW settings to be permanently committed to NVM so that they are persistent across power cycles and system resets The BW values are relative and are expressed as percentages. For more information on the interpretation of the BW settings see the Dell specifications for NPAR. Also update the copyright year. Change-ID: Id7496ca65630b5037e32ba6a5a748fbc1632881b Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-By: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add NPAR BW get and set functionsGreg Rose5-1/+273
We need to be able to get, set and commit permanently the NPAR partition BW configuration through configfs. These are necessary precursor functions for that feature. Also update the copyright year. Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: enable packet split only when IOMMU presentMitch Williams2-2/+7
When an IOMMU is in use, the packet split receive path shows a distinct advantage over the single-buffer path because it minimizes DMA mapping and unmapping. However, this is not an advantage for systems with no IOMMU. At init time, check to see if an IOMMU is enabled and enable packet split receives. Change-ID: I4f70d2e9c31bbea3dc8fd0c5734959a6e6602210 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40evf: allow enabling of debug prints via ethtoolAshish Shah1-2/+4
Copy setting from ethtool to the HW specific struct to actually enable prints. Change print from i40e to i40evf to differentiate drivers in bare metal scenarios. Also update the copyright year. Change-ID: I06fee26247299a08f2e1c70fc811a9ea0931c4dd Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e: Add method to keep track of current rxnfc settingsCarolyn Wyborny2-1/+12
This patch adds a struct to the VSI struct to keep track of rxnfc settings done via ethtool. Without this patch, the device can only list the options available, not the current settings and this is not clear to the user. Without current settings, the available settings never changing looks like a bug. Also update the copyright year. Change-ID: I087bbfdb33b330496a671630a7586773e3b3e589 Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settingsCatherine Sullivan4-124/+173
Add a requested speed variable to the link_status struct to store the last speeds we requested from the firmware (the speeds the FW will be advertising with if autoneg is enabled). Use the advertised speed settings in get_settings in ethtool now that we have it. Also set the requested speed settings in set_settings in ethtool as they are requested and initialize them in probe based on what the firmware remembers as the last requested speeds. To accommodate some longer lines in this new code, and improve readability I have added two functions i40e_get_settings_link_up and i40e_get_settings_link_down which get_settings now calls first. It then does all of the settings that happen regardless of link state. Some PHY types that supported the same settings were also combined. Also update the copyright year. Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24i40e/i40evf: Fix output of i40e_debug_aq() for big endian machinesPaul M Stillwell Jr2-23/+37
The function i40e_debug_aq() prints information helpful in debugging admin queue commands, but it doesn't do so correctly on big endian machines. This patch adds the appropriate LExx_TO_CPU wrappers for big endian architectures. Also update the copyright year. Change-ID: I4b2dc229ed5bf6dfe35632a58cddf53c21aff4b0 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24net: via-rhine: add BQL supportTino Reichardt1-9/+20
Add Byte Queue Limits (BQL) support to via-rhine driver. [edumazet] tweaked patch and changed TX_RING_SIZE from 16 to 64 Signed-off-by: Tino Reichardt <milky-kernel@mcmilk.de> Tested-by: Jamie Gloudon <jamie.gloudon@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24ipv6: remove dead debug code from ip6_tunnel.cIan Morris1-6/+0
The IP6_TNL_TRACE macro is no longer used anywhere in the code so remove definition. Signed-off-by: Ian Morris <ipm@chirality.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24bonding: Implement port churn-machine (AD standard 43.4.17).Mahesh Bandewar3-7/+122
The Churn Detection machines detect the situation where a port is operable, but the Actor and Partner have not attached the link to an Aggregator and brought the link into operation within a bound time period. Under normal operation of the LACP, agreement between Actor and Partner should be reached very rapidly. Continued failure to reach agreement can be symptomatic of device failure. Actor-churn-detection state-machine Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> =================================== BEGIN=True + PortEnable=False | v +------------------------+ ActorPort.Sync=True +------------------+ | ACTOR_CHURN_MONITOR | ---------------------> | NO_ACTOR_CHURN | |========================| |==================| | ActorChurn=False | ActorPort.Sync=False | ActorChurn=False | | ActorChurn.Timer=Start | <--------------------- | | +------------------------+ +------------------+ | ^ | | ActorChurn.Timer=Expired | | ActorPort.Sync=True | | | +-----------------+ | | | ACTOR_CHURN | | | |=================| | +--------------> | ActorChurn=True | ------------+ | | +-----------------+ Similar for the Partner-churn-detection. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24bonding: Verify RX LACPDU has proper dest mac-addrMahesh Bandewar1-0/+3
The 802.1AX standard states: "The DA in LACPDUs is the Slow_Protocols_Multicast address." This patch enforces that and drops LACPDUs with destination MAC addresses other than Slow_Protocols_Multicast address Signed-off-by: Mahesh Bandewar <maheshb@google.com> Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24net: bcmgenet: rename bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNTPetri Gynther2-15/+16
bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNT are used only in Tx init. Rename them accordingly: - bcmgenet_hw_params->bds_cnt => bcmgenet_hw_params->tx_bds_per_q - GENET_DEFAULT_BD_CNT => GENET_Q16_TX_BD_CNT Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24net: bcmgenet: precalculate TxCB->bd_addrPetri Gynther1-1/+8
There is 1-to-1 mapping between TxCBs and TxBDs. Precalculate TxCB->bd_addr once in bcmgenet_init_dma() instead of doing it over and over needlessly in bcmgenet_get_txcb(). Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24net: bcmgenet: rework Tx queue initPetri Gynther1-46/+35
1. Rename bcmgenet_init_multiq() to bcmgenet_init_tx_queues() 2. Fix bcmgenet_init_tx_queues() function description 3. Move Tx default queue init inside bcmgenet_init_tx_queues() 4. Modify bcmgenet_init_dma() to call bcmgenet_init_tx_queues() Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-24net: bcmgenet: bcmgenet_init_tx_ring() cleanupPetri Gynther1-14/+8
1. Simplify function description 2. Rename function parameter write_ptr to start_ptr to better indicate use 3. Remove unnecessary local variable first_bd 4. Remove out-of-place comment "Unclassified traffic goes to ring 16" 5. Fix TDMA_WRITE_PTR register init Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23pktgen: Correct documentation of module name and commandBen Hutchings1-2/+2
Drop the '.o' suffix so this text properly covers both the built-in and modular cases. 'insmod pktgen' obviously won't work; the command should be modprobe. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Show the results rather than just commenting where they areBen Hutchings8-16/+8
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Trap SIGINTBen Hutchings8-0/+8
Otherwise ^C stops the script, not just pktgen. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Use bash as interpreterBen Hutchings8-8/+8
These scripts use the non-POSIX 'function' and 'local' keywords so they won't work with every /bin/sh. We could drop 'function' as it is a no-op, but 'local' makes for cleaner scripts. Require use of bash. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Remove setting of obsolete max_before_softirq parameterBen Hutchings8-18/+0
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Correct comments about the thread configBen Hutchings8-8/+9
They all claimed to be two CPU examples using eth1, eth2 but that is only true in one case! Rob Jones pointed out spelling and grammar errors here, which I've also corrected. Cc: Rob Jones <rob.jones@codethink.co.uk> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Delete unused function pg()Ben Hutchings8-40/+0
This function is not used and wouldn't do anything useful as pktgen does not have an 'inject' command. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23samples/pktgen: Add sample scripts for pktgen facilityBen Hutchings9-6/+584
These are Robert Olsson's samples which used to be available from <ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/> but currently are not. Change the documentation to refer to these consistently as 'sample scripts', matching the directory name used here. Cc: Robert Olsson <robert@herjulf.se> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23pktgen: Fix grammar errors and some poor wording in documentationBen Hutchings1-26/+30
Thanks to Rob Jones for suggesting some of the changes. Cc: Rob Jones <rob.jones@codethink.co.uk> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23pktgen: Delete the original date from documentationBen Hutchings1-2/+0
This has been updated quite a few times since 2004, and git can keep track of the actual date for us. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-23i40evf: don't wait foreverMitch Williams1-2/+13
Under rare circumstances, after a reset, set_rx_mode might get called while the watchdog is running, which will cause a deadlock on the critical section lock. To correct this, add a counter and give up trying to get the lock after fifty tries. Log a message if this happens but don't take any other action. Because this happens after a reset, all of the Rx filters are still in place and the device won't lose connectivity. We can also get stuck during shutdown, if the PF has stopped communicating with us, or if a reset is occurring. If we can't get the lock after a reasonable amount of time, just error out. Something else bad is happening anyway, so adding this filter is the least of our concern right now. Change-ID: I159731e2a82a06b389ee31b34ce336548e05baa0 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40evf: refactor resetMitch Williams1-10/+31
A recent change to the shutdown flow messed up the reset flow. Since i40evf_down now holds the critical section lock, we cannot call it from the reset handler, which also holds the lock. To do so causes a deadlock accompanied by wailing and gnashing of teeth. This is easily triggered by running an ethtool self-test on the PF device. Instead, we move the relevant portions of i40evf_down into the reset handler and bend them to our will. Additionally, we can optimize the reinit path by not deleting the MAC and VLAN filters and then adding them back again. Instead, we just set the 'add' flag and let the watchdog resynchronize the filter list with the PF driver. We also reword a few messages to make them more consistent with the rest of the driver. Change-ID: I03dd92ae736f7719fca3564b12a2cf9b98c6cb18 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40evf: disable NAPI polling soonerMitch Williams1-2/+1
When closing the interface, disable NAPI polling before any other activities. This fixes an occasional panic during close caused by the driver trying to delete and clean rings at the same time. Change-ID: Ib4d427b13d310258ea85b248d535da70ecf0c1e9 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Fix i40e_ndo_set_vf_spoofchkGreg Rose1-1/+2
The netdev op that allows the operator to turn MAC/VLAN spoof checking on and off did not include the flag for VLAN spoof checking. This patch fixes that problem. Change-ID: Ib4c9e639024a854592d97af22706544881ac3fcb Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Bump Driver VersionsSravanthi Tangeda2-2/+2
Bump i40e to 1.2.8 and i40evf to 1.2.2 Change-ID: I64f47c3367ea8ff2a53068e895d7a1f60726c871 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Remove unused variable an_enable and function update_link_infoCatherine Sullivan6-38/+6
An_enable was never used only set so lets remove it. The function update_link_info only did two things, call get_link_info and set an_enabled. Therefore we should also remove update_link_info and change all references to it to get_link_info. Change-ID: Ie3022680fa7a94bfd495a4f5fc76a73701d85569 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Fix the EMPR interrupt received handlingAnjali Singhai Jain2-4/+3
We shouldn't trigger another EMPR when we receive an EMPR event. This patch handles EMPR event reception with a different state so that we can do the right thing for NVM. Change-ID: I9cac70b3658600f016a65beb6fb157e1c1f9adf9 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: i40e_register.h updatesAnjali Singhai Jain4-74/+50
Some registers have been removed so take them out and stop updating and looking at them. Change-ID: I33da922c8de993a94dd8b8d8a2ae2146b8ca1a27 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: Use #define for the VSI connection typeNeerav Parikh2-4/+4
Use #defined VSI connection type values instead of using magic numbers. Change-ID: I2f6cf7bf394d391e1c0fe61779e9e4ad8858154a Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: restrict VC opcodes to their initial valuesNicholas Nunley2-44/+40
Until the time a more robust versioning scheme is needed/implemented all established virtual channel opcode values should remain consistent between updates to the opcode enum. This patch repositions I40E_VIRTCHNL_OP_CONFIG_RSS to the end of the enum. In its current position this opcode displaces the initial value of I40E_VIRTCHNL_OP_EVENT and will cause PF/VF compatibility issues. Going forward the expectation is either: a) All future opcode additions will be added as the last element of the enum. Once VF drivers start making use of the new commands the virtual channel version will need to be incremented and drivers will need to implement a simple version check whereby VF drivers can only load on PFs with a >= version. b) or, if needed, design and implement a more complicated API negotiation capability. In either case PF drivers should always maintain backwards compatibility with earlier VF driver versions. Change-ID: Ie245daa09a231b6680ed793d648bdcc76caefe58 Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e/i40evf: Refactor the receive routinesMitch Williams6-214/+651
Split the receive hot path code into two, one for packet split and one for single buffer. This improves receive performance since we only need to check if the ring is in packet split mode once per NAPI poll time, not several times per packet. The single buffer code is further improved by the removal of a bunch of code and several variables that are not needed. On a receive-oriented test this can improve single-threaded throughput. Also refactor the packet split receive path to use a fixed buffer for headers, like ixgbe does. This vastly reduces the number of DMA mappings and unmappings we need to do, allowing for much better performance in the presence of an IOMMU. Lastly, correct packet split descriptor types now that we are actually using them. Change-ID: I3a194a93af3d2c31e77ff17644ac7376da6f3e4b Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: rename debugfs clear_stats optionShannon Nelson1-5/+9
Change debugfs command from "clear_stats pf" to "clear_stats port" to be clearer what the action is. Also, limit the action to the base PF, not the NPAR partitions. Change-ID: I22aa39c0962d83a83a985097b1000ed7f8c66f3f Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23i40e: update Shadow RAM read/write functionsKamil Krawczyk2-27/+71
This change is to refactor the read/write functions to support future work. Change-ID: I13150d5e3042f2c617362c0140dc7e6473ebcdee Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23igbvf: cleanup msleep() and min/max() usageJeff Kirsher2-6/+6
Fixed a few cases of when we used msleep() when we should have been using usleep_range(). Also updated the usage of min/max() to use min_t/max_t(). Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
2015-02-23igbvf: Fix code comments and whitespaceJeff Kirsher9-516/+500
Fix the code comments to align with the drivers/net/ commenting style. Also fix other checkpatch errors such as using tabs where possible and properly wrap lines to conform to the 80 char limit (unless it is a string). Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
2015-02-23e1000e: initial support for i219David Ertman9-83/+768
i219 is the next-generation LOM that will be available on systems with the Sunrise Point Platform Controller Hub (PCH) chipset from Intel. This patch provides the initial support for the device. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Tested-by: Carmen Edwards <carmenx.edwards@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>