Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-30 Thread Vishwanathapura, Niranjana
On Tue, Nov 29, 2016 at 09:21:13AM -0700, Jason Gunthorpe wrote: On Mon, Nov 28, 2016 at 10:29:38PM -0800, Vishwanathapura, Niranjana wrote: On Thu, Nov 24, 2016 at 09:15:45AM -0700, Jason Gunthorpe wrote: >>And will move the hfi_vnic module under >>???drivers/infiniband/ulp/hfi_vnic???. > >I wo

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-30 Thread Vishwanathapura, Niranjana
On Tue, Nov 29, 2016 at 09:50:09AM -0700, Jason Gunthorpe wrote: On Tue, Nov 29, 2016 at 04:44:37PM +, Hefty, Sean wrote: > You are not making a subsystem. Don't overcomplicate things. A > multi-part device device can just directly link. The VNIC may be usable over multiple generations of H

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-29 Thread Jason Gunthorpe
On Tue, Nov 29, 2016 at 04:44:37PM +, Hefty, Sean wrote: > > You are not making a subsystem. Don't overcomplicate things. A > > multi-part device device can just directly link. > > The VNIC may be usable over multiple generations of HFIs, but I > don't know if that is the intent. If Intel wan

RE: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-29 Thread Hefty, Sean
> You are not making a subsystem. Don't overcomplicate things. A > multi-part device device can just directly link. The VNIC may be usable over multiple generations of HFIs, but I don't know if that is the intent.

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-29 Thread Jason Gunthorpe
On Mon, Nov 28, 2016 at 10:29:38PM -0800, Vishwanathapura, Niranjana wrote: > On Thu, Nov 24, 2016 at 09:15:45AM -0700, Jason Gunthorpe wrote: > >>And will move the hfi_vnic module under > >>???drivers/infiniband/ulp/hfi_vnic???. > > > >I would prefer drivers/net/ethernet > > > >This is clearly not

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-29 Thread Jason Gunthorpe
On Mon, Nov 28, 2016 at 10:31:06PM -0800, Vishwanathapura, Niranjana wrote: > On Fri, Nov 25, 2016 at 12:05:09PM -0700, Jason Gunthorpe wrote: > >On Thu, Nov 24, 2016 at 06:13:50PM -0800, Vishwanathapura, Niranjana wrote: > > > >>In order to be truely device independent the hfi_vnic ULP should not

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-28 Thread Vishwanathapura, Niranjana
On Fri, Nov 25, 2016 at 12:05:09PM -0700, Jason Gunthorpe wrote: On Thu, Nov 24, 2016 at 06:13:50PM -0800, Vishwanathapura, Niranjana wrote: In order to be truely device independent the hfi_vnic ULP should not depend on a device exported symbol. Instead device should register its functions with

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-28 Thread Vishwanathapura, Niranjana
On Thu, Nov 24, 2016 at 09:15:45AM -0700, Jason Gunthorpe wrote: And will move the hfi_vnic module under ‘drivers/infiniband/ulp/hfi_vnic’. I would prefer drivers/net/ethernet This is clearly not a ULP since it doesn't use verbs. I understand it is not using verbs, but the control path (ib_

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-25 Thread Jason Gunthorpe
On Thu, Nov 24, 2016 at 06:13:50PM -0800, Vishwanathapura, Niranjana wrote: > In order to be truely device independent the hfi_vnic ULP should not depend > on a device exported symbol. Instead device should register its functions > with the ULP. Hence the approaches a) and b). It is not device in

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-24 Thread Vishwanathapura, Niranjana
On Thu, Nov 24, 2016 at 09:15:45AM -0700, Jason Gunthorpe wrote: On Wed, Nov 23, 2016 at 04:08:25PM -0800, Vishwanathapura, Niranjana wrote: In order to pass the hfi function pointers to the hfi_vnic ULP, I can, a) Have hfi_vnic ULP define an interface API for hfi1 driver to call to register it

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-24 Thread Jason Gunthorpe
On Wed, Nov 23, 2016 at 04:08:25PM -0800, Vishwanathapura, Niranjana wrote: > In order to pass the hfi function pointers to the hfi_vnic ULP, I can, > a) Have hfi_vnic ULP define an interface API for hfi1 driver to call to > register its callback (as you pointed). Unfortunately there will be a mod

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-23 Thread Vishwanathapura, Niranjana
On Tue, Nov 22, 2016 at 05:49:32PM -0700, Jason Gunthorpe wrote: > > We could add a custom Interface between HFI1 driver and hfi_vnic drivers > > without involving a bus. > > hfi is already registering on the infiniband class, just use that. I don't understand what you mean here? Get the struc

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Vishwanathapura, Niranjana
On Tue, Nov 22, 2016 at 05:04:37PM -0600, Christoph Lameter wrote: On Tue, 22 Nov 2016, Vishwanathapura, Niranjana wrote: Ok, I do understand Jason's point that we should probably not put this driver under drivers/infiniband/sw/.., as this driver is not a HCA. It is an ULP similar to ipoib, bui

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Jason Gunthorpe
On Tue, Nov 22, 2016 at 07:05:05PM -0500, ira.weiny wrote: > On Tue, Nov 22, 2016 at 10:04:07AM -0700, Jason Gunthorpe wrote: > > On Mon, Nov 21, 2016 at 05:53:04PM -0800, Vishwanathapura, Niranjana wrote: > > > There are many example drivers in kernel which are using bus_register() in > > > an ini

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread ira.weiny
On Tue, Nov 22, 2016 at 10:04:07AM -0700, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 05:53:04PM -0800, Vishwanathapura, Niranjana wrote: > > There are many example drivers in kernel which are using bus_register() in > > an initcall. > > There really are not, certainly not in major subsystems

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Andrew Lunn
On Tue, Nov 22, 2016 at 11:49:18AM -0800, Vishwanathapura, Niranjana wrote: > Ok, I do understand Jason's point that we should probably not put > this driver under drivers/infiniband/sw/.., as this driver is not a > HCA. > It is an ULP similar to ipoib, built on top of Omni-path > irrespective of w

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Christoph Lameter
On Tue, 22 Nov 2016, Vishwanathapura, Niranjana wrote: > Ok, I do understand Jason's point that we should probably not put this driver > under drivers/infiniband/sw/.., as this driver is not a HCA. > It is an ULP similar to ipoib, built on top of Omni-path irrespective of > whether we register a h

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Vishwanathapura, Niranjana
Ok, I do understand Jason's point that we should probably not put this driver under drivers/infiniband/sw/.., as this driver is not a HCA. It is an ULP similar to ipoib, built on top of Omni-path irrespective of whether we register a hfi_vnic_bus or a direct custom interface with HFI1. This ULP w

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-22 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 05:53:04PM -0800, Vishwanathapura, Niranjana wrote: > There are many example drivers in kernel which are using bus_register() in > an initcall. There really are not, certainly not in major subsystems. > We could add a custom Interface between HFI1 driver and hfi_vnic drive

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-21 Thread Vishwanathapura, Niranjana
On Mon, Nov 21, 2016 at 04:31:18PM -0700, Jason Gunthorpe wrote: + ida_init(&hfi_vnic_ctrl_ida); + idr_init(&hfi_vnic_idr); + + rc = bus_register(&hfi_vnic_bus); >>> >>>Why on earth do we need this? Didn't I give you enough grief for the >>>psm stuff and now you

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-21 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 03:26:29PM -0800, Vishwanathapura, Niranjana wrote: > I did not see any example IB mad agent outside drivers/inifiniband > folder. You can be the first. > I did see some netdev drivers outside the net/ folder (like ipoib and > drivers/infiniband/hw/nes/). It is very rar

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-21 Thread Vishwanathapura, Niranjana
On Mon, Nov 21, 2016 at 02:39:30PM -0700, Jason Gunthorpe wrote: On Mon, Nov 21, 2016 at 01:30:17PM -0800, Vishwanathapura, Niranjana wrote: On Sat, Nov 19, 2016 at 12:04:45PM -0700, Jason Gunthorpe wrote: >On Fri, Nov 18, 2016 at 02:42:10PM -0800, Vishwanathapura, Niranjana wrote: >>+HFI-VNIC D

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-21 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 01:30:17PM -0800, Vishwanathapura, Niranjana wrote: > On Sat, Nov 19, 2016 at 12:04:45PM -0700, Jason Gunthorpe wrote: > >On Fri, Nov 18, 2016 at 02:42:10PM -0800, Vishwanathapura, Niranjana wrote: > >>+HFI-VNIC DRIVER > >>+M: Dennis Dalessandro > >>+M: Niranjana Vishwanath

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-21 Thread Vishwanathapura, Niranjana
On Sat, Nov 19, 2016 at 12:04:45PM -0700, Jason Gunthorpe wrote: On Fri, Nov 18, 2016 at 02:42:10PM -0800, Vishwanathapura, Niranjana wrote: +HFI-VNIC DRIVER +M: Dennis Dalessandro +M: Niranjana Vishwanathapura +L: linux-r...@vger.kernel.org +S: Supported +F: drivers/infini

Re: [RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-19 Thread Jason Gunthorpe
On Fri, Nov 18, 2016 at 02:42:10PM -0800, Vishwanathapura, Niranjana wrote: > +HFI-VNIC DRIVER > +M: Dennis Dalessandro > +M: Niranjana Vishwanathapura > +L: linux-r...@vger.kernel.org > +S: Supported > +F: drivers/infiniband/sw/intel/vnic This is either a net driver or a ULP, no idea