Skip to content
Snippets Groups Projects
  1. Apr 14, 2011
    • stephen hemminger's avatar
      sfc: make function tables const · 6c8c2513
      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: default avatarStephen Hemminger <shemminger@vyatta.com>
      Acked-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c8c2513
    • Allan, Bruce W's avatar
      ethtool: allow custom interval for physical identification · fce55922
      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: default avatarBruce 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: default avatarJon Mason <jdmason@kudzu.us>
      Acked-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fce55922
  2. Apr 05, 2011
  3. Apr 01, 2011
  4. Mar 31, 2011
  5. Mar 22, 2011
  6. Mar 04, 2011
    • Ben Hutchings's avatar
      sfc: Use write-combining to reduce TX latency · 65f0b417
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      65f0b417
  7. Feb 28, 2011
  8. Feb 22, 2011
  9. Feb 17, 2011
    • Ben Hutchings's avatar
      sfc: Implement hardware acceleration of RFS · 64d8ad6d
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      64d8ad6d
  10. Feb 16, 2011
  11. Feb 15, 2011
    • Ben Hutchings's avatar
      sfc: Add TX queues for high-priority traffic · 94b274bf
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      94b274bf
    • Ben Hutchings's avatar
      sfc: Distinguish queue lookup from test for queue existence · 525da907
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      525da907
    • Ben Hutchings's avatar
      sfc: Move TX queue core queue mapping into tx.c · 60031fcc
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      60031fcc
  12. Jan 24, 2011
  13. Jan 13, 2011
  14. Dec 23, 2010
  15. Dec 10, 2010
  16. Dec 07, 2010
  17. Dec 06, 2010
    • Ben Hutchings's avatar
      sfc: Use TX push whenever adding descriptors to an empty queue · cd38557d
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      cd38557d
    • Ben Hutchings's avatar
      sfc: Remove locking from implementation of efx_writeo_paged() · e5061472
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      e5061472
    • Ben Hutchings's avatar
    • Ben Hutchings's avatar
Loading