aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ethtool.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-27sfc: fix flow type handling for RSS filtersEdward Cree1-5/+6
The FLOW_RSS flag was causing us to insert UDP filters when TCP was wanted. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-27sfc: protect list of RSS contexts under a mutexEdward Cree1-23/+43
Otherwise races are possible between ethtool ops and efx_ef10_rx_restore_rss_contexts(). Also, don't try to perform the restore on every reset, only after an MC reboot, otherwise we'll leak RSS contexts on the NIC. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-14sfc: support FEC configuration through ethtoolEdward Cree1-0/+32
As well as 'auto' and the forced 'off', 'rs' and 'baser' states, we also handle combinations of settings (since the fecparam->fec field is a bitmask), where auto|rs and auto|baser specify a preferred FEC mode but will fall back to the other if the cable or link partner doesn't support it. rs|baser (with or without auto bit) means prefer FEC even where auto wouldn't use it, but let FW choose which encoding to use. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-08sfc: support RSS spreading of ethtool ntuple filtersEdward Cree1-19/+134
Use a linked list to associate user-facing context IDs with FW-facing context IDs (since the latter can change after an MC reset). Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-10sfc: support the ethtool ksettings API properly so that 25/50/100G worksEdward Cree1-3/+3
Store and handle ethtool link mode masks within the driver instead of just a single u32. However, quite a significant amount of existing code wants to manipulate the masks directly, and thus now uses the first unsigned long (i.e. mask[0]) as though it were a legacy u32 mask. This is ok because all the bits that code is interested in are in the first 32 bits of the mask; but it might be a good idea to change them in future to use the proper bitmap API. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-09sfc: process RX event inner checksum flagsJon Cooper1-0/+5
Add support for RX checksum offload of encapsulated packets. This essentially just means paying attention to the inner checksum flags in the RX event, and if *either* checksum flag indicates a fail then don't tell the kernel that checksum offload was successful. Also, count these checksum errors and export the counts to ethtool -S. Test the most common "good" case of RX events with a single bitmask instead of a series of ifs. Move the more specific error checking in to a separate function for clarity, and don't use unlikely() there since we know at least one of the bits is bad. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-17sfc: read back RX hash config from the NIC when querying it with ethtool -xEdward Cree1-0/+5
Ensures that we report the key and indirection table the NIC is using, rather than (if setting them failed earlier) what we wanted it to use. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-17sfc: support setting RSS hash key through ethtool APIEdward Cree1-5/+19
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-04sfc: don't report RX hash keys to ethtool when RSS wasn't enabledEdward Cree1-0/+2
If we failed to set up RSS on EF10 (e.g. because firmware declared RX_RSS_LIMITED), ethtool --show-nfc $dev rx-flow-hash ... should report no fields, rather than confusingly reporting what fields we _would_ be hashing on if RSS was working. Fixes: dcb4123cbec0 ("sfc: disable RSS when unsupported") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: sfc: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-13/+22
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Tested-by: Bert Kenward <bkenward@solarflare.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-03sfc: remove EFX_BUG_ON_PARANOID, use EFX_WARN_ON_[ONCE_]PARANOID insteadEdward Cree1-2/+2
Logically, EFX_BUG_ON_PARANOID can never be correct. For, BUG_ON should only be used if it is not possible to continue without potential harm; and since the non-DEBUG driver will continue regardless (as the BUG_ON is compiled out), clearly the BUG_ON cannot be needed in the DEBUG driver. So, replace every EFX_BUG_ON_PARANOID with either an EFX_WARN_ON_PARANOID or the newly defined EFX_WARN_ON_ONCE_PARANOID. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-30sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driverEdward Cree1-12/+3
Rationale: The differences between Falcon and Siena are in many ways larger than those between Siena and EF10 (despite Siena being nominally "Falcon- architecture"); for instance, Falcon has no MCPU, so there is no MCDI. Removing Falcon support from the sfc driver should simplify the latter, and avoid the possibility of Falcon support being broken by changes to sfc (which are rarely if ever tested on Falcon, it being end-of-lifed hardware). The sfc-falcon driver created in this changeset is essentially a copy of the sfc driver, but with Siena- and EF10-specific code, including MCDI, removed and with the "efx_" identifier prefix changed to "ef4_" (for "EFX 4000- series") to avoid collisions when both drivers are built-in. This changeset removes Falcon from the sfc driver's PCI ID table; then in sfc I've removed obvious Falcon-related code: I removed the Falcon NIC functions, Falcon PHY code, and EFX_REV_FALCON_*, then fixed up everything that referenced them. Also, increment minor version of both drivers (to 4.1). For now, CONFIG_SFC selects CONFIG_SFC_FALCON, so that updating old configs doesn't cause Falcon support to disappear; but that should be undone at some point in the future. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-18sfc: remove Software TSOEdward Cree1-0/+1
It gives no advantage over GSO now that xmit_more exists. If we find ourselves unable to handle a TSO skb (because our TXQ doesn't have a TSOv2 context and the NIC doesn't support TSOv1), hand it back to GSO. Also do that if the TSO handler fails with EINVAL for any other reason. As Falcon-architecture NICs don't support any firmware-assisted TSO, they no longer advertise TSO feature flags at all. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-18sfc: Firmware-Assisted TSO version 2Bert Kenward1-0/+1
Add support for FATSOv2 to the driver. FATSOv2 offloads far more of the task of TCP segmentation to the firmware, such that we now just pass a single super-packet to the NIC. This means TSO has a great deal in common with a normal DMA transmit, apart from adding a couple of option descriptors. NIC-specific checks have been moved off the fast path and in to initialisation where possible. This also moves FATSOv1/SWTSO to a new file (tx_tso.c). The end of transmit and some error handling is now outside TSO, since it is common with other code. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-09sfc: report 4-tuple UDP hashing to ethtool, if it's enabledEdward Cree1-4/+8
Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-11sfc: implement IPv6 NFC (and IPV4_USER_FLOW)Edward Cree1-0/+184
Signed-off-by: Edward Cree <ecree@solarflare.com> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-21sfc: protect filter table against use-after-freeEdward Cree1-1/+1
If MCDI timeouts are encountered during efx_ef10_filter_table_remove(), an FLR will be queued, but efx->filter_state will still be kfree()d. The queued FLR will then call efx_ef10_filter_table_restore(), which will try to use efx->filter_state. This previously caused a panic. This patch adds an rwsem to protect the existence of efx->filter_state, separately from the spinlock protecting its contents. Users which can race against efx_ef10_filter_table_remove() should down_read this rwsem. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09sfc: Add use of shared RSS contexts.Jon Cooper1-3/+2
Allow PFs to allocate shared RSS contexts if we exhaust our exclusive RSS contexts. Make VFs use shared RSS contexts in all cases. Spruce up error handling so that the shadow copy of the RSS table is updated after successful update, rather than in all cases, so that we report the actual contents of the RSS table after a failure to set it, rather than what we'd like it to be. Populate context_size parameter when vacuously allocating RSS context of size 1. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-08ethtool: Support for configurable RSS hash functionEyal Perry1-4/+14
This patch extends the set/get_rxfh ethtool-options for getting or setting the RSS hash function. It modifies drivers implementation of set/get_rxfh accordingly. This change also delegates the responsibility of checking whether a modification to a certain RX flow hash parameter is supported to the driver implementation of set_rxfh. User-kernel API is done through the new hfunc bitmask field in the ethtool_rxfh struct. A bit set in the hfunc field is corresponding to an index in the new string-set ETH_SS_RSS_HASH_FUNCS. Got approval from most of the relevant driver maintainers that their driver is using Toeplitz, and for the few that didn't answered, also assumed it is Toeplitz. Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Ariel Elior <ariel.elior@qlogic.com> Cc: Prashant Sreedharan <prashant@broadcom.com> Cc: Michael Chan <mchan@broadcom.com> Cc: Hariprasad S <hariprasad@chelsio.com> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Bruce Allan <bruce.w.allan@intel.com> Cc: Carolyn Wyborny <carolyn.wyborny@intel.com> Cc: Don Skidmore <donald.c.skidmore@intel.com> Cc: Greg Rose <gregory.v.rose@intel.com> Cc: Matthew Vick <matthew.vick@intel.com> Cc: John Ronciak <john.ronciak@intel.com> Cc: Mitch Williams <mitch.a.williams@intel.com> Cc: Amir Vadai <amirv@mellanox.com> Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com> Cc: Shradha Shah <sshah@solarflare.com> Cc: Shreyas Bhatewara <sbhatewara@vmware.com> Cc: "VMware, Inc." <pv-drivers@vmware.com> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-17sfc: Add per-queue statistics in ethtoolAndrew Rybchenko1-2/+56
Implement per channel software TX and RX packet counters accessed as ethtool statistics. This allows confirmation with MAC statistics. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-15sfc: add extra RX drop counters for nodesc_trunc and noskb_dropEdward Cree1-1/+0
Added a counter rx_noskb_drop for failure to allocate an skb. Summed the per-channel rx_nodesc_trunc counters earlier so that they can be included in rx_dropped. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-03ethtool: Replace ethtool_ops::{get,set}_rxfh_indir() with {get,set}_rxfh()Ben Hutchings1-5/+5
ETHTOOL_{G,S}RXFHINDIR and ETHTOOL_{G,S}RSSH should work for drivers regardless of whether they expose the hash key, unless you try to set a hash key for a driver that doesn't expose it. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-10sfc: Use ether_addr_copy and eth_broadcast_addrEdward Cree1-9/+9
Faster than memcpy/memset on some architectures. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-12sfc: Add/remove blank lines to tasteBen Hutchings1-1/+0
Remove trailing blank lines in several files. Use only one blank line between functions. Add a blank line as a separator in a few places. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-12sfc: Fail self-test with -EBUSY, not -EIO, if the device is busyBen Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-12sfc: Cosmetic changes to self-test from the out-of-tree driverBen Hutchings1-5/+13
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-23sfc: Use the correct maximum TX DMA ring size for SFC9100Ben Hutchings1-2/+2
As part of a workaround for a hardware erratum in the SFC9100 family (SF bug 35388), the TX_DESC_UPD_DWORD register address is also used for communicating with the event block, and only descriptor pointer values < 2048 are valid. If the TX DMA ring size is increased to 4096 descriptors (which the firmware still allows) then we may write a descriptor pointer value >= 2048, which has entirely different and undesirable effects! Limit the TX DMA ring size correctly when this workaround is in effect. Fixes: 8127d661e77f ('sfc: Add support for Solarflare SFC9100 family') Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-12sfc: Add PTP counters to ethtool statsBen Hutchings1-1/+7
These were implemented by Andrew Jackson and Laurence Evans but not previously included in-tree. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-12-12sfc: Change efx_nic_type::rx_push_indir_table to push hash key as wellAndrew Rybchenko1-1/+1
The EF10 implementation already does this, and it makes more logical sense to group the RSS hash key and indirection table together. Rename the operation to rx_push_rss_config. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-12-12sfc: Add MC BISTs to ethtool offline self test on EF10Jon Cooper1-0/+2
To run BISTs the MC goes down in to a special mode where it will only respond to MCDI from the testing PF, and TX, RX and event queues are torn down. Other PFs get a message as it goes down to tell them it's going down. When the other PFs get this message, they check the soft status register to tell when the MC has rebooted after BIST mode and they can start recovery. [bwh: Convert the test result to 1 or -1 as for earlier NICs] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-09-20sfc: Use TX PIO for sufficiently small packetsJon Cooper1-0/+1
Sufficiently small linear packets can be copied into the PIO buffer with a single call to memcpy_toio(). Non-linear packets require an intermediate cache-line-sized buffer. [bwh: I wrote the first version of this, but Jon did the hard work to handle non-linear packets.] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-09-20sfc: efx_ethtool_get_ts_info() can be staticFengguang Wu1-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-29sfc: Update copyright bannersBen Hutchings1-2/+2
Update the dates for files that have been added to in 2012-2013. Drop the 'Solarstorm' brand name that's still lingering here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-29sfc: Add support for Solarflare SFC9100 familyBen Hutchings1-0/+2
This adds support for the EF10 network controller architecture and the SFC9100 family, starting with SFC9120 'Farmingdale', and bumps the driver version to 4.0. New features in the SFC9100 family include: - Flexible allocation of internal resources to PCIe physical and virtual functions under firmware control - RX event merging to reduce DMA writes at high packet rates - Integrated RX timestamping - PIO buffers for lower TX latency - Firmware-driven data path that supports additional offload features and filter types - Delivery of packets between functions and to multiple recipients, allowing firmware to implement a vswitch - Multiple RX flow hash (RSS) contexts with their own hash keys and indirection tables - 40G MAC (single port only) ...not all of which are enabled in this initial driver or the initial firmware release. Much of the new code is by Jon Cooper. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Add TX merged completion counterBen Hutchings1-0/+1
Add a counter for TX merged completion events. This is implemented in the common TX path, because the NIC event handlers only know how many descriptors were completed, not how many packets. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Delegate MAC/NIC statistic description to efx_nic_typeBen Hutchings1-98/+19
Various hardware statistics that are available for Siena are unavailable or meaningless for Falcon. Huntington adds further to the NIC-type-specific statistics, as it has different MAC blocks from Falcon/Siena. All NIC types still provide most statistics by DMA, and use little-endian byte order. Therefore: 1. Add some general utility functions for reporting hardware statistics, efx_nic_describe_stats() and efx_nic_update_stats(). 2. Add an efx_nic_type::describe_stats operation to get the number and names of statistics, implemented using efx_nic_describe_stats() 3. Change efx_nic_type::update_stats to store the core statistics (struct rtnl_link_stats64) or full statistics (array of u64) in a caller-provided buffer. Use efx_nic_update_stats() to aid in the implementation. 4. Rename struct efx_ethtool_stat to struct efx_sw_stat_desc and EFX_ETHTOOL_NUM_STATS to EFX_ETHTOOL_SW_STAT_COUNT. 5. Remove efx_nic::mac_stats and struct efx_mac_stats. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Remove driver-local struct ethtool_stringBen Hutchings1-24/+13
It's not really helpful to pretend ethtool string arrays are structured. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Remove more left-overs from Falcon GMAC supportBen Hutchings1-2/+0
We only ever used the XMAC (10G link speed) in production. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Extend and abstract efx_filter_spec to cover Huntington/EF10Ben Hutchings1-93/+118
Replace type field with match_flags. Add rss_context and match values covering of most of what is now in the MCDI protocol. Change some fields into bitfields so that the structure size doesn't grow beyond 64 bytes. Ditch the filter decoding functions as it is now easier to pick apart the abstract structure. Rewrite ethtool NFC rule functions to set/get filter match flags and values directly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Name the RX drop queue IDBen Hutchings1-2/+2
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Move details of a Falcon bug workaround out of ethtool.cBen Hutchings1-19/+4
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-06-24sfc: Report software timestamping capabilitiesBen Hutchings1-1/+15
The kernel can generate software receive timestamps and we should report those for all ports regardless of hardware capabilities. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-03-07sfc: Enable RX DMA scattering where possibleBen Hutchings1-1/+3
Enable RX DMA scattering iff an RX buffer large enough for the current MTU will not fit into a single page and the NIC supports DMA scattering for kernel-mode RX queues. On Falcon and Siena, the RX_USR_BUF_SIZE field is used as the DMA limit for both all RX queues with scatter enabled. Set it to 1824, matching what Onload uses now. Maintain a statistic for frames truncated due to lack of descriptors (rx_nodesc_trunc). This is distinct from rx_frm_trunc which may be incremented when scattering is disabled and implies an over-length frame. Whenever an MTU change causes scattering to be turned on or off, update filters that point to the PF queues, but leave others unchanged, as VF drivers assume scattering is off. Add n_frags parameters to various functions, and make them iterate: - efx_rx_packet() - efx_recycle_rx_buffers() - efx_rx_mk_skb() - efx_rx_deliver() Make efx_handle_rx_event() responsible for updating efx_rx_queue::removed_count. Change the RX pipeline state to a starting ring index and number of fragments, and make __efx_rx_packet() responsible for clearing it. Based on earlier versions by David Riddoch and Jon Cooper. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Fix byte order warnings for ethtool RX filter interfaceBen Hutchings1-11/+14
sparse has got a bit more picky since I last ran it over this. Add forced casts for use of ~0 as a big-endian value. Undo the pointless optimisation of parameter validation with '|'; using '||' avoids these warnings. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-10-02sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IPBen Hutchings1-6/+2
This filter flag cannot yet be set through the ethtool command and will not be supported on future hardware. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-10-02sfc: Fix loopback self-test with separate_tx_channels=1Ben Hutchings1-1/+2
The loopback self-test iterates over all the TX queues of channel 0, which is not very interesting when that's an RX-only channel. Signed-off-by: Ben Hutchings <bhutchings@solarflre.com>
2012-09-19sfc: Add support for IEEE-1588 PTPStuart Hodgson1-0/+1
Add PTP IEEE-1588 support and make accesible via the PHC subsystem. This work is based on prior code by Andrew Jackson Signed-off-by: Stuart Hodgson <smhodgson@solarflare.com> [bwh: - Add byte order conversion in efx_ptp_send_times() - Simplify conversion of PPS event times - Add the built-in vs module check to CONFIG_SFC_PTP dependencies] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-08-31Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+2
Merge the 'net' tree to get the recent set of netfilter bug fixes in order to assist with some merge hassles Pablo is going to have to deal with for upcoming changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-24sfc: Remove overly paranoid locking assertions from netdev operationsBen Hutchings1-2/+0
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-08-24sfc: Change state names to be clearer, and comment themBen Hutchings1-1/+1
STATE_INIT and STATE_FINI are equivalent and represent incompletely initialised states; combine them as STATE_UNINIT. Rename STATE_RUNNING to STATE_READY, to avoid confusion with netif_running() and IFF_RUNNING. The comments do not quite match current usage, but this will be corrected in subsequent fixes. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>