linux-next: manual merge of the net-next tree with the rdma tree
Subsystems (5)
Hi all,
Today's linux-next merge of the net-next tree got conflicts in:
net/smc/smc_core.c
net/smc/smc_ib.c
between commit:
ddb457c6993b ("net/smc: Replace ib_query_gid with rdma_get_gid_attr")
from the rdma tree and commit:
7005ada68d17 ("net/smc: use correct vlan gid of RoCE device")
(and maybe others)
from the net-next tree.
I fixed it up (I wasn't sure how to fix this up as so much has changed in the net-next tree and both modified functions had been (re)moved, so I effectively reverted the rdma tree commit) and can carry the fix as necessary. Please come to some arrangement about this.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
I fixed it up (I wasn't sure how to fix this up as so much has changed in the net-next tree and both modified functions had been (re)moved, so I effectively reverted the rdma tree commit) and can carry the fix as necessary. Please come to some arrangement about this.
How does that still compile? We removed ib_query_gid() from the rdma tree and replaced it with rdma_get_gid_attr()..
I think the merge resolution is going to be a bit nasty to absorb that much changing..
Perhaps we should add a compatability ib_query_gid back to the RDMA tree and then send DaveM a commit to fix SMC and remove it during the next cycle? Linus can resolve smc_ib.c by using the net version
Does someone else have a better idea?
Thanks,
Jason
Hi Jason,
Quoted 10 lines · On Thu, 26 Jul 2018 20:48:32 -0600 Jason Gunthorpe <[email protected]> wrote:
Quoted 4 lines · Stephen Rothwell
I fixed it up (I wasn't sure how to fix this up as so much has changed in the net-next tree and both modified functions had been (re)moved, so I effectively reverted the rdma tree commit) and can carry the fix as necessary. Please come to some arrangement about this.
How does that still compile? We removed
ib_query_gid()from the rdma tree and replaced it withrdma_get_gid_attr()..
Yeah, it doesn't :-(
Quoted 8 lines
I think the merge resolution is going to be a bit nasty to absorb that much changing..
Perhaps we should add a compatability
ib_query_gidback to the RDMA tree and then send DaveM a commit to fix SMC and remove it during the next cycle? Linus can resolvesmc_ib.cby using the net versionDoes someone else have a better idea?
I applied this merge fix patch:
From: Stephen Rothwell <[email protected]>
Date: Fri, 27 Jul 2018 13:19:31 +1000
Subject: [PATCH] net/smc: fixups for ip_query_gid API removal
--- net/smc/smc_ib.c | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-)
net/smc/smc_ib.c +25 -22
@@ -16,6 +16,7 @@#include <linux/workqueue.h> #include <linux/scatterlist.h> #include <rdma/ib_verbs.h> +#include <rdma/ib_cache.h> #include "smc_pnet.h" #include "smc_ib.h"
@@ -144,17 +145,21 @@ int smc_ib_ready_link(struct smc_link *lnk)static int smc_ib_fill_mac (struct smc_ib_device *smcibdev,u8 ibport) { -struct ib_gid_attr gattr; -union ib_gid gid; -int rc; +const struct ib_gid_attr *gattr; +int rc =0 ; - rc =ib_query_gid (smcibdev->ibdev, ibport,0 , &gid, &gattr); -if (rc || !gattr.ndev) -return -ENODEV ; + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport,0 ); +if (IS_ERR (gattr)) +return PTR_ERR (gattr); +if (!gattr->ndev) { + rc = -ENODEV ; + goto done; + } -memcpy (smcibdev->mac[ibport -1 ], gattr.ndev->dev_addr,ETH_ALEN ); -dev_put (gattr.ndev); -return 0 ; +memcpy (smcibdev->mac[ibport -1 ], gattr->ndev->dev_addr,ETH_ALEN ); +done: +rdma_put_gid_attr (gattr); +return rc; }/* Create an identifier unique for this instance of SMC-R.
@@ -179,29 +184,27 @@ bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport)int smc_ib_determine_gid (struct smc_ib_device *smcibdev,u8 ibport,unsigned short vlan_id,u8 gid[],u8 *sgid_index) { -struct ib_gid_attr gattr; -union ib_gid _gid; +const struct ib_gid_attr *gattr;int i;for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); -if (ib_query_gid (smcibdev->ibdev, ibport, i, &_gid, &gattr)) + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); +if (IS_ERR (gattr))continue ; -if (!gattr.ndev) +if (!gattr->ndev)continue ; -if (((!vlan_id && !is_vlan_dev (gattr.ndev)) || - (vlan_id &&is_vlan_dev (gattr.ndev) && -vlan_dev_vlan_id (gattr.ndev) == vlan_id)) && - gattr.gid_type ==IB_GID_TYPE_IB ) { +if (((!vlan_id && !is_vlan_dev (gattr->ndev)) || + (vlan_id &&is_vlan_dev (gattr->ndev) && +vlan_dev_vlan_id (gattr->ndev) == vlan_id)) && + gattr->gid_type ==IB_GID_TYPE_IB ) {if (gid) -memcpy (gid, &_gid,SMC_GID_SIZE ); +memcpy (gid, &gattr->gid,SMC_GID_SIZE );if (sgid_index) *sgid_index = i; -dev_put (gattr.ndev); +rdma_put_gid_attr (gattr);return 0 ; } -dev_put (gattr.ndev); +rdma_put_gid_attr (gattr); }return -ENODEV ; }
Signature · 5 lines
2.18.0 -- Cheers, Stephen Rothwell
Hi all,
Quoted 2 lines · On Fri, 27 Jul 2018 13:28:47 +1000 Stephen Rothwell <[email protected]>…
I applied this merge fix patch:
The final conflict resolution actually looks like this:
(the rdma tree changes to net/smc/smc_core.c are dropped)
c1d4bb2af93573ee4a21538a1a97b568a2344499
net/smc/smc_ib.c +0 -0
@@@ -144,6 -142,93 +143,95 @@@ outreturn rc; } +static int smc_ib_fill_mac (struct smc_ib_device *smcibdev,u8 ibport) + { - struct ib_gid_attr gattr; - union ib_gid gid; - int rc; ++ const struct ib_gid_attr *gattr; ++ int rc = 0; + - rc =ib_query_gid (smcibdev->ibdev, ibport,0 , &gid, &gattr); - if (rc || !gattr.ndev) - return -ENODEV ; ++ gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport,0 ); ++ if (IS_ERR(gattr)) ++ return PTR_ERR(gattr); ++ if (!gattr->ndev) { ++ rc = -ENODEV ; ++ goto done; ++ } + -memcpy (smcibdev->mac[ibport -1 ], gattr.ndev->dev_addr,ETH_ALEN ); -dev_put (gattr.ndev); - return 0; ++memcpy (smcibdev->mac[ibport -1 ], gattr->ndev->dev_addr,ETH_ALEN ); ++done: ++rdma_put_gid_attr (gattr); ++ return rc; + } + +/* Create an identifier unique for this instance of SMC-R. +* The MAC-address of the first active registered IB device +* plus a random 2-byte number is used to create this identifier. +* This name is delivered to the peer during connection initialization. +*/ +static inline void smc_ib_define_local_systemid (struct smc_ib_device *smcibdev, +u8 ibport) + { +memcpy (&local_systemid[2 ], &smcibdev->mac[ibport -1 ], +sizeof (smcibdev->mac[ibport -1 ])); +get_random_bytes (&local_systemid[0 ],2 ); + } + +bool smc_ib_port_active (struct smc_ib_device *smcibdev,u8 ibport) + { +return smcibdev->pattr[ibport -1 ].state ==IB_PORT_ACTIVE ; + } + +/* determine the gid for an ib-device port and vlan id */ +int smc_ib_determine_gid (struct smc_ib_device *smcibdev,u8 ibport, +unsigned short vlan_id,u8 gid[],u8 *sgid_index) + { - struct ib_gid_attr gattr; - union ib_gid _gid; ++ const struct ib_gid_attr *gattr; +int i; + +for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); - if (ib_query_gid(smcibdev->ibdev, ibport, i, &_gid, &gattr)) ++ gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); ++ if (IS_ERR(gattr)) + continue; - if (!gattr.ndev) ++ if (!gattr->ndev) + continue; - if (((!vlan_id && !is_vlan_dev(gattr.ndev)) || - (vlan_id &&is_vlan_dev (gattr.ndev) && -vlan_dev_vlan_id (gattr.ndev) == vlan_id)) && - gattr.gid_type == IB_GID_TYPE_IB) { ++ if (((!vlan_id && !is_vlan_dev(gattr->ndev)) || ++ (vlan_id &&is_vlan_dev (gattr->ndev) && ++vlan_dev_vlan_id (gattr->ndev) == vlan_id)) && ++ gattr->gid_type == IB_GID_TYPE_IB) { +if (gid) -memcpy (gid, &_gid,SMC_GID_SIZE ); ++memcpy (gid, &gattr->gid,SMC_GID_SIZE ); +if (sgid_index) + *sgid_index = i; -dev_put (gattr.ndev); ++rdma_put_gid_attr (gattr); +return 0 ; + } -dev_put (gattr.ndev); ++rdma_put_gid_attr (gattr); + } +return -ENODEV ; + } + +static int smc_ib_remember_port_attr (struct smc_ib_device *smcibdev,u8 ibport) + { +int rc; + +memset (&smcibdev->pattr[ibport -1 ],0 , +sizeof (smcibdev->pattr[ibport -1 ])); + rc =ib_query_port (smcibdev->ibdev, ibport, + &smcibdev->pattr[ibport -1 ]); +if (rc) + goto out; +/* the SMC protocol requires specification of the RoCE MAC address */ + rc =smc_ib_fill_mac (smcibdev, ibport); +if (rc) + goto out; +if (!strncmp (local_systemid,SMC_LOCAL_SYSTEMID_RESET , +sizeof (local_systemid)) && +smc_ib_port_active (smcibdev, ibport)) +/* create unique system identifier */ +smc_ib_define_local_systemid (smcibdev, ibport); + out: +return rc; + } +/* process context wrapper for might_sleep smc_ib_remember_port_attr */ static void smc_ib_port_event_work (struct work_struct *work) {
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 104 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Stephen Rothwell
Sent: Thursday, July 26, 2018 10:29 PM
To: Jason Gunthorpe <[email protected]>
Cc: David Miller <[email protected]>; Networking <[email protected]>; Doug Ledford <[email protected]>; Linux-Next Mailing List <[email protected]>; Linux Kernel Mailing List <linux- [email protected]>; Parav Pandit <[email protected]>; Ursula Braun <[email protected]>; Leon Romanovsky <[email protected]>; linux- [email protected]
Subject: Re: linux-next: manual merge of the net-next tree with the rdma treeHi Jason,
Quoted 10 lines · On Thu, 26 Jul 2018 20:48:32 -0600 Jason Gunthorpe <[email protected]> wrote:
Quoted 4 lines · Stephen Rothwell
I fixed it up (I wasn't sure how to fix this up as so much has changed in the net-next tree and both modified functions had been (re)moved, so I effectively reverted the rdma tree commit) and can carry the fix as necessary. Please come to some arrangement about this.
How does that still compile? We removed
ib_query_gid()from the rdma tree and replaced it withrdma_get_gid_attr()..Yeah, it doesn't :-(
Quoted 8 lines
I think the merge resolution is going to be a bit nasty to absorb that much changing..
Perhaps we should add a compatability
ib_query_gidback to the RDMA tree and then send DaveM a commit to fix SMC and remove it during the next cycle? Linus can resolvesmc_ib.cby using the net versionDoes someone else have a better idea?
I applied this merge fix patch:
From: Stephen Rothwell <[email protected]>
Date: Fri, 27 Jul 2018 13:19:31 +1000
Subject: [PATCH] net/smc: fixups forip_query_gidAPI removalSigned-off-by Stephen Rothwell <[email protected]>--- net/smc/smc_ib.c | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-)net/smc/smc_ib.c index renamed from net/smc/smc_ib.c +0
-0
2cc64bc8ae20..debc6e44f738100644net/smc/smc_ib.c +15
-11@@ -16,6 +16,7 @@#include <linux/workqueue.h> #include <linux/scatterlist.h> #include <rdma/ib_verbs.h> +#include <rdma/ib_cache.h> #include "smc_pnet.h" #include "smc_ib.h" @@ -144,17 +145,21 @@ int smc_ib_ready_link(struct smc_link *lnk)static int smc_ib_fill_mac (struct smc_ib_device *smcibdev,u8 ibport) { -struct ib_gid_attr gattr; -union ib_gid gid; -int rc; +const struct ib_gid_attr *gattr; +int rc =0 ; - rc =ib_query_gid (smcibdev->ibdev, ibport,0 , &gid, &gattr); -if (rc || !gattr.ndev) -return -ENODEV ; + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport,0 ); +if (IS_ERR (gattr)) +return PTR_ERR (gattr); +if (!gattr->ndev) { + rc = -ENODEV ; + goto done; + } -memcpy (smcibdev->mac[ibport -1 ], gattr.ndev->dev_addr,ETH_ALEN ); -dev_put (gattr.ndev); -return 0 ; +memcpy (smcibdev->mac[ibport -1 ], gattr->ndev->dev_addr,ETH_ALEN ); +done: +rdma_put_gid_attr (gattr); +return rc; }/* Create an identifier unique for this instance of SMC-R. @@ -179,29 +184,27 @@ bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport) int smc_ib_determine_gid(struct smc_ib_device *smcibdev,u8 ibport,unsigned short vlan_id,u8 gid[],u8 *sgid_index) { -struct ib_gid_attr gattr; -union ib_gid _gid; +const struct ib_gid_attr *gattr;int i;
net/smc/smc_ib.c bool smc_ib_port_active(struct smc_ib_device · line 195
Quoted 10 lines
net/smc/smc_ib.c +3
-4for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); -if (ib_query_gid (smcibdev->ibdev, ibport, i, &_gid, &gattr)) + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); +if (IS_ERR (gattr))continue ; -if (!gattr.ndev) +if (!gattr->ndev)continue ;
This requires a small fix.
If (!gattr->ndev {
rdma_put_gid_attr(gattr);
continue;
}Quoted 28 lines
net/smc/smc_ib.c +7
-8-if (((!vlan_id && !is_vlan_dev (gattr.ndev)) || - (vlan_id &&is_vlan_dev (gattr.ndev) && -vlan_dev_vlan_id (gattr.ndev) == vlan_id)) && - gattr.gid_type ==IB_GID_TYPE_IB ) { +if (((!vlan_id && !is_vlan_dev (gattr->ndev)) || + (vlan_id &&is_vlan_dev (gattr->ndev) && +vlan_dev_vlan_id (gattr->ndev) == vlan_id)) && + gattr->gid_type ==IB_GID_TYPE_IB ) {if (gid) -memcpy (gid, &_gid,SMC_GID_SIZE ); +memcpy (gid, &gattr->gid,SMC_GID_SIZE );if (sgid_index) *sgid_index = i; -dev_put (gattr.ndev); +rdma_put_gid_attr (gattr);return 0 ; } -dev_put (gattr.ndev); +rdma_put_gid_attr (gattr); }return -ENODEV ; } --2.18.0
--
Cheers,
Stephen Rothwell
Quoted 88 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Stephen Rothwell
Sent: Thursday, July 26, 2018 10:45 PM
To: Jason Gunthorpe <[email protected]>
Cc: David Miller <[email protected]>; Networking <[email protected]>; Doug Ledford <[email protected]>; Linux-Next Mailing List <[email protected]>; Linux Kernel Mailing List <linux- [email protected]>; Parav Pandit <[email protected]>; Ursula Braun <[email protected]>; Leon Romanovsky <[email protected]>; linux- [email protected]
Subject: Re: linux-next: manual merge of the net-next tree with the rdma treeHi all,
Quoted 2 lines · On Fri, 27 Jul 2018 13:28:47 +1000 Stephen Rothwell <[email protected]>…
I applied this merge fix patch:
The final conflict resolution actually looks like this:
(the rdma tree changes to
net/smc/smc_core.care dropped)
c1d4bb2af93573ee4a21538a1a97b568a2344499net/smc/smc_ib.c +14
-0@@@ -144,6 -142,93 +143,95 @@@ outreturn rc; } +static int smc_ib_fill_mac (struct smc_ib_device *smcibdev,u8 ibport) + { - struct ib_gid_attr gattr; - union ib_gid gid; - int rc; ++ const struct ib_gid_attr *gattr; ++ int rc = 0; + - rc =ib_query_gid (smcibdev->ibdev, ibport,0 , &gid, &gattr); - if (rc || !gattr.ndev) - return -ENODEV ; ++ gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport,0 ); ++ if (IS_ERR(gattr)) ++ return PTR_ERR(gattr); ++ if (!gattr->ndev) { ++ rc = -ENODEV ; ++ goto done; ++ } + -memcpy (smcibdev->mac[ibport -1 ], gattr.ndev->dev_addr,ETH_ALEN ); -dev_put (gattr.ndev); - return 0; ++ memcpy(smcibdev->mac[ibport - 1], gattr->ndev->dev_addr,
ETH_ALEN);
++done:
++rdma_put_gid_attr(gattr);
++ return rc;
+ }net/smc/smc_ib.c +7
-0+ +/* Create an identifier unique for this instance of SMC-R. +* The MAC-address of the first active registered IB device +* plus a random 2-byte number is used to create this identifier. +* This name is delivered to the peer during connection initialization. +*/ + static inline void smc_ib_define_local_systemid(struct smc_ib_device*smcibdev,
net/smc/smc_ib.c +15
-0+ u8 ibport) + { +memcpy (&local_systemid[2 ], &smcibdev->mac[ibport -1 ], +sizeof (smcibdev->mac[ibport -1 ])); +get_random_bytes (&local_systemid[0 ],2 ); } + +bool smc_ib_port_active (struct smc_ib_device *smcibdev,u8 ibport) { +return smcibdev->pattr[ibport -1 ].state ==IB_PORT_ACTIVE ; } + +/* determine the gid for an ib-device port and vlan id */ int +smc_ib_determine_gid (struct smc_ib_device *smcibdev,u8 ibport, +unsigned short vlan_id,u8 gid[],u8 *sgid_index) { - struct ib_gid_attr gattr; - union ib_gid _gid; ++ const struct ib_gid_attr *gattr; +int i; +
net/smc/smc_ib.c
Quoted 10 lines
net/smc/smc_ib.c +6
-0+for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); - if (ib_query_gid(smcibdev->ibdev, ibport, i, &_gid, &gattr)) ++ gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); ++ if (IS_ERR(gattr)) + continue; - if (!gattr.ndev) ++ if (!gattr->ndev) + continue;
Seeing this updated patch, so for completeness same reply as the previous email.
If (!gattr->ndev) {
rdma_put_gid_attr(gattr);
continue;
}Rest changes above and below looks fine to me.
Thanks for doing it, I am not part of netdev mailing list so didn't see the compile error until this patch came up.
Quoted 53 lines
- if (((!vlan_id && !is_vlan_dev(gattr.ndev)) ||
- (vlan_id&&is_vlan_dev(gattr.ndev)&&
-vlan_dev_vlan_id(gattr.ndev)==vlan_id)) &&
- gattr.gid_type ==IB_GID_TYPE_IB) {
++ if (((!vlan_id && !is_vlan_dev(gattr->ndev)) ||
++ (vlan_id&&is_vlan_dev(gattr->ndev)&&
++vlan_dev_vlan_id(gattr->ndev)==vlan_id)) &&
++gattr->gid_type==IB_GID_TYPE_IB) {net/smc/smc_ib.c +35
-1+if (gid) -memcpy (gid, &_gid,SMC_GID_SIZE ); ++memcpy (gid, &gattr->gid,SMC_GID_SIZE ); +if (sgid_index) + *sgid_index = i; -dev_put (gattr.ndev); ++rdma_put_gid_attr (gattr); +return 0 ; + } -dev_put (gattr.ndev); ++rdma_put_gid_attr (gattr); + } +return -ENODEV ; + } + +static int smc_ib_remember_port_attr (struct smc_ib_device *smcibdev, +u8 ibport) { +int rc; + +memset (&smcibdev->pattr[ibport -1 ],0 , +sizeof (smcibdev->pattr[ibport -1 ])); + rc =ib_query_port (smcibdev->ibdev, ibport, + &smcibdev->pattr[ibport -1 ]); +if (rc) + goto out; +/* the SMC protocol requires specification of the RoCE MAC address */ + rc =smc_ib_fill_mac (smcibdev, ibport); +if (rc) + goto out; +if (!strncmp (local_systemid,SMC_LOCAL_SYSTEMID_RESET , +sizeof (local_systemid)) && +smc_ib_port_active (smcibdev, ibport)) +/* create unique system identifier */ +smc_ib_define_local_systemid (smcibdev, ibport); + out: +return rc; + } +/* process context wrapper for might_sleep smc_ib_remember_port_attr */ static void smc_ib_port_event_work (struct work_struct *work) { --Cheers,
Stephen Rothwell
Hi Parav,
Quoted 12 lines · On Fri, 27 Jul 2018 04:57:41 +0000 Parav Pandit <[email protected]> wrote:
net/smc/smc_ib.c bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport) · line 195
Quoted 11 lines
net/smc/smc_ib.c +3
-4for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); -if (ib_query_gid (smcibdev->ibdev, ibport, i, &_gid, &gattr)) + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); +if (IS_ERR (gattr))continue ; -if (!gattr.ndev) +if (!gattr->ndev)continue ;This requires a small fix.
Quoted 4 lines
If (!gattr->ndev {
rdma_put_gid_attr(gattr);
continue;
}Thanks, I have fixed this up for Monday.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
Quoted 33 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Stephen Rothwell
Sent: Friday, July 27, 2018 12:09 AM
To: Parav Pandit <[email protected]>
Cc: Jason Gunthorpe <[email protected]>; David Miller <[email protected]>; Networking <[email protected]>; Doug Ledford <[email protected]>; Linux-Next Mailing List <linux- [email protected]>; Linux Kernel Mailing List <linux- [email protected]>; Ursula Braun <[email protected]>; Leon Romanovsky <[email protected]>; [email protected]
Subject: Re: linux-next: manual merge of the net-next tree with the rdma treeHi Parav,
Quoted 12 lines · On Fri, 27 Jul 2018 04:57:41 +0000 Parav Pandit <[email protected]> wrote:
net/smc/smc_ib.c bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport) · line 195
Quoted 11 lines
net/smc/smc_ib.c +3
-4for (i =0 ; i < smcibdev->pattr[ibport -1 ].gid_tbl_len; i++) { -memset (&_gid,0 ,SMC_GID_SIZE ); -memset (&gattr,0 ,sizeof (gattr)); -if (ib_query_gid (smcibdev->ibdev, ibport, i, &_gid, &gattr)) + gattr =rdma_get_gid_attr (smcibdev->ibdev, ibport, i); +if (IS_ERR (gattr))continue ; -if (!gattr.ndev) +if (!gattr->ndev)continue ;This requires a small fix.
Quoted 4 lines
If (!gattr->ndev { rdma_put_gid_attr(gattr); continue; }
Quoted 1 line
Thanks, I have fixed this up for Monday.
You might want to consider this compatibility patch in Linux-rdma tree to avoid a merge conflict of smc.
Hi Parav,
Quoted 5 lines · On Tue, 31 Jul 2018 21:12:00 +0000 Parav Pandit <[email protected]> wrote:
You might want to consider this compatibility patch in Linux-rdma tree to avoid a merge conflict of smc.
Ok, since commit that is now in the rdma tree, my resolution of the original conflicts comes down to dropping all the changes to net/smc/smc_core.c net/smc/smc_ib.c that come from the rdma tree and adding
#include <rdma/ib_cache.h>
to net/smc/smc_ib.c.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 9 lines · Stephen Rothwell
Hi Parav,
Quoted 5 lines · On Tue, 31 Jul 2018 21:12:00 +0000 Parav Pandit <[email protected]> wrote:
You might want to consider this compatibility patch in Linux-rdma tree to avoid a merge conflict of smc.
Quoted 8 lines
Ok, since commit that is now in the rdma tree, my resolution of the original conflicts comes down to dropping all the changes to
net/smc/smc_core.cnet/smc/smc_ib.cthat come from the rdma tree and adding#include <
rdma/ib_cache.h>to
net/smc/smc_ib.c.
Oh, that means I put the compat inline in the wrong header? Sigh.
Jason
Quoted 31 lines
-----Original Message-----
From: Jason Gunthorpe <[email protected]>
Sent: Wednesday, August 1, 2018 12:14 PM
To: Stephen Rothwell <[email protected]>
Cc: Parav Pandit <[email protected]>; David Miller <[email protected]>; Networking <[email protected]>; Doug Ledford <[email protected]>; Linux-Next Mailing List <linux- [email protected]>; Linux Kernel Mailing List <linux- [email protected]>; Ursula Braun <[email protected]>; Leon Romanovsky <[email protected]>; [email protected]
Subject: Re: linux-next: manual merge of the net-next tree with the rdma treeQuoted 3 lines · Stephen Rothwell
Hi Parav,
On Tue, 31 Jul 2018 21:12:00 +0000 Parav Pandit <[email protected]>
Quoted 12 lines · wrote:
Quoted 6 lines
You might want to consider this compatibility patch in Linux-rdma tree to avoid a merge conflict of smc.
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit
/?h=for-next&id=7aaa1807e698f73094b78f0ef25b1a37a4409a55Ok, since commit that is now in the rdma tree, my resolution of the original conflicts comes down to dropping all the changes to
net/smc/smc_core.cnet/smc/smc_ib.cthat come from the rdma tree and adding
Quoted 6 lines
Quoted 3 lines
#include <
rdma/ib_cache.h>to
net/smc/smc_ib.c.Oh, that means I put the compat inline in the wrong header? Sigh.
It was in wrong place originally in ib_verbs.h because lately it returned all the entries from the cache. So ib_cache.h was/is correct place.
But devel happened at pace where we eventually deprecated it.
So from pure compat perspective, yeah, it should be in wrong file i.e. ib_verbs.h but otherwise its correct in ib_cache.h.