1. 24 1月, 2013 2 次提交
  2. 19 1月, 2013 1 次提交
    • A
      ixgbe: Update ixgbe Tx flags to improve code efficiency · 472148c3
      Alexander Duyck 提交于
      This change is meant to improve the efficiency of the Tx flags in ixgbe by
      aligning them with the values that will later be written into either the
      cmd_type or olinfo.  By doing this we are able to reduce most of these
      functions to either just a simple shift followed by an or in the case of
      cmd_type, or an and followed by an or in the case of olinfo.
      
      To do this I also needed to change the logic and/or drop some flags.  I
      dropped the IXGBE_TX_FLAGS_FSO and it was replaced by IXGBE_TX_FLAGS_TSO since
      the only place it was ever checked was in conjunction with IXGBE_TX_FLAGS_TSO.
      I replaced IXGBE_TX_FLAGS_TXSW with IXGBE_TX_FLAGS_CC, this way we have a
      clear point for what the flag is meant to do.  Finally the
      IXGBE_TX_FLAGS_NO_IFCS was dropped since were are already carrying the data
      for that flag in the skb.  Instead we can just check the bitflag in the skb.
      
      In order to avoid type conversion errors I also adjusted the locations
      where we were switching between CPU and little endian.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      472148c3
  3. 28 11月, 2012 1 次提交
  4. 01 11月, 2012 1 次提交
  5. 30 10月, 2012 1 次提交
  6. 23 10月, 2012 2 次提交
  7. 19 10月, 2012 1 次提交
  8. 09 10月, 2012 1 次提交
  9. 16 9月, 2012 1 次提交
  10. 17 8月, 2012 2 次提交
  11. 22 7月, 2012 2 次提交
  12. 20 7月, 2012 2 次提交
  13. 19 7月, 2012 3 次提交
  14. 15 7月, 2012 1 次提交
  15. 11 7月, 2012 3 次提交
  16. 27 6月, 2012 1 次提交
  17. 14 6月, 2012 1 次提交
    • J
      ixgbe: Check PTP Rx timestamps via BPF filter · 1d1a79b5
      Jacob Keller 提交于
      This patch fixes a potential Rx timestamp deadlock that causes the Rx
      timestamping to stall indefinitely. The issue could occur when a PTP packet is
      timestamped by hardware but never reaches the Rx queue. In order to prevent a
      permanent loss of timestamping, the RXSTMP(L/H) registers have to be read to
      unlock them. (This used to only occur when a packet that was timestamped
      reached the software.) However the registers can't be read early otherwise
      there is no way to correlate them to the packet.
      
      This patch introduces a filter function which can be used to determine if a
      packet should have been timestamped. Supplied with the filter setup by the
      hwtstamp ioctl, check to make sure the PTP protocol and message type match the
      expected values. If so, then read the timestamp registers (to free them.) At
      this point check the descriptor bit, if the bit is set then we know this
      packet correlates to the timestamp stored in the RXTSTAMP registers.
      Otherwise, assume that packet was dropped by the hardware, and ignore this
      timestamp value. However, we have at least unlocked the rxtstamp registers for
      future timestamping.
      
      Due to the way the driver handles skb data, it cannot be directly accessed. In
      order to work around this, a copy of the skb data into a linear buffer is
      made. From this buffer it becomes possible to read the data correctly
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: NRichard Cochran <richardcochran@gmail.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1d1a79b5
  18. 10 5月, 2012 4 次提交
    • D
      ixgbe: cleanup the hwmon function calls · 1210982b
      Don Skidmore 提交于
      When the hwmon code was initially added it was with the assumption that a
      sysfs patch would be also coming soon.  Since that isn't the case some
      clean up needs to be done.  This patch does that.
      Signed-off-by: NDon Skidmore <donald.c.skidmore@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1210982b
    • J
      ixgbe: Enable timesync clock-out feature for PPS support on X540 · 681ae1ad
      Jacob E Keller 提交于
      This patch enables the PPS system in the PHC framework, by enabling
      the clock-out feature on the X540 device. Causes the SDP0 to be set as
      a 1Hz clock. Also configures the timesync interrupt cause in order to
      report each pulse to the PPS via the PHC framework, which can be used
      for general system clock synchronization. (This allows a stable method
      for tuning the general system time via the on-board SYSTIM register
      based clock.)
      Signed-off-by: NJacob E Keller <jacob.e.keller@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      681ae1ad
    • J
      ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC) · 3a6a4eda
      Jacob Keller 提交于
      This patch enables hardware timestamping for use with PTP software by
      extracting a ns counter from an arbitrary fixed point cycles counter.
      The hardware generates SYSTIME registers using the DMA tick which
      changes based on the current link speed. These SYSTIME registers are
      converted to ns using the cyclecounter and timecounter structures
      provided by the kernel. Using the SO_TIMESTAMPING api, software can
      enable and access timestamps for PTP packets.
      
      The SO_TIMESTAMPING API has space for 3 different kinds of timestamps,
      SYS, RAW, and SOF. SYS hardware timestamps are hardware ns values that
      are then scaled to the software clock. RAW hardware timestamps are the
      direct raw value of the ns counter. SOF software timestamps are the
      software timestamp calculated as close as possible to the software
      transmit, but are not offloaded to the hardware. This patch only
      supports the RAW hardware timestamps due to inefficiency of the SYS
      design.
      
      This patch also enables the PHC subsystem features for atomically
      adjusting the cycle register, and adjusting the clock frequency in
      parts per billion. This frequency adjustment works by slightly
      adjusting the value added to the cycle registers each DMA tick. This
      causes the hardware registers to overflow rapidly (approximately once
      every 34 seconds, when at 10gig link). To solve this, the timecounter
      structure is used, along with a timer set for every 25 seconds. This
      allows for detecting register overflow and converting the cycle
      counter registers into ns values needed for providing useful
      timestamps to the network stack.
      
      Only the basic required clock functions are supported at this time,
      although the hardware supports some ancillary features and these could
      easily be enabled in the future.
      
      Note that use of this hardware timestamping requires modifying daemon
      software to use the SO_TIMESTAMPING API for timestamps, and the
      ptp_clock PHC framework for accessing the clock. The timestamps have
      no relation to the system time at all, so software must use the posix
      clock generated by the PHC framework instead.
      Signed-off-by: NJacob E Keller <jacob.e.keller@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3a6a4eda
    • A
      ixgbe: Set Drop_EN bit when multiple Rx queues are present w/o flow control · 3ebe8fde
      Alexander Duyck 提交于
      The drop enable bit can be used to improve the performance of the adapter
      in the case of multiple queues being present.  This performance gain is due
      to the fact that some slower CPUs can cause the FIFO to backfill preventing
      faster CPUs from receiving additional work.  By setting the drop enable bit
      we prevent this and instead just drop the packets that would have been
      bound for the slower CPU.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ebe8fde
  19. 03 5月, 2012 1 次提交
  20. 02 5月, 2012 1 次提交
  21. 27 4月, 2012 1 次提交
  22. 28 3月, 2012 1 次提交
  23. 20 3月, 2012 2 次提交
    • J
      ixgbe: fix namespace issues when FCoE/DCB is not enabled · 8af3c33f
      Jeff Kirsher 提交于
      Resolve namespace issues when FCoE or DCB is not enabled.
      The issue is with certain configurations we end up with namespace
      problems. A simple example:
      
      ixgbe_main.c
       - defines func A()
       - uses func A()
      
      ixgbe_fcoe.c
       - uses func A()
      
      ixgbe.h
       - has prototype for func A()
      
      For default (FCoE included) all is good.  But when it isn't the namespace
      checker complains about how func A() could be static.
      
      To resolve this, created a ixgbe_lib file to contain functions used
      by DCB/FCoE and their helper functions so that they are always in
      namespace whether or not DCB/FCoE is enabled.
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      8af3c33f
    • A
      ixgbe: Correct flag values set by ixgbe_fix_features · 567d2de2
      Alexander Duyck 提交于
      This patch replaces the variable name data with the variable name features
      for ixgbe_fix_features and ixgbe_set_features.  This helps to make some
      issues more obvious such as the fact that we were disabling Rx VLAN tag
      stripping when we should have been forcing it to be enabled when DCB is
      enabled.
      
      In addition there was deprecated code present that was disabling the LRO
      flag if we had the itr value set too low.  I have updated this logic so
      that we will now allow the LRO flag to be set, but will not enable RSC
      until the rx-usecs value is high enough to allow enough time for Rx packet
      coalescing.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      567d2de2
  24. 19 3月, 2012 3 次提交
  25. 17 3月, 2012 1 次提交
    • A
      ixgbe: always write DMA for single_mapped value with skb · 729739b7
      Alexander Duyck 提交于
      This change makes it so that we always write the DMA address for the skb
      itself on the same tx_buffer struct that the skb is written on.  This way
      we don't need the MAPPED_AS_PAGE flag and we always know it will be the
      first DMA value that we will have to unmap.
      
      In addition I have found an issue in which we were leaking a DMA mapping if
      the value happened to be 0 which is possible on some platforms.  In order
      to resolve that I have updated the transmit path to use the length instead
      of the DMA mapping in order to determine if a mapping is actually present.
      
      One other tweak in this patch is that it only writes the olinfo information
      on the first descriptor.  As it turns out it isn't necessary to write it
      for anything but the first descriptor so there is no need to carry it
      forward.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      729739b7