From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOJg7-0002LC-P5 for qemu-devel@nongnu.org; Sun, 18 Nov 2018 04:47:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOJam-0002OV-P1 for qemu-devel@nongnu.org; Sun, 18 Nov 2018 04:42:16 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:48374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOJal-0002NJ-Gu for qemu-devel@nongnu.org; Sun, 18 Nov 2018 04:42:12 -0500 Date: Sun, 18 Nov 2018 11:42:01 +0200 From: Yuval Shaia Message-ID: <20181118094201.GF3638@lap1> References: <20181113071336.6242-1-yuval.shaia@oracle.com> <20181113071336.6242-23-yuval.shaia@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: dmitry.fleytman@gmail.com, jasowang@redhat.com, eblake@redhat.com, armbru@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, shamir.rabinovitch@oracle.com, cohuck@redhat.com, yuval.shaia@oracle.com On Sat, Nov 17, 2018 at 02:25:55PM +0200, Marcel Apfelbaum wrote: > > > On 11/13/18 9:13 AM, Yuval Shaia wrote: > > When device goes down the function fini_ports loops over all entries in > > gid table regardless of the fact whether entry is valid or not. In case > > that entry is not valid we'd like to skip from any further processing in > > backend device. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_rm.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c > > index 35a96d9a64..e3f6b2f6ea 100644 > > --- a/hw/rdma/rdma_rm.c > > +++ b/hw/rdma/rdma_rm.c > > @@ -555,6 +555,10 @@ int rdma_rm_del_gid(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev, > > { > > int rc; > > + if (!dev_res->port.gid_tbl[gid_idx].gid.global.interface_id) { > > + return 0; > > + } > > + > > rc = rdma_backend_del_gid(backend_dev, ifname, > > &dev_res->port.gid_tbl[gid_idx].gid); > > if (rc < 0) { > > Reviewed-by: Marcel Apfelbaum There seems to be a missing space separator between "Apfelbaum" and "<". Is that ok? > > Thanks, > Marcel >