aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
AgeCommit message (Collapse)Author
2015-03-09i40e: Remove "hello world" strings from i40e driverGreg Rose
While using the Linux "strings" command I found these two strings in the driver. There's no need for them and they're kinda silly. Change-ID: I4e19b02983d48b631e9a9979f49790492845f221 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/rocker/rocker.c The rocker commit was two overlapping changes, one to rename the ->vport member to ->pport, and another making the bitmask expression use '1ULL' instead of plain '1'. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-26i40e: Fix memory leak at failure path in i40e_dbg_command_write()Alexey Khoroshilov
The patch fixes a leak of 'cmd_buf' when copy_from_user() failed in i40e_dbg_command_write(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> 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 Parikh
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-23i40e: rename debugfs clear_stats optionShannon Nelson
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-01-16i40e: Dump Stats string removed from debugfs help commandSravanthi Tangeda
Dump Stats string has been removed from functional debugfs help message. Now it does not show up when we echo command to debugfs/Fortville queue. Change-ID: I9333473826b574f1afa6ddb785fd7adfbdcb2884 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-31i40e: Fix possible memory leak in i40e_dbg_dump_descJoe Perches
I didn't notice that return in the code, fix it by adding a goto out instead to free the memory. Fixes: > New smatch warnings: > drivers/net/ethernet/intel/i40e/i40e_debugfs.c:832 i40e_dbg_dump_desc() warn: possible memory leak of 'ring' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-06i40e: Reduce stack in i40e_dbg_dump_descJoe Perches
Reduce stack use by using kmemdup and not using a very large struct on stack. In function ‘i40e_dbg_dump_desc’: warning: the frame size of 8192 bytes is larger than 2048 bytes [-Wframe-larger-than=] Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-06i40e: allow various base numbers in debugfs aq commandsShannon Nelson
Use the 'i' rather than the more restrictive 'x' or 'd' in the aq_cmd arguments. This makes the user interface much more forgiving and user friendly. Change-ID: I5dcd57b9befc047e06b74cf1152a25a3fa9e1309 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-18i40e: Add support to firmware CEE DCBX modeNeerav Parikh
This patch allows i40e driver to query and use DCB configuration from firmware when firmware DCBX agent is in CEE mode. Change-ID: I30f92a67eb890f0f024f35339696e6e83d49a274 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-By: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-03i40e: remove debugfs dump statsShannon Nelson
The debugfs dump stats wasn't being kept up-to-date, was redundant with the ethtool output, and didn't offer any useful additional info. Rather than continue trying to keep them aligned, just remove the debugfs command. Change-ID: Id130ed9aef01c6369ab662c7b4c5ec5b1dbc5b40 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Patrick Lu <patrick.lu@intel.com> Tested-by: Jim Young <Jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-27i40e/i40evf: Ignore a driver perceived Tx hang if the number of desc pending < 4Anjali Singhai Jain
We are seeing situations where the driver sees a hang with less than 4 desc pending, if the driver chooses to ignore it the queue progresses forward and the stack never experiences a real hang. With this patch we will log a stat when this situation happens "tx_sluggish" will increment and we can see some more details at a higher debug level. Other than that we will ignore this particular case of Tx hang. Change-ID: I7d1d1666d990e2b12f4f6bed0d17d22e1b6410d5 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-08-02i40e: Adds FCoE related code to i40e core driverVasu Dev
Adds FCoE specific code to existing i40e core driver to:- 1. have separate FCoE VSI with additional FCoE queues pairs. 2. have FCoE related hash defines. 3. have additional FCoE related stats code. 4. export and then re-use existing functions required by FCoE build. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-24i40e: fix format mismatch in drivers/net/ethernet/intel/i40e/i40e_debugfs.cToralf Förster
spotted by cppcheck Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-26i40e: Add debugfs hooks to print current total FD filter countAnjali Singhai Jain
"fd current cnt" can be used to print the total filters consumed by this interface, this includes guaranteed and best effort filters. Change-ID: I2c417810c4999ce1388d2ea26f8e69679ba33966 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-19i40e: debugfs fix to dump remote LLDPDUNeerav Parikh
Fix the debugfs command "lldp get remote" that dumped the local LLDPDU instead of peer's LLDPDU. Change-ID: I0702eacdafd54478c18f20cab3a7fa5dc1b3182d Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08i40e: allow for more VSIsMitch Williams
The number of VSIs that the firmware reports to us is a guaranteed minimum, not an absolute maximum. The hardware actually supports far more than the reported value, which we often need. To allow for this, we allocate space for a larger number of VSIs than is guaranteed by the firmware, with the knowledge that we may fail to get them all in the future. Note that we are just allocating pointers here, the actual (much larger) VSI structures are allocated on demand. Change-ID: I6f4e535ce39d3bf417aef78306e04fbc7505140e Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05i40e/i40evf: remove rx_errors and rx_missedShannon Nelson
The rx_errors (GLV_REPC) and rx_missed (GLV_RMPC) were removed from the chip design. Change-ID: Ifdeb69c90feac64ec95c36d3d32c75e3a06de3b7 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-04-28i40e: Do not expose fd-sb commands from debugfsAnjali Singhai Jain
Ethtool -k/-K can handle this so we do not need it in debugfs. Change-ID: I9df692f10a60b71805f8f48d3b87c7da3820b2aa Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-28i40e: check for netdev before debugfs useShannon Nelson
Make sure the VSI has a netdev before trying to use it in the debugfs netdev_ops commands. Change-ID: I2d744fc0c32b3226534ce2cde171d9675c5440a6 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-14i40e: Add code to handle FD table full conditionAnjali Singhai Jain
Add code to enforce the following policy: - If the HW reports filter programming error, we check if it's due to a full table. - If so, we go ahead and turn off new rule addition for ATR and then SB in that order. - We monitor the programmed filter count, if enough room is created due to filter deletion/reset, we then re-enable SB and ATR new rule addition. Change-ID: I69d24b29e5c45bc4fa861258e11c2fa7b8868748 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-14i40e: cleanup stringsJesse Brandeburg
This patch cleans up the strings that the driver prints during normal operation and moves many strings into dev_dbg. It also cleans up strings printed during reset. Change-ID: I1835cc4e3c3b22596182b683284e6bb87eac61b2 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-06i40e: Flow Director sideband accountingJoseph Gasparakis
This patch completes implementation of the ethtool ntuple rule management interface. It adds the get, update and delete interface reset. Change-ID: Ida7f481d9ee4e405ed91340b858eabb18a52fdb5 Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-17i40e: add DCB and DCBNL supportNeerav Parikh
This patch adds capability to configure DCB on i40e network interfaces using Intel XL710 adapter firmware APIs. By default all VSIs are only enabled for the default traffic class enabled by firmware for any given PF. The driver would query the firmware for the traffic classes that are enabled for the port and reconfigure the LAN VSI to match to the port traffic class settings. All other VSIs are only enabled for the default traffic class settings for now. The driver registers and listens to firmware events that may require change in the DCB settings. It may reconfigure the VSI settings based on these events. This patch exposes IEEE DCBNL interfaces for the i40e driver to allow any application to query the DCB settings on the adapter. Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-By: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17i40e: refactor flow directorAnjali Singhai Jain
The i40e hardware was generating some inconsistent results when using current programming methods. This refactor fixes the inconsistencies that were preventing clean unloads of the driver, and moves the queues for handling flow director errors into their own hardware VSI. This patch also implements a corrected version of the basic ethtool add ntuple rule, which will disable the driver's automatic flow programming. A future patch adds remove/replay/list support for ntuple. Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16i40e: check desc pointer before printingShannon Nelson
Check that the descriptors were allocated before trying to dump them to the logfile. While we're there, de-trick-ify the code so as to be easier to read and not abusing the types and unions. Change-ID: I22898f4b22cecda3582d4d9e4018da9cd540f177 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-10i40e: fix log message wordingShannon Nelson
Change the redundant "vsi VSI" to VSI. Change-ID: Ic16ea5820a99abc7831713cde39e7d032a7ba4d3 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: shorten wordy fieldsMitch Williams
The alloc_rx_buff_failed and alloc_rx_page_failed variables are both part of an rx specific structure so just remove the _rx part of the name. No functional changes. Change-ID: Icffa2f5d13c6f2b1e09cf45b9472b83c9dae8fc6 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09i40e: Fix GPL headerGreg Rose
The GPL header included in each file in the i40e driver doesn't need to include the "this program" text since this driver is already part of the larger kernel. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-07i40e: Expose AQ debugfs hooksAnjali Singhai Jain
Add more functionality to debugfs to assist development and testing of AQ commands. adds: send aq_cmd send indirect aq_cmd Change-Id: I01710cddd33110a6c1e1aabf84cb6e93cda4c42a Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: fix whitespaceJesse Brandeburg
Trivial whitespace fix. Change-Id: Ib7c70891a33c4b3d200c69367549d0dbdee0f076 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: keep allocated memory in structsDavid Cassard
Save both a pointer to memory and the length in order to store all info about allocated kernel memory. This patch changes some adminq allocations to preserve the full i40e_dma_mem/i40e_virt_mem structs for every allocation. Change-Id: Ibcf96159aba4ba61f839d16d87d19478df28e630 Signed-off-by: David Cassard <david.g.cassard@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: Dump the whole NVM, not halfAnjali Singhai Jain
Debugfs was reading exactly half the number of words, fix it. Change-Id: Ieb217f3c6dca455d44e50a0dc61a6664c0cb2265 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: Fix off by one in i40e_dbg_command_writeAlan Cox
We assume that the resulting buffer is zero terminated when we then re-use it. The sscanf is limited to 512 bytes but needs to be 511 to allow for a terminator. One of a set of problems noted by Jackie Chang Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Shannon Nelson <Shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: more print_hex_dump useShannon Nelson
Take advantage of print_hex_dump() in another couple places to clean up the code. Change-Id: Ib618e75f928308c0afd0d8d74105da0c6577a024 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: fix up scanf decodersShannon Nelson
Fix up a couple of scanfs to accept various base numbers instead of silently requiring hex. Change-Id: I1cc4dffbb1d011bf603cbf34a8db093da57fad7a Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: simplify error messages for dump descriptorShannon Nelson
debugfs fixes: We don't really need to give usage messages for data errors, only for invalid command errors. Change-Id: If3f74ac49e43c3ced7fd388323fa738ac145e055 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: prevent null pointer exception in dump descriptorShannon Nelson
Check that rings were allocated before trying to reference them. Change-Id: I33151e55ab7a7a305fecdb88ccb2709ac246b7c7 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-17i40e: Fix dump output from debugfs callsNeerav Parikh
The debugfs commands that dump hex information are not doing these as expected viz. "lldp get local", "nvm read", "dump debug fwdata", etc. Use print_hex_dump() instead to hex dump and remove the print buffer stuff from the code. Change-Id: I507bd8b2187aae8bad5055b7872978c309cf143e Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-16i40e: rtnl_lock in reset path fixesAnjali Singhai Jain
Any user-initiated path which eventually calls reset needs to hold the rtnl_lock, so add functionality to do that. Be careful not to use the safe reset when cleaning up from the diagnostic tests, which avoids rtnl_lock recursion from ethtool. Protect the reset_task with rtnl_lock, since it runs from a work item. Change-Id: Ib6e7a3fb2966809db2daf35fd5a123ccdf6f6f0f Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-12-05i40e: add support for triggering EMPRShannon Nelson
Allow debugfs to trigger a reset called EMPR. Change-Id: I2f6600a8242759ec60c8198d03f70c2b774e0740 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-22i40e: check vsi ptrs before dumping themShannon Nelson
Make sure there really are rings and queues before trying to dump information in them. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-22i40e: reorder block declarations in debugfsShannon Nelson
This is a cleanup of the local variables declared at the beginning of each function. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-22i40e: fix use of untrusted scalar value warningJesse Brandeburg
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 <jesse.brandeburg@intel.com> CC: Hannes Frederic Sowa <hannes@stressinduktion.org> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-22i40e: clamp debugfs nvm read commandJesse Brandeburg
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 <jesse.brandeburg@intel.com> CC: Hannes Frederic Sowa <hannes@stressinduktion.org> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-22i40e: debugfs fixupsJesse Brandeburg
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 <jesse.brandeburg@intel.com> CC: Hannes Frederic Sowa <hannes@stressinduktion.org> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-09i40e: Move rings from pointer to array to array of pointersAlexander Duyck
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 <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-09i40e: Move q_vectors from pointer to array to array of pointersAlexander Duyck
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 <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-09i40e: Split bytes and packets from Rx/Tx statsAlexander Duyck
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 <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-09i40e: Drop unused completed statAlexander Duyck
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 <alexander.h.duyck@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>