1. 02 5月, 2017 2 次提交
  2. 29 4月, 2017 1 次提交
  3. 26 4月, 2017 1 次提交
  4. 22 4月, 2017 1 次提交
  5. 20 4月, 2017 2 次提交
  6. 06 4月, 2017 5 次提交
    • M
      IB/core: Change completion channel to use the reworked objects schema · 1e7710f3
      Matan Barak 提交于
      This patch adds the standard fd based type - completion_channel.
      The completion_channel is now prefixed with ib_uobject, similarly
      to the rest of the uobjects.
      This requires a few changes:
      (1) We define a new completion channel fd based object type.
      (2) completion_event and async_event are now two different types.
          This means they use different fops.
      (3) We release the completion_channel exactly as we release other
          idr based objects.
      (4) Since ib_uobjects are already kref-ed, we only add the kref to the
          async event.
      
      A fd object requires filling out several parameters. Its op pointer
      should point to uverbs_fd_ops and its size should be at least the
      size if ib_uobject. We use a macro to make the type declaration
      easier.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      1e7710f3
    • M
      IB/core: Add lock to multicast handlers · f48b7269
      Matan Barak 提交于
      When two handlers used the same object in the old schema, we blocked
      the process in the kernel. The new schema just returns -EBUSY. This
      could lead to different behaviour in applications between the old
      schema and the new schema. In most cases, using such handlers
      concurrently could lead to crashing the process. For example, if
      thread A destroys a QP and thread B modifies it, we could have the
      destruction happens before the modification. In this case, we are
      accessing freed memory which could lead to crashing the process.
      This is true for most cases. However, attaching and detaching
      a multicast address from QP concurrently is safe. Therefore, we
      preserve the original behaviour by adding a lock there.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      f48b7269
    • M
      IB/core: Change idr objects to use the new schema · fd3c7904
      Matan Barak 提交于
      This changes only the handlers which deals with idr based objects to
      use the new idr allocation, fetching and destruction schema.
      This patch consists of the following changes:
      (1) Allocation, fetching and destruction is done via idr ops.
      (2) Context initializing and release is done through
          uverbs_initialize_ucontext and uverbs_cleanup_ucontext.
      (3) Ditching the live flag. Mostly, this is pretty straight
          forward. The only place that is a bit trickier is in
          ib_uverbs_open_qp. Commit [1] added code to check whether
          the uobject is already live and initialized. This mostly
          happens because of a race between open_qp and events.
          We delayed assigning the uobject's pointer in order to
          eliminate this race without using the live variable.
      
      [1] commit a040f95d
      	("IB/core: Fix XRC race condition in ib_uverbs_open_qp")
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      fd3c7904
    • M
      IB/core: Add idr based standard types · 6be60aed
      Matan Barak 提交于
      This patch adds the standard idr based types. These types are
      used in downstream patches in order to initialize, destroy and
      lookup IB standard objects which are based on idr objects.
      
      An idr object requires filling out several parameters. Its op pointer
      should point to uverbs_idr_ops and its size should be at least the
      size of ib_uobject. We add a macro to make the type declaration easier.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Reviewed-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      6be60aed
    • M
      IB/core: Refactor idr to be per uverbs_file · 771addf6
      Matan Barak 提交于
      The current code creates an idr per type. Since types are currently
      common for all drivers and known in advance, this was good enough.
      However, the proposed ioctl based infrastructure allows each driver
      to declare only some of the common types and declare its own specific
      types.
      
      Thus, we decided to implement idr to be per uverbs_file.
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Reviewed-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      771addf6
  7. 15 2月, 2017 3 次提交
  8. 14 2月, 2017 1 次提交
  9. 11 1月, 2017 1 次提交
    • P
      IB/core: added support to use rdma cgroup controller · 43579b5f
      Parav Pandit 提交于
      Added support APIs for IB core to register/unregister every IB/RDMA
      device with rdma cgroup for tracking rdma resources.
      IB core registers with rdma cgroup controller.
      Added support APIs for uverbs layer to make use of rdma controller.
      Added uverbs layer to perform resource charge/uncharge functionality.
      Added support during query_device uverb operation to ensure it
      returns resource limits by honoring rdma cgroup configured limits.
      Signed-off-by: NParav Pandit <pandit.parav@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      43579b5f
  10. 25 12月, 2016 1 次提交
  11. 14 12月, 2016 5 次提交
  12. 17 11月, 2016 1 次提交
  13. 08 10月, 2016 3 次提交
  14. 24 9月, 2016 1 次提交
  15. 23 6月, 2016 5 次提交
  16. 18 5月, 2016 1 次提交
    • C
      IB/core: Do not require CAP_NET_ADMIN for packet sniffing · e3b6d8cf
      Christoph Lameter 提交于
      In the Ethernet/TCP world, CAP_NET_RAW is sufficient to allow a program
      to listen to all incoming packets on a specific interface, and the
      higher CAP_NET_ADMIN is required to set the interface into promiscuous
      mode.  We want to emulate that same basic division of privilege in the
      RDMA stack, so when dealing with Raw Ethernet QPs, allow apps with
      CAP_NET_RAW to listen to all incoming flows (and direct them as they see
      fit in their own listen stream).  Do not require CAP_NET_ADMIN just to
      listen to traffic already incoming.  Reserve CAP_NET_ADMIN if we attempt
      to set promiscuous mode.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      e3b6d8cf
  17. 14 5月, 2016 2 次提交
  18. 22 3月, 2016 2 次提交
  19. 03 3月, 2016 1 次提交
    • M
      IB/{core, mlx5}: Fix input len in vendor part of create_qp/srq · 3d943c9d
      Majd Dibbiny 提交于
      Currently, the inlen field of the vendor's part of the command
      doesn't match the command buffer. This happens because the inlen
      accommodates ib_uverbs_cmd_hdr which is deducted from the in buffer.
      This is problematic since the vendor function could be called either
      from the legacy verb (where the input length mismatches the actual
      length) or by the extended verb (where the length matches). The vendor
      has no idea which function calls it and therefore has no way to know
      how the length variable should be treated.
      
      Fixing this by aligning the inlen to the correct length.
      
      All vendor drivers either assumed that inlen >= sizeof(vendor_uhw_cmd)
      or just failed wrongly (mlx5) and fixed in this patch.
      
      Fixes: cfb5e088 ('IB/mlx5: Add CQE version 1 support to user QPs and SRQs')
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      3d943c9d
  20. 02 3月, 2016 1 次提交