From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Wang Subject: Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check Date: Mon, 30 Mar 2015 18:21:55 +0200 Message-ID: <55197823.9070006@profitbricks.com> References: <551579CA.4030901@profitbricks.com> <55157B98.1060103@profitbricks.com> <1427731980.21101.199.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427731980.21101.199.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Doug Ledford Cc: Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "J. Bruce Fields" , Trond Myklebust , "David S. Miller" , Or Gerlitz , Moni Shoua , PJ Waskiewicz , Tatyana Nikolova , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Majd Dibbiny , Jiri Kosina , Matan Barak , Alex Estrin List-Id: linux-rdma@vger.kernel.org On 03/30/2015 06:13 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:47 +0100, Michael Wang wrote: >> Introduce helper has_iwarp() to help us check if an IB device >> support IWARP protocol. > This is a needless redirection. Just stick with the original > rdma_transport_is_iwarp(). Agree, will leave it there :-) Regards, Michael Wang > >> Cc: Jason Gunthorpe >> Cc: Doug Ledford >> Cc: Ira Weiny >> Cc: Sean Hefty >> Signed-off-by: Michael Wang >> --- >> include/rdma/ib_verbs.h | 13 +++++++++++++ >> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- >> 2 files changed, 14 insertions(+), 1 deletion(-) >> >> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >> index e796104..0ef9cd7 100644 >> --- a/include/rdma/ib_verbs.h >> +++ b/include/rdma/ib_verbs.h >> @@ -1836,6 +1836,19 @@ static inline int has_mcast(struct ib_device *device) >> } >> >> /** >> + * has_iwarp - Check if a device support IWARP protocol. >> + * >> + * @device: Device to be checked >> + * >> + * Return 0 when a device has none port to support >> + * IWARP protocol. >> + */ >> +static inline int has_iwarp(struct ib_device *device) >> +{ >> + return rdma_transport_is_iwarp(device); >> +} >> + >> +/** >> * cap_smi - Check if the port of device has the capability >> * Subnet Management Interface. >> * >> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> index a7b5891..48aeb5e 100644 >> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> @@ -118,7 +118,7 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp, >> >> static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) >> { >> - if (rdma_transport_is_iwarp(xprt->sc_cm_id->device)) >> + if (has_iwarp(xprt->sc_cm_id->device)) >> return 1; >> else >> return min_t(int, sge_count, xprt->sc_max_sge); > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753298AbbC3QWB (ORCPT ); Mon, 30 Mar 2015 12:22:01 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:33757 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753172AbbC3QV6 (ORCPT ); Mon, 30 Mar 2015 12:21:58 -0400 Message-ID: <55197823.9070006@profitbricks.com> Date: Mon, 30 Mar 2015 18:21:55 +0200 From: Michael Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Doug Ledford CC: Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, "J. Bruce Fields" , Trond Myklebust , "David S. Miller" , Or Gerlitz , Moni Shoua , PJ Waskiewicz , Tatyana Nikolova , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Majd Dibbiny , Jiri Kosina , Matan Barak , Alex Estrin , Eric Dumazet , Erez Shitrit , Sagi Grimberg , Haggai Eran , Shachar Raindel , Mike Marciniszyn , Steve Wise , Tom Tucker , Chuck Lever Subject: Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check References: <551579CA.4030901@profitbricks.com> <55157B98.1060103@profitbricks.com> <1427731980.21101.199.camel@redhat.com> In-Reply-To: <1427731980.21101.199.camel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/30/2015 06:13 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:47 +0100, Michael Wang wrote: >> Introduce helper has_iwarp() to help us check if an IB device >> support IWARP protocol. > This is a needless redirection. Just stick with the original > rdma_transport_is_iwarp(). Agree, will leave it there :-) Regards, Michael Wang > >> Cc: Jason Gunthorpe >> Cc: Doug Ledford >> Cc: Ira Weiny >> Cc: Sean Hefty >> Signed-off-by: Michael Wang >> --- >> include/rdma/ib_verbs.h | 13 +++++++++++++ >> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- >> 2 files changed, 14 insertions(+), 1 deletion(-) >> >> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >> index e796104..0ef9cd7 100644 >> --- a/include/rdma/ib_verbs.h >> +++ b/include/rdma/ib_verbs.h >> @@ -1836,6 +1836,19 @@ static inline int has_mcast(struct ib_device *device) >> } >> >> /** >> + * has_iwarp - Check if a device support IWARP protocol. >> + * >> + * @device: Device to be checked >> + * >> + * Return 0 when a device has none port to support >> + * IWARP protocol. >> + */ >> +static inline int has_iwarp(struct ib_device *device) >> +{ >> + return rdma_transport_is_iwarp(device); >> +} >> + >> +/** >> * cap_smi - Check if the port of device has the capability >> * Subnet Management Interface. >> * >> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> index a7b5891..48aeb5e 100644 >> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> @@ -118,7 +118,7 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp, >> >> static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) >> { >> - if (rdma_transport_is_iwarp(xprt->sc_cm_id->device)) >> + if (has_iwarp(xprt->sc_cm_id->device)) >> return 1; >> else >> return min_t(int, sge_count, xprt->sc_max_sge); > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Wang Subject: Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check Date: Mon, 30 Mar 2015 18:21:55 +0200 Message-ID: <55197823.9070006@profitbricks.com> References: <551579CA.4030901@profitbricks.com> <55157B98.1060103@profitbricks.com> <1427731980.21101.199.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "J. Bruce Fields" , Trond Myklebust , "David S. Miller" , Or Gerlitz , Moni Shoua , PJ Waskiewicz , Tatyana Nikolova , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Majd Dibbiny , Jiri Kosina , Matan Barak , Alex Estrin Return-path: In-Reply-To: <1427731980.21101.199.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 03/30/2015 06:13 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:47 +0100, Michael Wang wrote: >> Introduce helper has_iwarp() to help us check if an IB device >> support IWARP protocol. > This is a needless redirection. Just stick with the original > rdma_transport_is_iwarp(). Agree, will leave it there :-) Regards, Michael Wang > >> Cc: Jason Gunthorpe >> Cc: Doug Ledford >> Cc: Ira Weiny >> Cc: Sean Hefty >> Signed-off-by: Michael Wang >> --- >> include/rdma/ib_verbs.h | 13 +++++++++++++ >> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- >> 2 files changed, 14 insertions(+), 1 deletion(-) >> >> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >> index e796104..0ef9cd7 100644 >> --- a/include/rdma/ib_verbs.h >> +++ b/include/rdma/ib_verbs.h >> @@ -1836,6 +1836,19 @@ static inline int has_mcast(struct ib_device *device) >> } >> >> /** >> + * has_iwarp - Check if a device support IWARP protocol. >> + * >> + * @device: Device to be checked >> + * >> + * Return 0 when a device has none port to support >> + * IWARP protocol. >> + */ >> +static inline int has_iwarp(struct ib_device *device) >> +{ >> + return rdma_transport_is_iwarp(device); >> +} >> + >> +/** >> * cap_smi - Check if the port of device has the capability >> * Subnet Management Interface. >> * >> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> index a7b5891..48aeb5e 100644 >> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c >> @@ -118,7 +118,7 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp, >> >> static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) >> { >> - if (rdma_transport_is_iwarp(xprt->sc_cm_id->device)) >> + if (has_iwarp(xprt->sc_cm_id->device)) >> return 1; >> else >> return min_t(int, sge_count, xprt->sc_max_sge); > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html