aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ixgbevf/ethtool.c
AgeCommit message (Collapse)Author
2015-07-23ixgbevf: add support for reporting RSS key and hash table for X550Emil Tantilov
This patch extends the reporting of the RSS key and hash table by adding support for X550 VFs. The difference is that X550 VFs have their own registers for RSS key and indirection table, so there is no need to query the PF. The RSS key and indirection table are stored in the adapter structure during the configuration of VFRSSRK and VFRETA which in turn can be used in ethtool for reporting. The logic for writing VFRETA is also changed to make sure that the indirection table is reported correctly. In addition this patch adds defines for the VFRETA entries and number of VFRSSRK registers as well as some whitespace cleanups. Reported-by: Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-11ixgbevf: Add the appropriate ethtool ops to query RSS indirection table and keyVlad Zolotarov
Added get_rxfh_indir_size, get_rxfh_key_size and get_rxfh ethtool_ops callbacks implementations. This enables the ethtool's "-x" and "--show-rxfh[-indir]" options for VF devices. This patch adds the support for 82599 and x540 devices only. Support for other devices will be added later. Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-13ixgbevf: Fix code comments and whitespaceJeff Kirsher
Fix the code comments to align with drivers/net/ code commenting style, as well as whitespace issues. The whitespace issues resolve checkpatch errors, like lines exceeding 80 chars (except for strings) and the use of tabs where possible. CC: <kernel-team@fb.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
2014-09-12ixgbevf: Resolve missing-field-initializers warningsMark Rustad
Resolve missing-field-initializers warnings by using designated initialization. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-06net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriateJiri Pirko
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-31ixgbevf: Change ixgbe_read_reg to ixgbevf_read_regMark Rustad
Change the ixgbe_read_reg function name to ixgbevf_read_reg to avoid a namespace clash with the ixgbe driver. This will allow ixgbe to take its register read function out-of-line to reduce memory footprint. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-21ixgbevf: Additional adapter removal checksMark Rustad
Additional checks are needed for a detected removal not to cause problems. Some involve simply avoiding a lot of stuff that can't do anything good, and also cases where the phony return value can cause problems. In addition, down the adapter when the removal is sensed. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-21ixgbevf: Make the ethtool register test use accessorsMark Rustad
Make the ethtool register test use the normal register accessor functions. Also eliminate macros used for calling register test functions to make error exits clearer. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-17ixgbevf: add tx countersEmil Tantilov
This patch adds counters for tx_restart_queue and tx_timeout_count. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17ixgbevf: remove counters for Tx/Rx checksum offloadEmil Tantilov
This patch removes the Tx/Rx counters for checksum offload. The Tx counter was never updated and the Rx counter is of limited use. This is in effort to clean up the counters and make them consistent with the counters shown by ixgbe. Also this patch removes some members of the adapter structure that were never used and shuffles others to reduce number of holes. before: /* size: 1568, cachelines: 25, members: 48 */ /* sum members: 1519, holes: 10, sum holes: 43 */ /* padding: 6 */ /* last cacheline: 32 bytes */ after: /* size: 1480, cachelines: 24, members: 43 */ /* sum members: 1479, holes: 1, sum holes: 1 */ /* last cacheline: 8 bytes */ Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17ixgbevf: move ring specific stats into ring specific structureEmil Tantilov
This patch moves hot-path specific statistics into the ring structure. This allows us to drop the adapter structure in some functions and should help with performance. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17ixgbevf: make use of the dev pointer in the ixgbevf_ring structEmil Tantilov
This patch cleans up the code by removing the adapter structure as parameter from multiple functions. The adapter structure was previously being used to access the dev pointer, but this can also be done via the ixgbevf_ring structure. This way we can drop the adapter as parameter from these functions. This patch also includes small cleanups in some error code paths. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-16ixgbevf: Convert ring storage form pointer to an array to array of pointersDon Skidmore
This will change how we store rings arrays in the adapter sturct. We use to have a pointer to an array now we will be using an array of pointers. This will allow us to support multiple queues on muliple nodes at some point we would be able to reallocate the rings so that each is on a local node if needed. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-29ixgbevf: Add zero_base handler to network statisticsDon Skidmore
This patch removes the need to keep a zero_base variable in the adapter structure. Now we just use two different macros to set the non-zero and zero base. This adds to readability and shortens some of the structure initialization under 80 columns. The gathering of status for ethtool was slightly modified to again better fit into 80 columns and become a bit more readable. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-29ixgbevf: add BP_EXTENDED_STATS for CONFIG_NET_RX_BUSY_POLLJacob Keller
This patch adds the extended statistics similar to the ixgbe driver. These statistics keep track of how often the busy polling yields, as well as how many packets are cleaned or missed by the polling routine. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-24ixgbevf: implement ethtool get/set coalesceJacob Keller
This patch adds support for ethtool's get_coalesce and set_coalesce command for the ixgbevf driver. This enables dynamically updating the minimum time between interrupts. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-01ixgbevf: do not print registers to dmesg in ixgbevf_get_regsJacob Keller
This patch removes the use of hw_dbg in ixgbevf when the ixgbe_get_regs function is called from ethtool. This goes along side a patch to ethtool which enables proper support for ixgbevf pretty-printing of registers. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-28ixgbevf: Make sure link status and speed are fetchedGreg Rose
A recent change makes it necessary to set get_link_status to ensure that the driver fetches the correct, refreshed value for link status and speed when it has changed in the physical function device. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-18ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparamAlexander Duyck
In ixgbevf_get_ringparam we could run into a NULL pointer dereference if the rings were not allocated when we attempted the call. To prevent that we can just access the tx/rx_ring_count values instead of attempting to access the rings to get the count. This change corrects a memory leak and memory corruption in ixgbevf_set_ringparam. The memory leak was due to us not freeing the resources from the ring before overwriting them. This change corrects the memory leak by making certain to call ixgbe_free_tx/rx_resources on the rings prior to freeing them. The memory corruption was because we were replacing the rings but not updating the q_vectors. It addresses the memory corruption by leaving the rings in place and instead just copying the contents of the new rings into the existing rings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-18ixgbevf: Add netdev to ring structureAlexander Duyck
This change adds the netdev to the ring structure. This allows for a quicker transition from ring to netdev without having to go from ring to adapter to netdev. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Move Tx clean-up into NAPI contextAlexander Duyck
Currently the VF driver is processing all of the transmits in interrupt context. This can be messy since the Rx is all handled in NAPI and this may result in interrupts being disabled. In order to resolve this move all of the Tx packet processing into NAPI and combine all of the interrupt and polling routines into just a pair of functions. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-17ixgbevf: Drop all dead or unnecessary codeAlexander Duyck
There is a large amount of code present in this driver to support features that either do no exist or are not supported such ask packet split, DCA, or RSC. This patch strips out almost all of that code and in the case of conditionals based on unused flags I am flatting the code out to just the path that would have been selected. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-05-03ixgbevf: Add support to recognize 100mb link speedGreg Rose
The X540 10Gig controller is capable of linking at 100Mbits - add support for reporting that link speed. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-03ixgbevf: Update copyright noticesGreg Rose
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Robert E Garrett <robertX.e.garrett@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-01-19ixgbevf: make ethtool ops and strings constStephen Hemminger
Signed-off-by: Stephen Hemminger <shemminger@vyatta.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>
2011-11-22Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a ↵Rick Jones
number of drivers Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to fw_version in various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16ixgbevf: Convert printks to pr_<level>Jeff Kirsher
Based on the original patch from Joe Perches <joe@perches.com> Use the current logging styles, prefix output with "ixgbevf: " Add #define pr_fmt Coalesce formats. -v2 Fix-up to make checkpatch.pl compliant and remove change to copyright line CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Sibai Li <sibai.li@intel.com>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-26ixgbevf: convert to ndo_fix_featuresMichał Mirosław
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM. Removing this needs deeper surgery. Since ixgbevf doesn't change hardware state on RX csum enable/disable its reset is avoided. Things noticed: - HW VLAN acceleration probably can be toggled, but it's left as is - the resets on RX csum offload change can probably be avoided - there is A LOT of copy-and-pasted code here Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10intel: Move the Intel wired LAN driversJeff Kirsher
Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>