[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150422001249.GZ15893@phlsvsds.ph.intel.com>
Date: Tue, 21 Apr 2015 20:12:49 -0400
From: "ira.weiny" <ira.weiny@...el.com>
To: Michael Wang <yun.wang@...fitbricks.com>
Cc: Roland Dreier <roland@...nel.org>,
Sean Hefty <sean.hefty@...el.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, hal@....mellanox.co.il,
Tom Tucker <tom@...ngridcomputing.com>,
Steve Wise <swise@...ngridcomputing.com>,
Hoang-Nam Nguyen <hnguyen@...ibm.com>,
Christoph Raisch <raisch@...ibm.com>,
Mike Marciniszyn <infinipath@...el.com>,
Eli Cohen <eli@...lanox.com>,
Faisal Latif <faisal.latif@...el.com>,
Jack Morgenstein <jackm@....mellanox.co.il>,
Or Gerlitz <ogerlitz@...lanox.com>,
Haggai Eran <haggaie@...lanox.com>,
Tom Talpey <tom@...pey.com>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
Doug Ledford <dledford@...hat.com>
Subject: Re: [PATCH v5 26/27] IB/Verbs: Clean up rdma_ib_or_iboe()
On Mon, Apr 20, 2015 at 10:43:26AM +0200, Michael Wang wrote:
>
> We have finished introducing the cap_XX(), and raw helper rdma_ib_or_iboe()
> is no longer necessary, thus clean it up.
>
> Cc: Hal Rosenstock <hal@....mellanox.co.il>
> Cc: Steve Wise <swise@...ngridcomputing.com>
> Cc: Tom Talpey <tom@...pey.com>
> Cc: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> Cc: Doug Ledford <dledford@...hat.com>
> Cc: Ira Weiny <ira.weiny@...el.com>
> Cc: Sean Hefty <sean.hefty@...el.com>
> Signed-off-by: Michael Wang <yun.wang@...fitbricks.com>
Reviewed-by: Ira Weiny <ira.weiny@...el.com>
>
> ---
> include/rdma/ib_verbs.h | 19 +++++++++----------
> net/sunrpc/xprtrdma/svc_rdma_transport.c | 6 ++++--
> 2 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 45050cb..0c0a4f0 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -1766,13 +1766,6 @@ static inline int rdma_tech_iwarp(struct ib_device *device, u8 port_num)
> == RDMA_TRANSPORT_IWARP;
> }
>
> -static inline int rdma_ib_or_iboe(struct ib_device *device, u8 port_num)
> -{
> - enum rdma_transport_type tp = device->query_transport(device, port_num);
> -
> - return (tp == RDMA_TRANSPORT_IB || tp == RDMA_TRANSPORT_IBOE);
> -}
> -
> /**
> * cap_ib_mad - Check if the port of device has the capability Infiniband
> * Management Datagrams.
> @@ -1785,7 +1778,9 @@ static inline int rdma_ib_or_iboe(struct ib_device *device, u8 port_num)
> */
> static inline int cap_ib_mad(struct ib_device *device, u8 port_num)
> {
> - return rdma_ib_or_iboe(device, port_num);
> + enum rdma_transport_type tp = device->query_transport(device, port_num);
> +
> + return (tp == RDMA_TRANSPORT_IB || tp == RDMA_TRANSPORT_IBOE);
> }
>
> /**
> @@ -1815,7 +1810,9 @@ static inline int cap_ib_smi(struct ib_device *device, u8 port_num)
> */
> static inline int cap_ib_cm(struct ib_device *device, u8 port_num)
> {
> - return rdma_ib_or_iboe(device, port_num);
> + enum rdma_transport_type tp = device->query_transport(device, port_num);
> +
> + return (tp == RDMA_TRANSPORT_IB || tp == RDMA_TRANSPORT_IBOE);
> }
>
> /**
> @@ -1890,7 +1887,9 @@ static inline int cap_ipoib(struct ib_device *device, u8 port_num)
> */
> static inline int cap_af_ib(struct ib_device *device, u8 port_num)
> {
> - return rdma_ib_or_iboe(device, port_num);
> + enum rdma_transport_type tp = device->query_transport(device, port_num);
> +
> + return (tp == RDMA_TRANSPORT_IB || tp == RDMA_TRANSPORT_IBOE);
> }
>
> /**
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index a09b7a1..8af6f92 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -987,8 +987,10 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
> */
> if (!rdma_tech_iwarp(newxprt->sc_cm_id->device,
> newxprt->sc_cm_id->port_num) &&
> - !rdma_ib_or_iboe(newxprt->sc_cm_id->device,
> - newxprt->sc_cm_id->port_num))
> + !rdma_tech_ib(newxprt->sc_cm_id->device,
> + newxprt->sc_cm_id->port_num) &&
> + !rdma_tech_iboe(newxprt->sc_cm_id->device,
> + newxprt->sc_cm_id->port_num))
> goto errout;
>
> if (!(newxprt->sc_dev_caps & SVCRDMA_DEVCAP_FAST_REG) ||
> --
> 2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists