From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Wang Subject: Re: [PATCH 0/2 RESEND] IB/Verbs: Use helpers to refine the checking on transport and link layer Date: Fri, 27 Mar 2015 10:52:10 +0100 Message-ID: <5515284A.3030106@profitbricks.com> References: <5512CFB0.1050108@profitbricks.com> <1427378940.21101.100.camel@redhat.com> <55142DFD.2060100@profitbricks.com> <1427387258.21101.124.camel@redhat.com> <55143AAC.8040206@profitbricks.com> <20150326211334.GA3359@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150326211334.GA3359-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , Trond Myklebust , "J. Bruce Fields" , "David S. Miller" , Moni Shoua , Or Gerlitz , Tatyana Nikolova , Steve Wise , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Jiri Kosina , Matan Barak , Majd Dibbiny List-Id: linux-rdma@vger.kernel.org Hi, Jason Thanks for the reply :-) On 03/26/2015 10:13 PM, Jason Gunthorpe wrote: > On Thu, Mar 26, 2015 at 05:58:20PM +0100, Michael Wang wrote: > >> The questions is just wondering how the transition method could be, but >> if we have to do the changes for vendor, that sounds like a tough job... > I would see changing how the information is represented in the struct > as a follow on issue. The first patch should go through and replace > all direct access to the link layer/transport/etc with an > appropriately narrow is_XX() test like Doug was suggesting. Sounds like a good plan, I'd like to change the second patch to introduce these new helpers, later when we come to a good solution, rework should be far more easier. > > That means looking at each code site and determining what it needs, > making a is_XX for it and a kdoc describing exactly what is needed for > the test to return true. Basically I found there are three kind of check in current implementation: 1. check transport type of device only I'd like to use helper has_XX(device) which means some port of the device has XX capability. 2. check link layer of device's port only I'd like to use helper cap_XX(device, port) which means the port has XX capability 3. check both the transport type and link layer I'd like to use helper tech_XX(device, port) which means the port of that device using technology ib, iwrap, iboe(roce) ... > > The follow on patch can then rework the is_XX and drop the link > layer/transport stuff.. > > Some ideas for is_XX: > IB compatible SA > QP0 SMP mechanism > IB SMP format > OPA SMP format > QP1 GMP mechanism > IB compatible CM > GID addressing > IP/IPv6 addressing > Ethernet VLAN > ... Let's discuss and figure out the right name in the thread of v2 patch set, I guess there will be a lot to be correct :-P Regards, Michael Wang > > Jason -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbbC0JwS (ORCPT ); Fri, 27 Mar 2015 05:52:18 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:38424 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753370AbbC0JwO (ORCPT ); Fri, 27 Mar 2015 05:52:14 -0400 Message-ID: <5515284A.3030106@profitbricks.com> Date: Fri, 27 Mar 2015 10:52:10 +0100 From: Michael Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jason Gunthorpe CC: Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , Trond Myklebust , "J. Bruce Fields" , "David S. Miller" , Moni Shoua , Or Gerlitz , Tatyana Nikolova , Steve Wise , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Jiri Kosina , Matan Barak , Majd Dibbiny , Dan Carpenter , Mel Gorman , Alex Estrin , Eric Dumazet , Erez Shitrit , Sagi Grimberg , Haggai Eran , Shachar Raindel , Mike Marciniszyn , Tom Tucker , Chuck Lever Subject: Re: [PATCH 0/2 RESEND] IB/Verbs: Use helpers to refine the checking on transport and link layer References: <5512CFB0.1050108@profitbricks.com> <1427378940.21101.100.camel@redhat.com> <55142DFD.2060100@profitbricks.com> <1427387258.21101.124.camel@redhat.com> <55143AAC.8040206@profitbricks.com> <20150326211334.GA3359@obsidianresearch.com> In-Reply-To: <20150326211334.GA3359@obsidianresearch.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jason Thanks for the reply :-) On 03/26/2015 10:13 PM, Jason Gunthorpe wrote: > On Thu, Mar 26, 2015 at 05:58:20PM +0100, Michael Wang wrote: > >> The questions is just wondering how the transition method could be, but >> if we have to do the changes for vendor, that sounds like a tough job... > I would see changing how the information is represented in the struct > as a follow on issue. The first patch should go through and replace > all direct access to the link layer/transport/etc with an > appropriately narrow is_XX() test like Doug was suggesting. Sounds like a good plan, I'd like to change the second patch to introduce these new helpers, later when we come to a good solution, rework should be far more easier. > > That means looking at each code site and determining what it needs, > making a is_XX for it and a kdoc describing exactly what is needed for > the test to return true. Basically I found there are three kind of check in current implementation: 1. check transport type of device only I'd like to use helper has_XX(device) which means some port of the device has XX capability. 2. check link layer of device's port only I'd like to use helper cap_XX(device, port) which means the port has XX capability 3. check both the transport type and link layer I'd like to use helper tech_XX(device, port) which means the port of that device using technology ib, iwrap, iboe(roce) ... > > The follow on patch can then rework the is_XX and drop the link > layer/transport stuff.. > > Some ideas for is_XX: > IB compatible SA > QP0 SMP mechanism > IB SMP format > OPA SMP format > QP1 GMP mechanism > IB compatible CM > GID addressing > IP/IPv6 addressing > Ethernet VLAN > ... Let's discuss and figure out the right name in the thread of v2 patch set, I guess there will be a lot to be correct :-P Regards, Michael Wang > > Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Wang Subject: Re: [PATCH 0/2 RESEND] IB/Verbs: Use helpers to refine the checking on transport and link layer Date: Fri, 27 Mar 2015 10:52:10 +0100 Message-ID: <5515284A.3030106@profitbricks.com> References: <5512CFB0.1050108@profitbricks.com> <1427378940.21101.100.camel@redhat.com> <55142DFD.2060100@profitbricks.com> <1427387258.21101.124.camel@redhat.com> <55143AAC.8040206@profitbricks.com> <20150326211334.GA3359@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier , Sean Hefty , Hal Rosenstock , Ira Weiny , Trond Myklebust , "J. Bruce Fields" , "David S. Miller" , Moni Shoua , Or Gerlitz , Tatyana Nikolova , Steve Wise , Yan Burman , Jack Morgenstein , Bart Van Assche , Yann Droneaud , Colin Ian King , Jiri Kosina , Matan Barak , Majd Dibbiny Return-path: In-Reply-To: <20150326211334.GA3359-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org Hi, Jason Thanks for the reply :-) On 03/26/2015 10:13 PM, Jason Gunthorpe wrote: > On Thu, Mar 26, 2015 at 05:58:20PM +0100, Michael Wang wrote: > >> The questions is just wondering how the transition method could be, but >> if we have to do the changes for vendor, that sounds like a tough job... > I would see changing how the information is represented in the struct > as a follow on issue. The first patch should go through and replace > all direct access to the link layer/transport/etc with an > appropriately narrow is_XX() test like Doug was suggesting. Sounds like a good plan, I'd like to change the second patch to introduce these new helpers, later when we come to a good solution, rework should be far more easier. > > That means looking at each code site and determining what it needs, > making a is_XX for it and a kdoc describing exactly what is needed for > the test to return true. Basically I found there are three kind of check in current implementation: 1. check transport type of device only I'd like to use helper has_XX(device) which means some port of the device has XX capability. 2. check link layer of device's port only I'd like to use helper cap_XX(device, port) which means the port has XX capability 3. check both the transport type and link layer I'd like to use helper tech_XX(device, port) which means the port of that device using technology ib, iwrap, iboe(roce) ... > > The follow on patch can then rework the is_XX and drop the link > layer/transport stuff.. > > Some ideas for is_XX: > IB compatible SA > QP0 SMP mechanism > IB SMP format > OPA SMP format > QP1 GMP mechanism > IB compatible CM > GID addressing > IP/IPv6 addressing > Ethernet VLAN > ... Let's discuss and figure out the right name in the thread of v2 patch set, I guess there will be a lot to be correct :-P Regards, Michael Wang > > Jason -- 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