* [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables
@ 2017-09-30 1:13 Avinash Repaka
2017-09-30 1:38 ` Santosh Shilimkar
[not found] ` <1506734030-15205-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 2 replies; 7+ messages in thread
From: Avinash Repaka @ 2017-09-30 1:13 UTC (permalink / raw)
To: Santosh Shilimkar, David S. Miller, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA,
rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Avinash Repaka
This patch fixes the scope of has_fr and has_fmr variables as they are
needed only in rds_ib_add_one().
Signed-off-by: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
net/rds/ib.c | 11 ++++++-----
net/rds/ib.h | 2 --
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/net/rds/ib.c b/net/rds/ib.c
index a0954ac..36dd209 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -126,6 +126,7 @@ void rds_ib_dev_put(struct rds_ib_device *rds_ibdev)
static void rds_ib_add_one(struct ib_device *device)
{
struct rds_ib_device *rds_ibdev;
+ bool has_fr, has_fmr;
/* Only handle IB (no iWARP) devices */
if (device->node_type != RDMA_NODE_IB_CA)
@@ -143,11 +144,11 @@ static void rds_ib_add_one(struct ib_device *device)
rds_ibdev->max_wrs = device->attrs.max_qp_wr;
rds_ibdev->max_sge = min(device->attrs.max_sge, RDS_IB_MAX_SGE);
- rds_ibdev->has_fr = (device->attrs.device_cap_flags &
- IB_DEVICE_MEM_MGT_EXTENSIONS);
- rds_ibdev->has_fmr = (device->alloc_fmr && device->dealloc_fmr &&
- device->map_phys_fmr && device->unmap_fmr);
- rds_ibdev->use_fastreg = (rds_ibdev->has_fr && !rds_ibdev->has_fmr);
+ has_fr = (device->attrs.device_cap_flags &
+ IB_DEVICE_MEM_MGT_EXTENSIONS);
+ has_fmr = (device->alloc_fmr && device->dealloc_fmr &&
+ device->map_phys_fmr && device->unmap_fmr);
+ rds_ibdev->use_fastreg = (has_fr && !has_fmr);
rds_ibdev->fmr_max_remaps = device->attrs.max_map_per_fmr?: 32;
rds_ibdev->max_1m_mrs = device->attrs.max_mr ?
diff --git a/net/rds/ib.h b/net/rds/ib.h
index bf48224..6ea6a27 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -215,8 +215,6 @@ struct rds_ib_device {
struct list_head conn_list;
struct ib_device *dev;
struct ib_pd *pd;
- bool has_fmr;
- bool has_fr;
bool use_fastreg;
unsigned int max_mrs;
--
2.4.11
--
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
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables 2017-09-30 1:13 [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables Avinash Repaka @ 2017-09-30 1:38 ` Santosh Shilimkar [not found] ` <1506734030-15205-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 1 sibling, 0 replies; 7+ messages in thread From: Santosh Shilimkar @ 2017-09-30 1:38 UTC (permalink / raw) To: Avinash Repaka, David S. Miller, netdev, linux-rdma, rds-devel, linux-kernel On 9/29/2017 6:13 PM, Avinash Repaka wrote: > This patch fixes the scope of has_fr and has_fmr variables as they are > needed only in rds_ib_add_one(). > > Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com> > --- Indeed the final merge version actually didn't need those across files. Change looks good to me. Thanks !! Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1506734030-15205-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables [not found] ` <1506734030-15205-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> @ 2017-10-02 5:54 ` David Miller [not found] ` <20171001.225419.1632354964848604960.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: David Miller @ 2017-10-02 5:54 UTC (permalink / raw) To: avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA Cc: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, rds-devel-N0ozoZBvEnrZJqsBc5GL+g, linux-kernel-u79uwXL29TY76Z2rM5mHXA From: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> Date: Fri, 29 Sep 2017 18:13:50 -0700 > This patch fixes the scope of has_fr and has_fmr variables as they are > needed only in rds_ib_add_one(). > > Signed-off-by: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> Applied. -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20171001.225419.1632354964848604960.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>]
* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables [not found] ` <20171001.225419.1632354964848604960.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> @ 2017-10-02 5:56 ` David Miller 2017-10-02 20:30 ` Santosh Shilimkar 0 siblings, 1 reply; 7+ messages in thread From: David Miller @ 2017-10-02 5:56 UTC (permalink / raw) To: avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA Cc: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, rds-devel-N0ozoZBvEnrZJqsBc5GL+g, linux-kernel-u79uwXL29TY76Z2rM5mHXA From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> Date: Sun, 01 Oct 2017 22:54:19 -0700 (PDT) > From: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > Date: Fri, 29 Sep 2017 18:13:50 -0700 > >> This patch fixes the scope of has_fr and has_fmr variables as they are >> needed only in rds_ib_add_one(). >> >> Signed-off-by: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > > Applied. Actually, reverted, this breaks the build. net/rds/rdma_transport.c:38:10: fatal error: ib.h: No such file or directory #include "ib.h" Although I can't see how in the world this patch is causing such an error. -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables 2017-10-02 5:56 ` David Miller @ 2017-10-02 20:30 ` Santosh Shilimkar [not found] ` <1172819f-1c28-7756-4874-aa89f50c0733-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Santosh Shilimkar @ 2017-10-02 20:30 UTC (permalink / raw) To: David Miller, avinash.repaka; +Cc: netdev, linux-rdma, rds-devel, linux-kernel On 10/1/2017 10:56 PM, David Miller wrote: > From: David Miller <davem@davemloft.net> > Date: Sun, 01 Oct 2017 22:54:19 -0700 (PDT) > >> From: Avinash Repaka <avinash.repaka@oracle.com> >> Date: Fri, 29 Sep 2017 18:13:50 -0700 >> >>> This patch fixes the scope of has_fr and has_fmr variables as they are >>> needed only in rds_ib_add_one(). >>> >>> Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com> >> >> Applied. > > Actually, reverted, this breaks the build. > > net/rds/rdma_transport.c:38:10: fatal error: ib.h: No such file or directory > #include "ib.h" > > Although I can't see how in the world this patch is causing such > an error. > Weird indeed. Will sort this out with Avinash. Thanks Dave. Regards, Santosh ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1172819f-1c28-7756-4874-aa89f50c0733-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables [not found] ` <1172819f-1c28-7756-4874-aa89f50c0733-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> @ 2017-10-04 0:42 ` Santosh Shilimkar [not found] ` <d1f841a7-0c1d-9d20-ee33-6e260b5d84c4-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Santosh Shilimkar @ 2017-10-04 0:42 UTC (permalink / raw) To: David Miller Cc: avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, rds-devel-N0ozoZBvEnrZJqsBc5GL+g, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hi Dave, On 10/2/2017 1:30 PM, Santosh Shilimkar wrote: > On 10/1/2017 10:56 PM, David Miller wrote: >> From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> [...] >> >> Actually, reverted, this breaks the build. >> >> net/rds/rdma_transport.c:38:10: fatal error: ib.h: No such file or >> directory >> #include "ib.h" >> >> Although I can't see how in the world this patch is causing such >> an error. >> > Weird indeed. Will sort this out with Avinash. Thanks Dave. > I tried few build combinations on net-next but couldn't reproduce the build failure. AFAIU, the build error can only happen if for some reason the ib.h file got deleted accidentally. I did delete ib.h file and saw below error CC [M] net/rds/rdma_transport.o net/rds/rdma_transport.c:38:16: error: ib.h: No such file or directory Could it be the case for some reason the ib.h file got deleted or mangled while applying the $subject patch ? Regards, Santosh -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <d1f841a7-0c1d-9d20-ee33-6e260b5d84c4-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables [not found] ` <d1f841a7-0c1d-9d20-ee33-6e260b5d84c4-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> @ 2017-10-04 4:06 ` David Miller 0 siblings, 0 replies; 7+ messages in thread From: David Miller @ 2017-10-04 4:06 UTC (permalink / raw) To: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA Cc: avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA, rds-devel-N0ozoZBvEnrZJqsBc5GL+g, linux-kernel-u79uwXL29TY76Z2rM5mHXA From: Santosh Shilimkar <santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> Date: Tue, 3 Oct 2017 17:42:39 -0700 > Hi Dave, > > On 10/2/2017 1:30 PM, Santosh Shilimkar wrote: >> On 10/1/2017 10:56 PM, David Miller wrote: >>> From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> > [...] > >>> >>> Actually, reverted, this breaks the build. >>> >>> net/rds/rdma_transport.c:38:10: fatal error: ib.h: No such file or >>> directory >>> #include "ib.h" >>> >>> Although I can't see how in the world this patch is causing such >>> an error. >>> >> Weird indeed. Will sort this out with Avinash. Thanks Dave. >> > I tried few build combinations on net-next but couldn't > reproduce the build failure. AFAIU, the build error can only > happen if for some reason the ib.h file got deleted > accidentally. I did delete ib.h file and saw below error > > CC [M] net/rds/rdma_transport.o > net/rds/rdma_transport.c:38:16: error: ib.h: No such file or directory > > Could it be the case for some reason the ib.h file got > deleted or mangled while applying the $subject patch ? Please post the patch again, I will try to sort it out. -- 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-04 4:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-30 1:13 [PATCH net] RDS: IB: Limit the scope of has_fr/has_fmr variables Avinash Repaka
2017-09-30 1:38 ` Santosh Shilimkar
[not found] ` <1506734030-15205-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-10-02 5:54 ` David Miller
[not found] ` <20171001.225419.1632354964848604960.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-10-02 5:56 ` David Miller
2017-10-02 20:30 ` Santosh Shilimkar
[not found] ` <1172819f-1c28-7756-4874-aa89f50c0733-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-10-04 0:42 ` Santosh Shilimkar
[not found] ` <d1f841a7-0c1d-9d20-ee33-6e260b5d84c4-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-10-04 4:06 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).