1. 12 12月, 2018 1 次提交
  2. 17 10月, 2018 3 次提交
  3. 27 9月, 2018 1 次提交
  4. 06 9月, 2018 2 次提交
  5. 19 6月, 2018 1 次提交
  6. 04 4月, 2018 1 次提交
    • P
      IB/core: Refactor GID modify code for RoCE · 598ff6ba
      Parav Pandit 提交于
      Code is refactored to prepare separate functions for RoCE which can do more
      complex operations related to reference counting, while still
      maintainining code readability. This includes
      (a) Simplification to not perform netdevice checks and modifications
      for IB link layer.
      (b) Do not add RoCE GID entry which has NULL netdevice; instead return
      an error.
      (c) If GID addition fails at provider level add_gid(), do not add the
      entry in the cache and keep the entry marked as INVALID.
      (d) Simplify and reuse the ib_cache_gid_add()/del() routines so that they
      can be used even for modifying default GIDs. This avoid some code
      duplication in modifying default GIDs.
      (e) find_gid() routine refers to the data entry flags to qualify a GID
      as valid or invalid GID rather than depending on attributes and zeroness
      of the GID content.
      (f) gid_table_reserve_default() sets the GID default attribute at
      beginning while setting up the GID table. There is no need to use
      default_gid flag in low level functions such as write_gid(), add_gid(),
      del_gid(), as they never need to update the DEFAULT property of the GID
      entry while during GID table update.
      
      As as result of this refactor, reserved GID 0:0:0:0:0:0:0:0 is no longer
      searchable as described below.
      
      A unicast GID entry of 0:0:0:0:0:0:0:0 is Reserved GID as per the IB
      spec version 1.3 section 4.1.1, point (6) whose snippet is below.
      
      "The unicast GID address 0:0:0:0:0:0:0:0 is reserved - referred to as
      the Reserved GID. It shall never be assigned to any endport. It shall
      not be used as a destination address or in a global routing header
      (GRH)."
      
      GID table cache now only stores valid GID entries. Before this patch,
      Reserved GID 0:0:0:0:0:0:0:0 was searchable in the GID table using
      ib_find_cached_gid_by_port() and other similar find routines.
      
      Zero GID is no longer searchable as it shall not to be present in GRH or
      path recored entry as described in IB spec version 1.3 section 4.1.1,
      point (6), section 12.7.10 and section 12.7.20.
      
      ib_cache_update() is simplified to check link layer once, use unified
      locking scheme for all link layers, removed temporary gid table
      allocation/free logic.
      
      Additionally,
      (a) Expand ib_gid_attr to store port and index so that GID query
      routines can get port and index information from the attribute structure.
      (b) Expand ib_gid_attr to store device as well so that in future code when
      GID reference counting is done, device is used to reach back to the GID
      table entry.
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      598ff6ba
  7. 28 3月, 2018 1 次提交
  8. 20 3月, 2018 1 次提交
  9. 04 1月, 2018 1 次提交
    • B
      IB/core: Fix two kernel warnings triggered by rxe registration · 02ee9da3
      Bart Van Assche 提交于
      Eliminate the WARN_ONs that create following two warnings when
      registering an rxe device:
      
      WARNING: CPU: 2 PID: 1005 at drivers/infiniband/core/device.c:449 ib_register_device+0x591/0x640 [ib_core]
      CPU: 2 PID: 1005 Comm: run_tests Not tainted 4.15.0-rc4-dbg+ #2
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
      RIP: 0010:ib_register_device+0x591/0x640 [ib_core]
      Call Trace:
       rxe_register_device+0x3c6/0x470 [rdma_rxe]
       rxe_add+0x543/0x5e0 [rdma_rxe]
       rxe_net_add+0x37/0xb0 [rdma_rxe]
       rxe_param_set_add+0x5a/0x120 [rdma_rxe]
       param_attr_store+0x5e/0xc0
       module_attr_store+0x19/0x30
       sysfs_kf_write+0x3d/0x50
       kernfs_fop_write+0x116/0x1a0
       __vfs_write+0x23/0x120
       vfs_write+0xbe/0x1b0
       SyS_write+0x44/0xa0
       entry_SYSCALL_64_fastpath+0x23/0x9a
      
      WARNING: CPU: 2 PID: 1005 at drivers/infiniband/core/sysfs.c:1279 ib_device_register_sysfs+0x11d/0x160 [ib_core]
      CPU: 2 PID: 1005 Comm: run_tests Tainted: G        W        4.15.0-rc4-dbg+ #2
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
      RIP: 0010:ib_device_register_sysfs+0x11d/0x160 [ib_core]
      Call Trace:
       ib_register_device+0x3f7/0x640 [ib_core]
       rxe_register_device+0x3c6/0x470 [rdma_rxe]
       rxe_add+0x543/0x5e0 [rdma_rxe]
       rxe_net_add+0x37/0xb0 [rdma_rxe]
       rxe_param_set_add+0x5a/0x120 [rdma_rxe]
       param_attr_store+0x5e/0xc0
       module_attr_store+0x19/0x30
       sysfs_kf_write+0x3d/0x50
       kernfs_fop_write+0x116/0x1a0
       __vfs_write+0x23/0x120
       vfs_write+0xbe/0x1b0
       SyS_write+0x44/0xa0
       entry_SYSCALL_64_fastpath+0x23/0x9a
      
      The code should accept either a parent pointer or a fully specified DMA
      specification without producing warnings.
      
      Fixes: 99db9494 ("IB/core: Remove ib_device.dma_device")
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: stable@vger.kernel.org # v4.11
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      02ee9da3
  10. 19 10月, 2017 1 次提交
  11. 10 8月, 2017 1 次提交
    • L
      RDMA: Simplify get firmware interface · 9abb0d1b
      Leon Romanovsky 提交于
      There is a need to forward FW version to user space
      application through RDMA netlink. In order to make it safe, there
      is need to declare nla_policy and limit the size of FW string.
      
      The new define IB_FW_VERSION_NAME_MAX will limit the size of
      FW version string. That define was chosen to be equal to
      ETHTOOL_FWVERS_LEN, because many drivers anyway are limited
      by that value indirectly.
      
      The introduction of this define allows us to remove the string size
      from get_fw_str function signature.
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      9abb0d1b
  12. 22 4月, 2017 2 次提交
  13. 25 1月, 2017 1 次提交
  14. 08 10月, 2016 1 次提交
  15. 12 7月, 2016 1 次提交
  16. 24 6月, 2016 1 次提交
  17. 07 6月, 2016 4 次提交
  18. 27 5月, 2016 1 次提交
    • C
      IB/core: Make device counter infrastructure dynamic · b40f4757
      Christoph Lameter 提交于
      In practice, each RDMA device has a unique set of counters that the
      hardware implements.  Having a central set of counters that they must
      all adhere to is limiting and causes many useful counters to not be
      available.
      
      Therefore we create a dynamic counter registration infrastructure.
      
      The driver must implement a stats structure allocation routine, in
      which the driver must place the directory name it wants, a list of
      names for all of the counters, an array of u64 counters themselves,
      plus a few generic configuration options.
      
      We then implement a core routine to create a sysfs file for each
      of the named stats elements, and a core routine to retrieve the
      stats when any of the sysfs attribute files are read.
      
      To avoid excessive beating on the stats generation routine in the
      drivers, the core code also caches the stats for a short period of
      time so that someone attempting to read all of the stats in a
      given device's directory will not result in a stats generation
      call per file read.
      
      Future work will attempt to standardize just the shared stats
      elements, and possibly add a method to get the stats via netlink
      in addition to sysfs.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NMark Bloch <markb@mellanox.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      [ Add caching, make structure names more informative, add i40iw support,
        other significant rewrites from the original patch ]
      b40f4757
  19. 12 2月, 2016 1 次提交
  20. 04 2月, 2016 1 次提交
  21. 20 1月, 2016 2 次提交
  22. 24 12月, 2015 3 次提交
  23. 23 12月, 2015 2 次提交
  24. 22 10月, 2015 1 次提交
  25. 31 8月, 2015 1 次提交
  26. 15 7月, 2015 1 次提交
  27. 13 6月, 2015 1 次提交
    • I
      IB/mad: Add support for additional MAD info to/from drivers · 4cd7c947
      Ira Weiny 提交于
      In order to support alternate sized MADs (and variable sized MADs on OPA
      devices) add in/out MAD size parameters to the process_mad core call.
      
      In addition, add an out_mad_pkey_index to communicate the pkey index the driver
      wishes the MAD stack to use when sending OPA MAD responses.
      
      The out MAD size and the out MAD PKey index are required by the MAD
      stack to generate responses on OPA devices.
      
      Furthermore, the in and out MAD parameters are made generic by specifying them
      as ib_mad_hdr rather than ib_mad.
      
      Drivers are modified as needed and are protected by BUG_ON flags if the MAD
      sizes passed to them is incorrect.
      Signed-off-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      4cd7c947
  28. 21 5月, 2015 1 次提交
    • I
      IB/core: Add per port immutable struct to ib_device · 7738613e
      Ira Weiny 提交于
      As of commit 5eb620c8 "IB/core: Add helpers for uncached GID and P_Key
      searches"; pkey_tbl_len and gid_tbl_len are immutable data which are stored in
      the ib_device.
      
      The per port core capability flags to be added later are also immutable data to
      be stored in the ib_device object.
      
      In preparation for this create a structure for per port immutable data and
      place the pkey and gid table lengths within this structure.
      
      "get_port_immutable" is added as a mandatory device function to allow the
      drivers to fill in this data.
      Signed-off-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      7738613e
  29. 06 6月, 2014 1 次提交
    • H
      IB/core: Fix kobject leak on device register error flow · 584482ac
      Haggai Eran 提交于
      The ports kobject isn't being released during error flow in device
      registration.  This patch refactors the ports kobject cleanup into a
      single function called from both the error flow in device registration
      and from the unregistration function.
      
      A couple of attributes aren't being deleted (iw_stats_group, and
      ib_class_attributes).  While this may be handled implicitly by the
      destruction of their kobjects, it seems better to handle all the
      attributes the same way.
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      
      [ Make free_port_list_attributes() static.  - Roland ]
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      584482ac