1. 21 9月, 2013 1 次提交
  2. 30 8月, 2013 2 次提交
    • B
      sfc: Update copyright banners · f7a6d2c4
      Ben Hutchings 提交于
      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: NBen Hutchings <bhutchings@solarflare.com>
      f7a6d2c4
    • B
      sfc: Add support for Solarflare SFC9100 family · 8127d661
      Ben Hutchings 提交于
      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: NBen Hutchings <bhutchings@solarflare.com>
      8127d661
  3. 28 8月, 2013 4 次提交
  4. 23 8月, 2013 2 次提交
  5. 21 8月, 2013 1 次提交
  6. 25 6月, 2013 1 次提交
  7. 08 3月, 2013 1 次提交
    • B
      sfc: Enable RX DMA scattering where possible · 85740cdf
      Ben Hutchings 提交于
      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: NBen Hutchings <bhutchings@solarflare.com>
      85740cdf
  8. 01 12月, 2012 1 次提交
  9. 02 10月, 2012 2 次提交
  10. 19 9月, 2012 1 次提交
  11. 25 8月, 2012 2 次提交
  12. 24 8月, 2012 1 次提交
  13. 02 8月, 2012 1 次提交
    • B
      sfc: Fix maximum number of TSO segments and minimum TX queue size · 7e6d06f0
      Ben Hutchings 提交于
      Currently an skb requiring TSO may not fit within a minimum-size TX
      queue.  The TX queue selected for the skb may stall and trigger the TX
      watchdog repeatedly (since the problem skb will be retried after the
      TX reset).  This issue is designated as CVE-2012-3412.
      
      Set the maximum number of TSO segments for our devices to 100.  This
      should make no difference to behaviour unless the actual MSS is less
      than about 700.  Increase the minimum TX queue size accordingly to
      allow for 2 worst-case skbs, so that there will definitely be space
      to add an skb after we wake a queue.
      
      To avoid invalidating existing configurations, change
      efx_ethtool_set_ringparam() to fix up values that are too small rather
      than returning -EINVAL.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e6d06f0
  14. 17 7月, 2012 1 次提交
  15. 11 5月, 2012 1 次提交
    • J
      drivers/net: Convert compare_ether_addr to ether_addr_equal · 2e42e474
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e42e474
  16. 10 5月, 2012 1 次提交
  17. 16 2月, 2012 2 次提交
    • B
      sfc: Add SR-IOV back-end support for SFC9000 family · cd2d5b52
      Ben Hutchings 提交于
      On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs),
      each with an RX queue, a TX queue, an event queue and a mailbox
      register.  These may be assigned to up to 127 SR-IOV virtual functions
      per port, with up to 64 VIs per VF.
      
      We allocate an extra channel (IRQ and event queue only) to receive
      requests from VF drivers.
      
      There is a per-port limit of 4 concurrent RX queue flushes, and queue
      flushes may be initiated by the MC in response to a Function Level
      Reset (FLR) of a VF.  Therefore, when SR-IOV is in use, we submit all
      flush requests via the MC.
      
      The RSS indirection table is shared with VFs, so the number of RX
      queues used in the PF is limited to the number of VIs per VF.
      
      This is almost entirely the work of Steve Hodgson, formerly
      shodgson@solarflare.com.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cd2d5b52
    • B
      sfc: Add support for configuring RX unicast/multicast default filters · c274d65c
      Ben Hutchings 提交于
      On Siena all received packets that don't match a more specific filter
      will match the unicast or multicast default filter.  Currently we
      leave these set to the default values (RSS with base queue number of
      0).  Allow them to be reconfigured to select a single RX queue.
      
      These default filters are programmed through the FILTER_CTL register,
      but we represent them internally as an additional table of size 2.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      c274d65c
  18. 27 1月, 2012 4 次提交
    • B
      sfc: Make all MAC statistics consistently 64 bits wide · f9c76250
      Ben Hutchings 提交于
      Currently we use type u64 for byte counts, which can very quickly
      exceed 2^32, and unsigned long for packet counts, which do not.  But
      it can still take only 20-something minutes to send or receive 2^32
      packets, and not all tools properly handle overflow even if they
      sample more often than this.
      
      The MAC statistics are all updated synchronously, so it costs very
      little to make them all 64-bit regardless of native word size.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f9c76250
    • B
      sfc: Remove dependence on NAPI polling in efx_test_eventq_irq() · 0fb53faa
      Ben Hutchings 提交于
      We cannot safely assume that the NAPI handler will complete within the
      20 ms that we allow for the event self-test.  The handler may be
      deferred for longer than this, particularly on realtime kernels.
      
      Instead, check whether either an event has been handled or (as in the
      old failure path) whether an interrupt has been received and an event
      has been delivered but not yet handled.  Use napi_disable() to
      synchronize with the NAPI handler before checking, since it will
      clear events before updating eventq_read_ptr.
      
      Remove the test result chan.N.eventq.poll, since it is not an error
      if the NAPI handler does not run during the test.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      0fb53faa
    • B
      sfc: Merge efx_mac_operations into efx_nic_type · 710b208d
      Ben Hutchings 提交于
      No NICs need to switch efx_mac_operations at run-time, and the MAC
      operations are fairly closely bound to NIC types.
      
      Move efx_mac_operations::reconfigure to efx_nic_type::reconfigure_mac
      and efx_mac_operations::check_fault fo efx_nic_type::check_mac_fault.
      Change callers to call through efx->type or directly if the NIC type
      is known.
      
      Remove efx_mac_operations::update_stats.  The implementations for
      Falcon used to fetch MAC statistics synchronously and this was used by
      efx_register_netdev() to clear statistics after running self-tests.
      However, it now only converts statistics that have already been
      fetched (and that only for Falcon), and the call from
      efx_register_netdev() has no effect.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      710b208d
    • B
      sfc: Hold efx_nic::stats_lock while reading efx_nic::mac_stats · 1cb34522
      Ben Hutchings 提交于
      efx_nic::stats_lock is used to serialise stats updates, but each
      reader was dropping it before it finished reading efx_nic::mac_stats.
      
      If there were concurrent stats reads using procfs, or one using procfs
      and one using ethtool, an update could race with a read.  On a 32-bit
      system, the reader could see word-tearing of 64-bit stats (32 bits of
      the old value and 32 bits of the new).
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      1cb34522
  19. 10 1月, 2012 1 次提交
  20. 06 1月, 2012 1 次提交
  21. 05 1月, 2012 1 次提交
  22. 17 12月, 2011 1 次提交
  23. 08 10月, 2011 1 次提交
  24. 17 9月, 2011 6 次提交