From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Wise Subject: Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands Date: Wed, 28 Nov 2018 16:51:43 -0600 Message-ID: <0f14d192-7f3d-33f8-f778-595a8fd9c28d@opengridcomputing.com> References: <7026be07534b14fd74e592c315523c57fde05a0a.1543422310.git.swise@opengridcomputing.com> <20181128182645.GJ4559@mtr-leonro.mtl.com> <20181128200412.GP4559@mtr-leonro.mtl.com> <20181128201303.GR4559@mtr-leonro.mtl.com> <20181128221711.GH19914@ziepe.ca> <870b87fa-0485-5aee-239a-0312b34a4361@opengridcomputing.com> <20181128222558.GI19914@ziepe.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Leon Romanovsky , dsahern@gmail.com, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, BMT@zurich.ibm.com To: Jason Gunthorpe Return-path: Received: from opengridcomputing.com ([72.48.214.68]:38950 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbeK2Jyw (ORCPT ); Thu, 29 Nov 2018 04:54:52 -0500 In-Reply-To: <20181128222558.GI19914@ziepe.ca> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/28/2018 4:25 PM, Jason Gunthorpe wrote: > On Wed, Nov 28, 2018 at 04:21:48PM -0600, Steve Wise wrote: > >>>> It does make sense to not require type.  The name must be unique so that >>>> should be enough.  I'll have to respin the kernel side though... >>> The delete_link really should be an operation on the ib_device, not >>> the link_ops thing. >>> >>> That directly prevents mis-matching function callbacks.. >>> >>> Jason >> Looking at the rtnetlink newlink/dellink, I see they cache the link_ops >> ptr in the net_device struct.  So when the link is deleted, then >> appropriate driver-specific dellink function can be called after finding >> the device to be deleted.  Should I do something along these lines?  IE >> add a struct rdma_link_ops pointer to struct ib_device. > I don't see a problem with that either.. > > Jason Ok, I'll respin the kernel and user patches tomorrow.  Thanks!