1. 06 2月, 2019 2 次提交
  2. 01 2月, 2019 2 次提交
  3. 07 12月, 2018 1 次提交
  4. 04 10月, 2018 2 次提交
  5. 01 10月, 2018 2 次提交
  6. 11 9月, 2018 1 次提交
  7. 24 5月, 2018 1 次提交
  8. 10 5月, 2018 2 次提交
    • B
      IB/{hfi1, qib, rdmavt}: Move logic to allocate receive WQE into rdmavt · 832369fa
      Brian Welty 提交于
      Moving receive-side WQE allocation logic into rdmavt will allow
      further code reuse between qib and hfi1 drivers.
      Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NBrian Welty <brian.welty@intel.com>
      Signed-off-by: NHarish Chegondi <harish.chegondi@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      832369fa
    • M
      IB/hfi1: Rework fault injection machinery · a74d5307
      Mitko Haralanov 提交于
      The packet fault injection code present in the HFI1 driver had some
      issues which not only fragment the code but also created user
      confusion. Furthermore, it suffered from the following issues:
      
        1. The fault_packet method only worked for received packets. This
           meant that the only fault injection mode available for sent
           packets is fault_opcode, which did not allow for random packet
           drops on all egressing packets.
        2. The mask available for the fault_opcode mode did not really work
           due to the fact that the opcode values are not bits in a bitmask but
           rather sequential integer values. Creating a opcode/mask pair that
           would successfully capture a set of packets was nearly impossible.
        3. The code was fragmented and used too many debugfs entries to
           operate and control. This was confusing to users.
        4. It did not allow filtering fault injection on a per direction basis -
           egress vs. ingress.
      
      In order to improve or fix the above issues, the following changes have
      been made:
      
         1. The fault injection methods have been combined into a single fault
            injection facility. As such, the fault injection has been plugged
            into both the send and receive code paths. Regardless of method used
            the fault injection will operate on both egress and ingress packets.
         2. The type of fault injection - by packet or by opcode - is now controlled
            by changing the boolean value of the file "opcode_mode". When the value
            is set to True, fault injection is done by opcode. Otherwise, by
            packet.
         2. The masking ability has been removed in favor of a bitmap that holds
            opcodes of interest (one bit per opcode, a total of 256 bits). This
            works in tandem with the "opcode_mode" value. When the value of
            "opcode_mode" is False, this bitmap is ignored. When the value is
            True, the bitmap lists all opcodes to be considered for fault injection.
            By default, the bitmap is empty. When the user wants to filter by opcode,
            the user sets the corresponding bit in the bitmap by echo'ing the bit
            position into the 'opcodes' file. This gets around the issue that the set
            of opcodes does not lend itself to effective masks and allow for extremely
            fine-grained filtering by opcode.
         4. fault_packet and fault_opcode methods have been combined. Hence, there
            is only one debugfs directory controlling the entire operation of the
            fault injection machinery. This reduces the number of debugfs entries
            and provides a more unified user experience.
         5. A new control files - "direction" - is provided to allow the user to
            control the direction of packets, which are subject to fault injection.
         6. A new control file - "skip_usec" - is added that would allow the user
            to specify a "timeout" during which no fault injection will occur.
      
      In addition, the following bug fixes have been applied:
      
         1. The fault injection code has been split into its own header and source
            files. This was done to better organize the code and support conditional
            compilation without littering the code with #ifdef's.
         2. The method by which the TX PIO packets were being marked for drop
            conflicted with the way send contexts were being setup. As a result,
            the send context was repeatedly being reset.
         3. The fault injection only makes sense when the user can control it
            through the debugfs entries. However, a kernel configuration can
            enable fault injection but keep fault injection debugfs entries
            disabled. Therefore, it makes sense that the HFI fault injection
            code depends on both.
         4. Error suppression did not take into account the method by which PIO
            packets were being dropped. Therefore, even with error suppression
            turned on, errors would still be displayed to the screen. A larger
            enough packet drop percentage would case the kernel to crash because
            the driver would be stuck printing errors.
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Reviewed-by: NDon Hiatt <don.hiatt@intel.com>
      Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NMitko Haralanov <mitko.haralanov@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a74d5307
  9. 02 2月, 2018 4 次提交
  10. 23 8月, 2017 9 次提交
  11. 01 8月, 2017 1 次提交
    • K
      IB/hfi1: Serve the most starved iowait entry first · bcad2913
      Kaike Wan 提交于
      When an egress resource(SDMA descriptors, pio credits) is not available,
      a sending thread will be put on the resource's wait queue. When the
      resource becomes available again, up to a fixed number of sending threads
      can be awakened sequentially and removed from the wait queue, depending
      on the number of waiting threads and the number of free resources. Since
      each awakened sending thread will send as many packets as possible, it
      is highly likely that the first sending thread will consume all the
      egress resources. Subsequently, it will be put back to the end of the wait
      queue. Depending on the timing when the later sending threads wake up,
      they may not be able to send any packet and be again put back to the end
      of the wait queue sequentially, right behind the first sending thread.
      This starvation cycle continues until some sending threads exceed their
      retry limit and consequently fail.
      
      This patch fixes the issue by two simple approaches:
      (1) Any starved sending thread will be put to the head of the wait queue
      while a served sending thread will be put to the tail;
      (2) The most starved sending thread will be served first.
      Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NKaike Wan <kaike.wan@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      bcad2913
  12. 28 6月, 2017 2 次提交
  13. 05 5月, 2017 2 次提交
  14. 02 5月, 2017 2 次提交
  15. 29 4月, 2017 1 次提交
  16. 06 4月, 2017 2 次提交
    • D
      IB/hfi1: Add transmit fault injection feature · 243d9f43
      Don Hiatt 提交于
      Add ability to fault packets on transmit by opcode.
      Dropping by packet can be achieved by setting the mask to 0.
      
      In order to drop non-verbs traffic we set PbcInsertHrc
      to NONE (0x2). The packet will still be delivered to
      the receiving node but a KHdrHCRCErr (KDETH packet
      with a bad HCRC) will be triggered and the packet will
      not be delivered to the correct context.
      
      In order to drop regular verbs traffic we set the
      PbcTestEbp flag. The packet will still be delivered
      to the receiving node but a 'late ebp error' will
      be triggered and will be dropped.
      
      A global toggle (/sys/kernel/debug/hfi1/hfi1_X/fault_suppress_err)
      has been added to suppress the error messages on the receive
      node when a packet was faulted on the sending node.
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      243d9f43
    • D
      IB/hfi1: Add receive fault injection feature · 0181ce31
      Don Hiatt 提交于
      Add fault injection capability:
        - Drop packets unconditionally (fault_by_packet)
        - Drop packets based on opcode (fault_by_opcode)
      
      This feature reacts to the global FAULT_INJECTION
      config flag.
      
      The faulting traces have been added:
        - misc/fault_opcode
        - misc/fault_packet
      
      See 'Documentation/fault-injection/fault-injection.txt'
      for details.
      
      Examples:
        - Dropping packets by opcode:
          /sys/kernel/debug/hfi1/hfi1_X/fault_opcode
      	# Enable fault
      	echo Y > fault_by_opcode
      	# Setprobability of dropping (0-100%)
      	# echo 25 > probability
      	# Set opcode
      	echo 0x64 > opcode
      	# Number of times to fault
      	echo 3 > times
      	# An optional mask allows you to fault
      	# a range of opcodes
      	echo 0xf0 > mask
          /sys/kernel/debug/hfi1/hfi1_X/fault_stats
          contains a value in parentheses to indicate
          number of each opcode dropped.
      
        - Dropping packets unconditionally
          /sys/kernel/debug/hfi1/hfi1_X/fault_packet
      	# Enable fault
      	echo Y > fault_by_packet
          /sys/kernel/debug/hfi1/hfi1_X/fault_packet/fault_stats
          contains the number of packets dropped.
      Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      0181ce31
  17. 19 2月, 2017 4 次提交