mbox series

[rdma-next,v5,00/20] RDMA: Add support for ib_device_ops

Message ID 20181210190948.6892-1-kamalheib1@gmail.com (mailing list archive)
Headers show
Series RDMA: Add support for ib_device_ops | expand

Message

Kamal Heib Dec. 10, 2018, 7:09 p.m. UTC
This patchset introduce a new structure that will contain all the
infiniband device operations, the structure will be used by the
providers to initialize their supported operations. This patchset also
includes the required changes in the core and ulps to start using it.

Changes from v4:
* Include the missing fist patch.
* Include patch [1] that this patch set depend on and it should be
  dropped when merging for-rc with for-next.

[1] RDMA/rdmavt: Fix rvt_create_ah function signature

Changes from v3:
* Rebase.
* Sort the operations initialization alphabetically.
* Rearrange the operation within the ib_device_ops structure so data
  path operations are located at the beginning of the struct.
* This patch set now depend on a702f6ce0711 ("RDMA/rdmavt: Fix rvt_create_ah
  function signature").

Changes from v2:
* Sort the operations based on logical groups.
* Add patch 18 for fixing rvt_create_ah prototype.
* Add patch 19 for initialize ib_device_ops struct.

Changes from V1:
* Rebase.
* Constify the ib_device_ops.
* Remove vertical white spaces.
* Clang-format ib_device_ops struct.
* Return the descriptive comments into ib_device_ops struct.
* Move the assignment of the ib_device operations to the last patch in
  the patchset.
* Remove the existing method assignment at the same time of initializing
  the ib_device_ops.

Thanks,
Kamal


Kamal Heib (20):
  RDMA/rdmavt: Fix rvt_create_ah function signature
  RDMA/core: Introduce ib_device_ops
  RDMA/bnxt_re: Initialize ib_device_ops struct
  RDMA/cxgb3: Initialize ib_device_ops struct
  RDMA/cxgb4: Initialize ib_device_ops struct
  RDMA/hfi1: Initialize ib_device_ops struct
  RDMA/hns: Initialize ib_device_ops struct
  RDMA/i40iw: Initialize ib_device_ops struct
  RDMA/mlx4: Initialize ib_device_ops struct
  RDMA/mlx5: Initialize ib_device_ops struct
  RDMA/mthca: Initialize ib_device_ops struct
  RDMA/nes: Initialize ib_device_ops struct
  RDMA/ocrdma: Initialize ib_device_ops struct
  RDMA/qedr: Initialize ib_device_ops struct
  RDMA/qib: Initialize ib_device_ops struct
  RDMA/usnic: Initialize ib_device_ops struct
  RDMA/vmw_pvrdma: Initialize ib_device_ops struct
  RDMA/rxe: Initialize ib_device_ops struct
  RDMA/rdmavt: Initialize ib_device_ops struct
  RDMA: Start use ib_device_ops

 drivers/infiniband/core/cache.c               |  12 +-
 drivers/infiniband/core/core_priv.h           |  12 +-
 drivers/infiniband/core/cq.c                  |   6 +-
 drivers/infiniband/core/device.c              | 137 ++++-
 drivers/infiniband/core/fmr_pool.c            |   4 +-
 drivers/infiniband/core/mad.c                 |  24 +-
 drivers/infiniband/core/nldev.c               |   4 +-
 drivers/infiniband/core/opa_smi.h             |   4 +-
 drivers/infiniband/core/rdma_core.c           |   6 +-
 drivers/infiniband/core/security.c            |   8 +-
 drivers/infiniband/core/smi.h                 |   4 +-
 drivers/infiniband/core/sysfs.c               |  28 +-
 drivers/infiniband/core/ucm.c                 |   2 +-
 drivers/infiniband/core/uverbs_cmd.c          |  58 +-
 drivers/infiniband/core/uverbs_main.c         |  14 +-
 drivers/infiniband/core/uverbs_std_types.c    |   2 +-
 .../core/uverbs_std_types_counters.c          |  10 +-
 drivers/infiniband/core/uverbs_std_types_cq.c |   6 +-
 drivers/infiniband/core/uverbs_std_types_dm.c |   6 +-
 .../core/uverbs_std_types_flow_action.c       |  14 +-
 drivers/infiniband/core/uverbs_std_types_mr.c |   4 +-
 drivers/infiniband/core/verbs.c               | 159 +++---
 drivers/infiniband/hw/bnxt_re/main.c          |  96 ++--
 drivers/infiniband/hw/cxgb3/iwch_provider.c   |  64 ++-
 drivers/infiniband/hw/cxgb4/provider.c        |  74 +--
 drivers/infiniband/hw/hfi1/verbs.c            |  18 +-
 drivers/infiniband/hw/hns/hns_roce_device.h   |   2 +
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c    |  11 +
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c    |  18 +
 drivers/infiniband/hw/hns/hns_roce_main.c     | 114 ++--
 drivers/infiniband/hw/i40iw/i40iw_cm.c        |   2 +-
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     |  63 ++-
 drivers/infiniband/hw/mlx4/alias_GUID.c       |   2 +-
 drivers/infiniband/hw/mlx4/main.c             | 178 +++---
 drivers/infiniband/hw/mlx5/main.c             | 230 ++++----
 drivers/infiniband/hw/mthca/mthca_provider.c  | 139 +++--
 drivers/infiniband/hw/nes/nes_cm.c            |   2 +-
 drivers/infiniband/hw/nes/nes_verbs.c         |  67 +--
 drivers/infiniband/hw/ocrdma/ocrdma_main.c    |  92 +--
 drivers/infiniband/hw/qedr/main.c             | 103 ++--
 drivers/infiniband/hw/qib/qib_verbs.c         |   8 +-
 drivers/infiniband/hw/usnic/usnic_ib_main.c   |  61 +-
 .../infiniband/hw/vmw_pvrdma/pvrdma_main.c    |  82 +--
 drivers/infiniband/sw/rdmavt/ah.c             |   4 +-
 drivers/infiniband/sw/rdmavt/ah.h             |   3 +-
 drivers/infiniband/sw/rdmavt/vt.c             | 299 ++--------
 drivers/infiniband/sw/rxe/rxe_verbs.c         |  90 +--
 drivers/infiniband/ulp/ipoib/ipoib_main.c     |   4 +-
 drivers/infiniband/ulp/iser/iser_memory.c     |   4 +-
 .../infiniband/ulp/opa_vnic/opa_vnic_netdev.c |   8 +-
 drivers/infiniband/ulp/srp/ib_srp.c           |   6 +-
 fs/cifs/smbdirect.c                           |   2 +-
 include/rdma/ib_verbs.h                       | 534 ++++++++----------
 include/rdma/uverbs_ioctl.h                   |  12 +-
 net/rds/ib.c                                  |   4 +-
 net/sunrpc/xprtrdma/fmr_ops.c                 |   2 +-
 56 files changed, 1482 insertions(+), 1440 deletions(-)

Comments

Jason Gunthorpe Dec. 10, 2018, 7:26 p.m. UTC | #1
On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> This patchset introduce a new structure that will contain all the
> infiniband device operations, the structure will be used by the
> providers to initialize their supported operations. This patchset also
> includes the required changes in the core and ulps to start using it.
> 
> Changes from v4:
> * Include the missing fist patch.
> * Include patch [1] that this patch set depend on and it should be
>   dropped when merging for-rc with for-next.

This isn't a merge, you just included the commit, this makes
patchworks confusing, try not to do it again, no need to resend.

Jason
Steve Wise Dec. 10, 2018, 7:45 p.m. UTC | #2
On 12/10/2018 1:26 PM, Jason Gunthorpe wrote:
> On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
>> This patchset introduce a new structure that will contain all the
>> infiniband device operations, the structure will be used by the
>> providers to initialize their supported operations. This patchset also
>> includes the required changes in the core and ulps to start using it.
>>
>> Changes from v4:
>> * Include the missing fist patch.
>> * Include patch [1] that this patch set depend on and it should be
>>   dropped when merging for-rc with for-next.
> This isn't a merge, you just included the commit, this makes
> patchworks confusing, try not to do it again, no need to resend.
>
> Jason


Hey Jason, does this mean I should not include Yuval's patch [1] as part
of my next newlink/dellink submission?

[1] https://www.spinics.net/lists/linux-rdma/msg71957.html

Thanks,


Steve.
Jason Gunthorpe Dec. 10, 2018, 8:05 p.m. UTC | #3
On Mon, Dec 10, 2018 at 01:45:01PM -0600, Steve Wise wrote:
> 
> On 12/10/2018 1:26 PM, Jason Gunthorpe wrote:
> > On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> >> This patchset introduce a new structure that will contain all the
> >> infiniband device operations, the structure will be used by the
> >> providers to initialize their supported operations. This patchset also
> >> includes the required changes in the core and ulps to start using it.
> >>
> >> Changes from v4:
> >> * Include the missing fist patch.
> >> * Include patch [1] that this patch set depend on and it should be
> >>   dropped when merging for-rc with for-next.
> > This isn't a merge, you just included the commit, this makes
> > patchworks confusing, try not to do it again, no need to resend.
> >
> > Jason
> 
> Hey Jason, does this mean I should not include Yuval's patch [1] as part
> of my next newlink/dellink submission?
> 
> [1] https://www.spinics.net/lists/linux-rdma/msg71957.html

It hasn't been merged so you are kind of stuck to resend it..

But it had comments so it needed respin

Jason
Yuval Shaia Dec. 10, 2018, 9:11 p.m. UTC | #4
On Mon, Dec 10, 2018 at 01:05:43PM -0700, Jason Gunthorpe wrote:
> On Mon, Dec 10, 2018 at 01:45:01PM -0600, Steve Wise wrote:
> > 
> > On 12/10/2018 1:26 PM, Jason Gunthorpe wrote:
> > > On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> > >> This patchset introduce a new structure that will contain all the
> > >> infiniband device operations, the structure will be used by the
> > >> providers to initialize their supported operations. This patchset also
> > >> includes the required changes in the core and ulps to start using it.
> > >>
> > >> Changes from v4:
> > >> * Include the missing fist patch.
> > >> * Include patch [1] that this patch set depend on and it should be
> > >>   dropped when merging for-rc with for-next.
> > > This isn't a merge, you just included the commit, this makes
> > > patchworks confusing, try not to do it again, no need to resend.
> > >
> > > Jason
> > 
> > Hey Jason, does this mean I should not include Yuval's patch [1] as part
> > of my next newlink/dellink submission?
> > 
> > [1] https://www.spinics.net/lists/linux-rdma/msg71957.html
> 
> It hasn't been merged so you are kind of stuck to resend it..
> 
> But it had comments so it needed respin

The sole comment (inlining rxe_set_port_state) was addressed.

> 
> Jason
Jason Gunthorpe Dec. 11, 2018, 5:42 p.m. UTC | #5
On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> This patchset introduce a new structure that will contain all the
> infiniband device operations, the structure will be used by the
> providers to initialize their supported operations. This patchset also
> includes the required changes in the core and ulps to start using it.

I'm inclined to apply this, do people still have concerns to the
approach in this v5 version?

Jason
Kamal Heib Dec. 11, 2018, 6:14 p.m. UTC | #6
On Tue, Dec 11, 2018 at 05:42:30PM +0000, Jason Gunthorpe wrote:
> On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> > This patchset introduce a new structure that will contain all the
> > infiniband device operations, the structure will be used by the
> > providers to initialize their supported operations. This patchset also
> > includes the required changes in the core and ulps to start using it.
> 
> I'm inclined to apply this, do people still have concerns to the
> approach in this v5 version?
> 
> Jason

I'm not sure if you saw my reply to Yuval..., in the commit message of the
first patch need to replace "ib_device_ops()" with "ib_set_device_ops()".
Please let me know if you think that I need to re-send the patch with a fixed
commit message.

Thanks,
Kamal
Doug Ledford Dec. 11, 2018, 6:18 p.m. UTC | #7
On Tue, 2018-12-11 at 17:42 +0000, Jason Gunthorpe wrote:
> On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> > This patchset introduce a new structure that will contain all the
> > infiniband device operations, the structure will be used by the
> > providers to initialize their supported operations. This patchset also
> > includes the required changes in the core and ulps to start using it.
> 
> I'm inclined to apply this, do people still have concerns to the
> approach in this v5 version?
> 
> Jason

I'm OK with merging it.
Leon Romanovsky Dec. 11, 2018, 6:29 p.m. UTC | #8
On Tue, Dec 11, 2018 at 01:18:47PM -0500, Doug Ledford wrote:
> On Tue, 2018-12-11 at 17:42 +0000, Jason Gunthorpe wrote:
> > On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> > > This patchset introduce a new structure that will contain all the
> > > infiniband device operations, the structure will be used by the
> > > providers to initialize their supported operations. This patchset also
> > > includes the required changes in the core and ulps to start using it.
> >
> > I'm inclined to apply this, do people still have concerns to the
> > approach in this v5 version?
> >
> > Jason
>
> I'm OK with merging it.

+1 on that.

>
> --
> Doug Ledford <dledford@redhat.com>
>     GPG KeyID: B826A3330E572FDD
>     Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
Jason Gunthorpe Dec. 11, 2018, 11:01 p.m. UTC | #9
On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
> This patchset introduce a new structure that will contain all the
> infiniband device operations, the structure will be used by the
> providers to initialize their supported operations. This patchset also
> includes the required changes in the core and ulps to start using it.
> 
> Changes from v4:
> * Include the missing fist patch.
> * Include patch [1] that this patch set depend on and it should be
>   dropped when merging for-rc with for-next.
> 
> [1] RDMA/rdmavt: Fix rvt_create_ah function signature

So, I almost didn't apply this, particularly since I don't see how it
could have even worked with that ops bug, and it didn't apply
cleanly.. But I fixed all the merge issues and fixed the bug, and the
pointless checkpatch violations. So applied to for-next

You should probably check carefully. Maybe run some tests...

Jason
Kamal Heib Dec. 12, 2018, 2:51 p.m. UTC | #10
On 12/12/18 1:01 AM, Jason Gunthorpe wrote:
> On Mon, Dec 10, 2018 at 09:09:28PM +0200, Kamal Heib wrote:
>> This patchset introduce a new structure that will contain all the
>> infiniband device operations, the structure will be used by the
>> providers to initialize their supported operations. This patchset also
>> includes the required changes in the core and ulps to start using it.
>>
>> Changes from v4:
>> * Include the missing fist patch.
>> * Include patch [1] that this patch set depend on and it should be
>>   dropped when merging for-rc with for-next.
>>
>> [1] RDMA/rdmavt: Fix rvt_create_ah function signature
> 
> So, I almost didn't apply this, particularly since I don't see how it
> could have even worked with that ops bug, and it didn't apply
> cleanly.. But I fixed all the merge issues and fixed the bug, and the
> pointless checkpatch violations. So applied to for-next
> 
> You should probably check carefully. Maybe run some tests...
> 
> Jason
> 

Hi Jason,

We have two issues that got fixed:

1- when CONFIG_MLX5_CORE_IPOIB isn't set: I already sent a fixup off the list
that should fix it, but I also saw that Leaon sent it too.

2- Reading the ibdev_fn.

So, I tested "rdma/wip/jgg-for-next" with the above two fixes on top of it and
it looks good to me.

Thanks,
Kamal