1. 28 4月, 2018 6 次提交
  2. 23 4月, 2018 5 次提交
    • J
      s390/qeth: use Read device to query hypervisor for MAC · b7493e91
      Julian Wiedmann 提交于
      For z/VM NICs, qeth needs to consider which of the three CCW devices in
      an MPC group it uses for requesting a managed MAC address.
      
      On the Base device, the hypervisor returns a default MAC which is
      pre-assigned when creating the NIC (this MAC is also returned by the
      READ MAC primitive). Querying any other device results in the allocation
      of an additional MAC address.
      
      For consistency with READ MAC and to avoid using up more addresses than
      necessary, it is preferable to use the NIC's default MAC. So switch the
      the diag26c over to using a NIC's Read device, which should always be
      identical to the Base device.
      
      Fixes: ec61bd2f ("s390/qeth: use diag26c to get MAC address on L2")
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7493e91
    • J
      s390/qeth: fix request-side race during cmd IO timeout · db71bbbd
      Julian Wiedmann 提交于
      Submitting a cmd IO request (usually on the WRITE device, but for IDX
      also on the READ device) is currently done with ccw_device_start()
      and a manual timeout in the caller.
      On timeout, the caller cleans up the related resources (eg. IO buffer).
      But 1) the IO might still be active and utilize those resources, and
          2) when the IO completes, qeth_irq() will attempt to clean up the
             same resources again.
      
      Instead of introducing additional resource locking, switch to
      ccw_device_start_timeout() to ensure IO termination after timeout, and
      let the IRQ handler alone deal with cleaning up after a request.
      
      This also removes a stray write->irq_pending reset from
      clear_ipacmd_list(). The routine doesn't terminate any pending IO on
      the WRITE device, so this should be handled properly via IO timeout
      in the IRQ handler.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db71bbbd
    • J
      s390/qeth: handle failure on workqueue creation · a936b1ef
      Julian Wiedmann 提交于
      Creating the global workqueue during driver init may fail, deal with it.
      Also, destroy the created workqueue on any subsequent error.
      
      Fixes: 0f54761d ("qeth: Support VEPA mode")
      Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a936b1ef
    • J
      s390/qeth: avoid control IO completion stalls · 901e3f49
      Julian Wiedmann 提交于
      For control IO, qeth currently tracks the index of the buffer that it
      expects to complete the next IO on each qeth_channel. If the channel
      presents an IRQ while this buffer has not yet completed, no completion
      processing for _any_ completed buffer takes place.
      So if the 'next buffer' is skipped for any sort of reason* (eg. when it
      is released due to error conditions, before the IO is started), the
      buffer obviously won't switch to PROCESSED until it is eventually
      allocated for a _different_ IO and completes.
      Until this happens, all completion processing on that channel stalls
      and pending requests possibly time out.
      
      As a fix, remove the whole 'next buffer' logic and simply process any
      IO buffer right when it completes. A channel will never have more than
      one IO pending, so there's no risk of processing out-of-sequence.
      
      *Note: currently just one location in the code really handles this problem,
             by advancing the 'next' index manually.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      901e3f49
    • J
      s390/qeth: fix error handling in adapter command callbacks · 686c97ee
      Julian Wiedmann 提交于
      Make sure to check both return code fields before(!) processing the
      command response. Otherwise we risk operating on invalid data.
      
      This matches an earlier fix for SETASSPARMS commands, see
      commit ad3cbf61 ("s390/qeth: fix error handling in checksum cmd callback").
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      686c97ee
  3. 26 3月, 2018 1 次提交
  4. 22 3月, 2018 4 次提交
  5. 10 3月, 2018 4 次提交
  6. 01 3月, 2018 2 次提交
    • J
      s390/qeth: fix IPA command submission race · d22ffb5a
      Julian Wiedmann 提交于
      If multiple IPA commands are build & sent out concurrently,
      fill_ipacmd_header() may assign a seqno value to a command that's
      different from what send_control_data() later assigns to this command's
      reply.
      This is due to other commands passing through send_control_data(),
      and incrementing card->seqno.ipa along the way.
      
      So one IPA command has no reply that's waiting for its seqno, while some
      other IPA command has multiple reply objects waiting for it.
      Only one of those waiting replies wins, and the other(s) times out and
      triggers a recovery via send_ipa_cmd().
      
      Fix this by making sure that the same seqno value is assigned to
      a command and its reply object.
      Do so immediately before submitting the command & while holding the
      irq_pending "lock", to produce nicely ascending seqnos.
      
      As a side effect, *all* IPA commands now use a reply object that's
      waiting for its actual seqno. Previously, early IPA commands that were
      submitted while the card was still DOWN used the "catch-all" IDX seqno.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d22ffb5a
    • J
      s390/qeth: fix overestimated count of buffer elements · 12472af8
      Julian Wiedmann 提交于
      qeth_get_elements_for_range() doesn't know how to handle a 0-length
      range (ie. start == end), and returns 1 when it should return 0.
      Such ranges occur on TSO skbs, where the L2/L3/L4 headers (and thus all
      of the skb's linear data) are skipped when mapping the skb into regular
      buffer elements.
      
      This overestimation may cause several performance-related issues:
      1. sub-optimal IO buffer selection, where the next buffer gets selected
         even though the skb would actually still fit into the current buffer.
      2. forced linearization, if the element count for a non-linear skb
         exceeds QETH_MAX_BUFFER_ELEMENTS.
      
      Rather than modifying qeth_get_elements_for_range() and adding overhead
      to every caller, fix up those callers that are in risk of passing a
      0-length range.
      
      Fixes: 2863c613 ("qeth: refactor calculation of SBALE count")
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12472af8
  7. 10 2月, 2018 1 次提交
  8. 03 1月, 2018 1 次提交
  9. 21 12月, 2017 3 次提交
  10. 16 12月, 2017 2 次提交
  11. 03 12月, 2017 1 次提交
    • J
      s390/qeth: fix GSO throughput regression · 6d69b1f1
      Julian Wiedmann 提交于
      Using GSO with small MTUs currently results in a substantial throughput
      regression - which is caused by how qeth needs to map non-linear skbs
      into its IO buffer elements:
      compared to a linear skb, each GSO-segmented skb effectively consumes
      twice as many buffer elements (ie two instead of one) due to the
      additional header-only part. This causes the Output Queue to be
      congested with low-utilized IO buffers.
      
      Fix this as follows:
      If the MSS is low enough so that a non-SG GSO segmentation produces
      order-0 skbs (currently ~3500 byte), opt out from NETIF_F_SG. This is
      where we anticipate the biggest savings, since an SG-enabled
      GSO segmentation produces skbs that always consume at least two
      buffer elements.
      
      Larger MSS values continue to get a SG-enabled GSO segmentation, since
      1) the relative overhead of the additional header-only buffer element
      becomes less noticeable, and
      2) the linearization overhead increases.
      
      With the throughput regression fixed, re-enable NETIF_F_SG by default to
      reap the significant CPU savings of GSO.
      
      Fixes: 5722963a ("qeth: do not turn on SG per default")
      Reported-by: NNils Hoppmann <niho@de.ibm.com>
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d69b1f1
  12. 24 11月, 2017 1 次提交
    • G
      s390: net: add SPDX identifiers to the remaining files · ab9953ff
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the drivers/s390/net/ files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
      Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ab9953ff
  13. 20 10月, 2017 8 次提交
  14. 29 9月, 2017 1 次提交