mbox series

[for-next,V4,0/4] RDMA: Cleanups and improvements

Message ID 20190807103138.17219-1-kamalheib1@gmail.com (mailing list archive)
Headers show
Series RDMA: Cleanups and improvements | expand

Message

Kamal Heib Aug. 7, 2019, 10:31 a.m. UTC
This series includes few cleanups and improvements, the first patch
introduce a new enum for describing the physical state values and use it
instead of using the magic numbers, patch 2-4 add support for a common
query port for iWARP drivers and remove the common code from the iWARP
drivers.

Changes from v3:
- Patch #1:
-- Introduce phys_state_to_str() and use it. 

Changes from v2:
- Patch #1:
-- Update mlx4 and hns to use the new ib_port_phys_state enum.
- Patch #3:
-- Use rdma_protocol_iwarp() instead of rdma_node_get_transport().

Changes from v1 :
- Patch #3:
-- Delete __ prefix.
-- Add missing dev_put(netdev);
-- Initilize gid to {}.
-- Return error code directly.

Kamal Heib (4):
  RDMA: Introduce ib_port_phys_state enum
  RDMA/cxgb3: Use ib_device_set_netdev()
  RDMA/core: Add common iWARP query port
  RDMA/{cxgb3, cxgb4, i40iw}: Remove common code

 drivers/infiniband/core/device.c             | 87 ++++++++++++++++----
 drivers/infiniband/core/sysfs.c              | 30 ++++---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c     |  4 +-
 drivers/infiniband/hw/cxgb3/iwch_provider.c  | 45 +++++-----
 drivers/infiniband/hw/cxgb4/provider.c       | 24 ------
 drivers/infiniband/hw/efa/efa_verbs.c        |  2 +-
 drivers/infiniband/hw/hns/hns_roce_device.h  | 10 ---
 drivers/infiniband/hw/hns/hns_roce_main.c    |  3 +-
 drivers/infiniband/hw/i40iw/i40iw_verbs.c    | 11 ---
 drivers/infiniband/hw/mlx4/main.c            |  3 +-
 drivers/infiniband/hw/mlx5/main.c            |  4 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c  |  4 +-
 drivers/infiniband/hw/qedr/verbs.c           |  4 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c |  7 +-
 drivers/infiniband/sw/rxe/rxe.h              |  4 -
 drivers/infiniband/sw/rxe/rxe_param.h        |  2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c        |  6 +-
 drivers/infiniband/sw/siw/siw_verbs.c        |  3 +-
 include/rdma/ib_verbs.h                      | 10 +++
 19 files changed, 144 insertions(+), 119 deletions(-)

Comments

Doug Ledford Aug. 7, 2019, 7:56 p.m. UTC | #1
On Wed, 2019-08-07 at 13:31 +0300, Kamal Heib wrote:
> This series includes few cleanups and improvements, the first patch
> introduce a new enum for describing the physical state values and use
> it
> instead of using the magic numbers, patch 2-4 add support for a common
> query port for iWARP drivers and remove the common code from the iWARP
> drivers.
> 
> Changes from v3:
> - Patch #1:
> -- Introduce phys_state_to_str() and use it. 
> 
> Changes from v2:
> - Patch #1:
> -- Update mlx4 and hns to use the new ib_port_phys_state enum.
> - Patch #3:
> -- Use rdma_protocol_iwarp() instead of rdma_node_get_transport().
> 
> Changes from v1 :
> - Patch #3:
> -- Delete __ prefix.
> -- Add missing dev_put(netdev);
> -- Initilize gid to {}.
> -- Return error code directly.
> 
> Kamal Heib (4):
>   RDMA: Introduce ib_port_phys_state enum
>   RDMA/cxgb3: Use ib_device_set_netdev()
>   RDMA/core: Add common iWARP query port
>   RDMA/{cxgb3, cxgb4, i40iw}: Remove common code

Thanks, series applied to for-next.
Leon Romanovsky Aug. 8, 2019, 7:54 a.m. UTC | #2
On Wed, Aug 07, 2019 at 03:56:26PM -0400, Doug Ledford wrote:
> On Wed, 2019-08-07 at 13:31 +0300, Kamal Heib wrote:
> > This series includes few cleanups and improvements, the first patch
> > introduce a new enum for describing the physical state values and use
> > it
> > instead of using the magic numbers, patch 2-4 add support for a common
> > query port for iWARP drivers and remove the common code from the iWARP
> > drivers.
> >
> > Changes from v3:
> > - Patch #1:
> > -- Introduce phys_state_to_str() and use it.
> >
> > Changes from v2:
> > - Patch #1:
> > -- Update mlx4 and hns to use the new ib_port_phys_state enum.
> > - Patch #3:
> > -- Use rdma_protocol_iwarp() instead of rdma_node_get_transport().
> >
> > Changes from v1 :
> > - Patch #3:
> > -- Delete __ prefix.
> > -- Add missing dev_put(netdev);
> > -- Initilize gid to {}.
> > -- Return error code directly.
> >
> > Kamal Heib (4):
> >   RDMA: Introduce ib_port_phys_state enum
> >   RDMA/cxgb3: Use ib_device_set_netdev()
> >   RDMA/core: Add common iWARP query port
> >   RDMA/{cxgb3, cxgb4, i40iw}: Remove common code
>
> Thanks, series applied to for-next.

Doug,

First patch is not accurate and need to be reworked/discussed.

first, it changed "Phy Test" output to be "PhyTest" and second
"<unknown>" was changed to be "Unknown". I don't think that it is a big
deal, but who knows what will break after this change.

Thanks

>
> --
> Doug Ledford <dledford@redhat.com>
>     GPG KeyID: B826A3330E572FDD
>     Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
Doug Ledford Aug. 8, 2019, 8:38 p.m. UTC | #3
On Thu, 2019-08-08 at 10:54 +0300, Leon Romanovsky wrote:
> On Wed, Aug 07, 2019 at 03:56:26PM -0400, Doug Ledford wrote:
> > On Wed, 2019-08-07 at 13:31 +0300, Kamal Heib wrote:
> > > This series includes few cleanups and improvements, the first
> > > patch
> > > introduce a new enum for describing the physical state values and
> > > use
> > > it
> > > instead of using the magic numbers, patch 2-4 add support for a
> > > common
> > > query port for iWARP drivers and remove the common code from the
> > > iWARP
> > > drivers.
> > > 
> > > Changes from v3:
> > > - Patch #1:
> > > -- Introduce phys_state_to_str() and use it.
> > > 
> > > Changes from v2:
> > > - Patch #1:
> > > -- Update mlx4 and hns to use the new ib_port_phys_state enum.
> > > - Patch #3:
> > > -- Use rdma_protocol_iwarp() instead of rdma_node_get_transport().
> > > 
> > > Changes from v1 :
> > > - Patch #3:
> > > -- Delete __ prefix.
> > > -- Add missing dev_put(netdev);
> > > -- Initilize gid to {}.
> > > -- Return error code directly.
> > > 
> > > Kamal Heib (4):
> > >   RDMA: Introduce ib_port_phys_state enum
> > >   RDMA/cxgb3: Use ib_device_set_netdev()
> > >   RDMA/core: Add common iWARP query port
> > >   RDMA/{cxgb3, cxgb4, i40iw}: Remove common code
> > 
> > Thanks, series applied to for-next.
> 
> Doug,
> 
> First patch is not accurate and need to be reworked/discussed.
> 
> first, it changed "Phy Test" output to be "PhyTest" and second
> "<unknown>" was changed to be "Unknown". I don't think that it is a
> big
> deal, but who knows what will break after this change.

A quick grep -r of rdma-core for "Phy Test" and "unknown" says nothing
will break, but that doesn't attest to anything else.

It is also still in my wip branch, so can be fixed directly if needed.
Jason Gunthorpe Aug. 12, 2019, 12:18 p.m. UTC | #4
On Thu, Aug 08, 2019 at 04:38:19PM -0400, Doug Ledford wrote:
> On Thu, 2019-08-08 at 10:54 +0300, Leon Romanovsky wrote:
> > On Wed, Aug 07, 2019 at 03:56:26PM -0400, Doug Ledford wrote:
> > > On Wed, 2019-08-07 at 13:31 +0300, Kamal Heib wrote:
> > > > This series includes few cleanups and improvements, the first
> > > > patch
> > > > introduce a new enum for describing the physical state values and
> > > > use
> > > > it
> > > > instead of using the magic numbers, patch 2-4 add support for a
> > > > common
> > > > query port for iWARP drivers and remove the common code from the
> > > > iWARP
> > > > drivers.
> > > > 
> > > > Changes from v3:
> > > > - Patch #1:
> > > > 
> > > > Changes from v2:
> > > > - Patch #1:
> > > > - Patch #3:
> > > > 
> > > > Changes from v1 :
> > > > - Patch #3:
> > > > 
> > > > Kamal Heib (4):
> > > >   RDMA: Introduce ib_port_phys_state enum
> > > >   RDMA/cxgb3: Use ib_device_set_netdev()
> > > >   RDMA/core: Add common iWARP query port
> > > >   RDMA/{cxgb3, cxgb4, i40iw}: Remove common code
> > > 
> > > Thanks, series applied to for-next.
> > 
> > Doug,
> > 
> > First patch is not accurate and need to be reworked/discussed.
> > 
> > first, it changed "Phy Test" output to be "PhyTest" and second
> > "<unknown>" was changed to be "Unknown". I don't think that it is a
> > big
> > deal, but who knows what will break after this change.
> 
> A quick grep -r of rdma-core for "Phy Test" and "unknown" says nothing
> will break, but that doesn't attest to anything else.
> 
> It is also still in my wip branch, so can be fixed directly if needed.

There is no reason to change the text so we should fix it

Jason
Doug Ledford Aug. 12, 2019, 2:21 p.m. UTC | #5
On Mon, 2019-08-12 at 09:18 -0300, Jason Gunthorpe wrote:
> On Thu, Aug 08, 2019 at 04:38:19PM -0400, Doug Ledford wrote:
> > On Thu, 2019-08-08 at 10:54 +0300, Leon Romanovsky wrote:
> > > On Wed, Aug 07, 2019 at 03:56:26PM -0400, Doug Ledford wrote:
> > > > On Wed, 2019-08-07 at 13:31 +0300, Kamal Heib wrote:
> > > > > This series includes few cleanups and improvements, the first
> > > > > patch
> > > > > introduce a new enum for describing the physical state values
> > > > > and
> > > > > use
> > > > > it
> > > > > instead of using the magic numbers, patch 2-4 add support for
> > > > > a
> > > > > common
> > > > > query port for iWARP drivers and remove the common code from
> > > > > the
> > > > > iWARP
> > > > > drivers.
> > > > > 
> > > > > Changes from v3:
> > > > > - Patch #1:
> > > > > 
> > > > > Changes from v2:
> > > > > - Patch #1:
> > > > > - Patch #3:
> > > > > 
> > > > > Changes from v1 :
> > > > > - Patch #3:
> > > > > 
> > > > > Kamal Heib (4):
> > > > >   RDMA: Introduce ib_port_phys_state enum
> > > > >   RDMA/cxgb3: Use ib_device_set_netdev()
> > > > >   RDMA/core: Add common iWARP query port
> > > > >   RDMA/{cxgb3, cxgb4, i40iw}: Remove common code
> > > > 
> > > > Thanks, series applied to for-next.
> > > 
> > > Doug,
> > > 
> > > First patch is not accurate and need to be reworked/discussed.
> > > 
> > > first, it changed "Phy Test" output to be "PhyTest" and second
> > > "<unknown>" was changed to be "Unknown". I don't think that it is
> > > a
> > > big
> > > deal, but who knows what will break after this change.
> > 
> > A quick grep -r of rdma-core for "Phy Test" and "unknown" says
> > nothing
> > will break, but that doesn't attest to anything else.
> > 
> > It is also still in my wip branch, so can be fixed directly if
> > needed.
> 
> There is no reason to change the text so we should fix it
> 
> Jason

Done.  Rebased to fix issue, will repush my wip branch.