- Apr 14, 2011
-
-
stephen hemminger authored
The phy, mac, and board information structures should be const. Since tables contain function pointer this improves security (at least theoretically). Compile tested only. Signed-off-by:
Stephen Hemminger <shemminger@vyatta.com> Acked-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Allan, Bruce W authored
When physical identification of an adapter is done by toggling the mechanism on and off through software utilizing the set_phys_id operation, it is done with a fixed duration for both on and off states. Some drivers may want to set a custom duration for the on/off intervals. This patch changes the API so the return code from the driver's entry point when it is called with ETHTOOL_ID_ACTIVE can specify the frequency at which to cycle the on/off states, and updates the drivers that have already been converted to use the new set_phys_id and use the synchronous method for identifying an adapter. The physical identification frequency set in the updated drivers is based on how it was done prior to the introduction of set_phys_id. Compile tested only. Also fixes a compiler warning in sfc. v2: drivers do not return -EINVAL for ETHOOL_ID_ACTIVE v3: fold patchset into single patch and cleanup per Ben's feedback Signed-off-by:
Bruce Allan <bruce.w.allan@intel.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> Cc: Michael Chan <mchan@broadcom.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Divy Le Ray <divy@chelsio.com> Cc: Don Fry <pcnet32@frontier.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com> Cc: Steve Hodgson <shodgson@solarflare.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Matt Carlson <mcarlson@broadcom.com> Acked-by:
Jon Mason <jdmason@kudzu.us> Acked-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 05, 2011
-
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
The TSO code already supports IPv6 on VLAN, so enable it. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Apr 01, 2011
-
-
Ben Hutchings authored
This is preparation for using the generic netdev features interface, and should have no effect in itself. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Mar 22, 2011
-
-
Steve Hodgson authored
If SR-IOV is enabled by firmware, even if it is not enabled in the PCI capability, TX pushes using write-combining may be corrupted. We want to know whether it is enabled before mapping the NIC registers, and even if PCI extended capabilities are not accessible. Therefore, we look for the MSI capability, which is removed if SR-IOV is enabled. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Mar 04, 2011
-
-
Ben Hutchings authored
Based on work by Neil Turton <nturton@solarflare.com> and Kieran Mansley <kmansley@solarflare.com>. The BIU has now been verified to handle 3- and 4-dword writes within a single 128-bit register correctly. This means we can enable write- combining and only insert write barriers between writes to distinct registers. This has been observed to save about 0.5 us when pushing a TX descriptor to an empty TX queue. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Feb 28, 2011
-
-
Ben Hutchings authored
All features originally planned for version 3.1 (and some that weren't) have been implemented. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
In Falcon we can configure the fill levels of the RX data FIFO which trigger the generation of pause frames (if enabled), and we have module parameters for this. Siena does not allow the levels to be configured (or, if it does, this is done by the MC firmware and is not configurable by drivers). So far as I can tell, the module parameters are not used by our internal scripts and have not been documented (with the exception of the short parameter descriptions). Therefore, remove them and always initialise Falcon with the default values. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
This field does not exist in all MMDs we want to check, and all callers allow it to be set (fault_fatal = 0). Remove the loopback condition, as STAT2.DEVPRST should be valid regardless of any fault. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
We currently make no use of siena_nic_data::fw_{version,build} except to format the firmware version for ethtool_get_drvinfo(). Since we only read the version at start of day, this information is incorrect after an MC firmware update. Remove the cached version information and read it via MCDI whenever it is requested. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Steve Hodgson authored
Instead calculate the KVA of receive data. It's not like it's a hard sum. [bwh: Fixed to work with GRO.] Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Steve Hodgson authored
[bwh: Forward-ported to net-next-2.6.] Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Feb 22, 2011
-
-
Eric Dumazet authored
drivers/net/sfc/ethtool.c: In function ‘efx_ethtool_self_test’: drivers/net/sfc/ethtool.c:613: warning: the frame size of 1200 bytes is larger than 1024 bytes Signed-off-by:
Eric Dumazet <eric.dumazet@gmail.com> Acked-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 17, 2011
-
-
Ben Hutchings authored
Use the existing filter management functions to insert TCP/IPv4 and UDP/IPv4 4-tuple filters for Receive Flow Steering. For each channel, track how many RFS filters are being added during processing of received packets and scan the corresponding number of table entries for filters that may be reclaimed. Do this in batches to reduce lock overhead. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Feb 16, 2011
-
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Feb 15, 2011
-
-
Ben Hutchings authored
Implement the ndo_setup_tc() operation with 2 traffic classes. Current Solarstorm controllers do not implement TX queue priority, but they do allow queues to be 'paced' with an enforced delay between packets. Paced and unpaced queues are scheduled in round-robin within two separate hardware bins (paced queues with a large delay may be placed into a third bin temporarily, but we won't use that). If there are queues in both bins, the TX scheduler will alternate between them. If we make high-priority queues unpaced and best-effort queues paced, and high-priority queues are mostly empty, a single high-priority queue can then instantly take 50% of the packet rate regardless of how many of the best-effort queues have descriptors outstanding. We do not actually want an enforced delay between packets on best- effort queues, so we set the pace value to a reserved value that actually results in a delay of 0. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
efx_channel_get_{rx,tx}_queue() currently return NULL if the channel isn't used for traffic in that direction. In most cases this is a bug, but some callers rely on it as an existence test. Add existence test functions efx_channel_has_{rx_queue,tx_queues}() and use them as appropriate. Change efx_channel_get_{rx,tx}_queue() to assert that the requested queue exists. Remove now-redundant initialisation from efx_set_channels(). Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
efx_hard_start_xmit() needs to implement a mapping which is the inverse of tx_queue::core_txq. Move the initialisation of tx_queue::core_txq next to efx_hard_start_xmit() to make the connection more obvious. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Jan 24, 2011
-
-
Michał Mirosław authored
Quoting Ben Hutchings: we presumably won't be defining features that can only be enabled on 64-bit architectures. Occurences found by `grep -r` on net/, drivers/net, include/ [ Move features and vlan_features next to each other in struct netdev, as per Eric Dumazet's suggestion -DaveM ] Signed-off-by:
Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 13, 2011
-
-
Ben Hutchings authored
Commit a4900ac9 ("sfc: Create multiple TX queues") accidentally disabled the rss_cpus module parameter. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Dec 23, 2010
-
-
Jon Mason authored
pci_restore_state only ever returns 0, thus there is no benefit in having it return any value. Also, a large majority of the callers do not check the return code of pci_restore_state. Make the pci_restore_state a void return and avoid the overhead. Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by:
Jon Mason <jon.mason@exar.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- Dec 10, 2010
-
-
Ben Hutchings authored
Various drivers are using implementations of ethtool_ops::get_link that are equivalent to the default ethtool_op_get_link(). Change them to use that instead. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
stephen hemminger authored
This driver now uses Generic Receive Offload, not the older LRO. Change references to LRO in names and comments. Signed-off-by:
Stephen Hemminger <shemminger@vyatta.com> Acked-by:
Ben Hutchings <bhutchings@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Ben Hutchings authored
Long before this driver went into mainline, it had support for multiple TX queues per port, with lockless TX enabled. Since Linux did not know anything of this, filling up any hardware TX queue would stop the core TX queue and multiple hardware TX queues could fill up before the scheduler reacted. Thus it was necessary to keep a count of how many TX queues were stopped and to wake the core TX queue only when all had free space again. The driver also previously (ab)used the per-hardware-queue stopped flag as a counter to deal with various things that can inhibit TX, but it no longer does that. Remove the per-channel tx_stop_count, tx_stop_lock and per-hardware-queue stopped count and just use the networking core queue state directly. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Dec 07, 2010
-
-
Ben Hutchings authored
Call netif_napi_{add,del}() on the NAPI contexts in the new and old channels, respectively. Since efx_init_napi() cannot fail, make its return type void. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
If we are using a legacy interrupt, our IRQ may be shared and our interrupt handler may be called even though interrupts are disabled on the NIC. When we change ring sizes, we reallocate the event queue and the interrupt handler may use an invalid pointer when called for another device's interrupt. Maintain a legacy_irq_enabled flag and test that at the top of the interrupt handler. Note that this problem results from the need to work around broken INT_ISR0 reads, and does not affect the legacy interrupt handler for Falcon A1. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Move search_depth arrays into per-table state. Define initialisation function efx_filter_init_rx() which sets everything apart from the match fields. Define efx_filter_set_{ipv4_local,ipv4_full,eth_local}() to set the match fields. This allows some simplification of callers and later support for additional protocols and more flexible matching using multiple calls to these functions. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
The separation between filter tables is largely an internal detail and it may be removed in future hardware. To prepare for that: - Merge table ID with filter index to make an opaque filter ID - Wrap efx_filter_table_clear() with a function that clears filters from both RX tables, which is all that the current caller requires Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Add message at start of self-test and increase log level of message at end of self-test, so that any other messages produced during the test are clearly associated with it. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
- Dec 06, 2010
-
-
Ben Hutchings authored
Whenever we add DMA descriptors to a TX ring and update the ring pointer, the TX DMA engine must first read the new DMA descriptors and then start reading packet data. However, all released Solarflare 10G controllers have a 'TX push' feature that allows us to reduce latency by writing the first new DMA descriptor along with the pointer update. This is only useful when the queue is empty. The hardware should ignore the pushed descriptor if the queue is not empty, but this check is buggy, so we must do it in software. In order to tell whether a TX queue is empty, we need to compare the previous transmission count (write_count) and completion count (read_count). However, if we do that every time we update the ring pointer then read_count may ping-pong between the caches of two CPUs running the transmission and completion paths for the queue. Therefore, we split the check for an empty queue between the completion path and the transmission path: - Add an empty_read_count field representing a point at which the completion path saw the TX queue as empty. - Add an old_write_count field for use on the completion path. - On the completion path, whenever read_count reaches or passes old_write_count the TX queue may be empty. We then read write_count, set empty_read_count if read_count == write_count, and update old_write_count. - On the transmission path, we read empty_read_count. If it's set, we compare it with the value of write_count before the current set of descriptors was added. If they match, the queue really is empty and we can use TX push. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
It is not necessary to serialise writes to the paged 128-bit registers. However, if we don't then we must always write the last dword separately, not as part of a qword write. Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <bhutchings@solarflare.com>
-