[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0502MB3008B0D78AB418E263819EE7D12A0@VI1PR0502MB3008.eurprd05.prod.outlook.com>
Date: Fri, 27 Jul 2018 16:04:33 +0000
From: Parav Pandit <parav@...lanox.com>
To: Jason Gunthorpe <jgg@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>
CC: David Miller <davem@...emloft.net>,
Networking <netdev@...r.kernel.org>,
Doug Ledford <dledford@...hat.com>,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ursula Braun <ubraun@...ux.ibm.com>,
Leon Romanovsky <leonro@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: RE: [PATCH rdma] IB/cache: Restore compatibility for ib_query_gid
> -----Original Message-----
> From: Jason Gunthorpe
> Sent: Friday, July 27, 2018 10:54 AM
> To: linux-rdma@...r.kernel.org; Stephen Rothwell <sfr@...b.auug.org.au>
> Cc: David Miller <davem@...emloft.net>; Networking
> <netdev@...r.kernel.org>; Doug Ledford <dledford@...hat.com>; Linux-Next
> Mailing List <linux-next@...r.kernel.org>; Linux Kernel Mailing List <linux-
> kernel@...r.kernel.org>; Parav Pandit <parav@...lanox.com>; Ursula Braun
> <ubraun@...ux.ibm.com>; Leon Romanovsky <leonro@...lanox.com>; linux-
> rdma@...r.kernel.org
> Subject: [PATCH rdma] IB/cache: Restore compatibility for ib_query_gid
>
> Code changes in smc have become so complicated this cycle that the RDMA
> patches to remove ib_query_gid in smc create too complex merge conflicts.
> Allow those conflicts to be resolved by using the net/smc hunks by providing a
> compatibility wrapper. During the second phase of the merge window this
> wrapper will be deleted and smc updated to use the new API.
>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Signed-off-by: Jason Gunthorpe <jgg@...lanox.com>
> ---
> include/rdma/ib_cache.h | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> The resolution Stephen had to make is too complicated, I think we should go this
> way instead. Parav can send a patch to DaveM during the 2nd half of the merge
> window to safely update SMC and delete this wrapper.
>
Last night Stephen send the changes, if Ursula can test it, its preferred but if that is not possible,
I am with below approach too.
> Parav, can you check this?
>
> Ursula, this is only for SMC, are you able to test SMC with it? You will need to
> apply it to the RDMA tree here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=for-next
>
> Thanks,
> Jason
>
> diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index
> 1108d422027696..c7e9b42b96e5b8 100644
> --- a/include/rdma/ib_cache.h
> +++ b/include/rdma/ib_cache.h
> @@ -132,4 +132,28 @@ const struct ib_gid_attr *rdma_get_gid_attr(struct
> ib_device *device,
> u8 port_num, int index);
> void rdma_put_gid_attr(const struct ib_gid_attr *attr); void
> rdma_hold_gid_attr(const struct ib_gid_attr *attr);
> +
> +/*
> + * This is to be removed. It only exists to make merging rdma and smc simpler.
> + */
> +static inline __deprecated int ib_query_gid(struct ib_device *device,
> + u8 port_num, int index,
> + union ib_gid *gid,
> + struct ib_gid_attr *attr_out)
> +{
> + const struct ib_gid_attr *attr;
> +
> + attr = rdma_get_gid_attr(device,port_num,index);
White space after each variable is needed to avoid warnings.
> + if (IS_ERR(attr))
> + return PTR_ERR(attr);
> +
> + if (attr->ndev)
> + dev_hold(attr->ndev);
> + *attr_out = *attr;
> +
> + rdma_put_gid_attr(attr);
> +
> + return 0;
> +}
> +
> #endif /* _IB_CACHE_H */
Rest looks fine.
RB: parav@...lanox.com
Powered by blists - more mailing lists