Re: [PATCH v6 1/2] PCI-Express Non-Transparent Bridge Support

2013-01-17 Thread Greg KH
On Fri, Nov 16, 2012 at 07:27:12PM -0700, Jon Mason wrote: > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > connecting 2 systems, providing electrical isolation between the two > subsystems. > A non-transparent bridge is functionally similar to a transparent bridge >

Re: [PATCH v6 1/2] PCI-Express Non-Transparent Bridge Support

2013-01-17 Thread Greg KH
On Fri, Nov 16, 2012 at 07:27:12PM -0700, Jon Mason wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent bridge except

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Thu, Nov 15, 2012 at 06:06:21PM -0700, Jon Mason wrote: > > > +static inline unsigned int ntb_query_max_cbs(struct ntb_device *ndev) > > > +{ > > > + return ndev->max_cbs; > > > +} > > > > It is shorter, and simpler, to just write the '->variable' version out > > for this, than to make the

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Jon Mason
On Thu, Nov 15, 2012 at 04:29:04PM -0800, Greg KH wrote: > On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: > > --- /dev/null > > +++ b/drivers/ntb/ntb_hw.h > > @@ -0,0 +1,195 @@ > > +/* > > + * This file is provided under a dual BSD/GPLv2 license. When using or > > + * redistributing

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: > +static int __init ntb_init_module(void) > +{ > + pr_info("%s: %s, version %s\n", KBUILD_MODNAME, NTB_NAME, NTB_VER); No need to be noisy. > + > + return pci_register_driver(_pci_driver); > +} > +module_init(ntb_init_module); >

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: > --- /dev/null > +++ b/drivers/ntb/ntb_hw.h > @@ -0,0 +1,195 @@ > +/* > + * This file is provided under a dual BSD/GPLv2 license. When using or > + * redistributing this file, you may do so under either license. > + * > + * GPL

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: --- /dev/null +++ b/drivers/ntb/ntb_hw.h @@ -0,0 +1,195 @@ +/* + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: +static int __init ntb_init_module(void) +{ + pr_info(%s: %s, version %s\n, KBUILD_MODNAME, NTB_NAME, NTB_VER); No need to be noisy. + + return pci_register_driver(ntb_pci_driver); +} +module_init(ntb_init_module); +

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Jon Mason
On Thu, Nov 15, 2012 at 04:29:04PM -0800, Greg KH wrote: On Mon, Nov 05, 2012 at 05:11:08PM -0700, Jon Mason wrote: --- /dev/null +++ b/drivers/ntb/ntb_hw.h @@ -0,0 +1,195 @@ +/* + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file,

Re: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support

2012-11-15 Thread Greg KH
On Thu, Nov 15, 2012 at 06:06:21PM -0700, Jon Mason wrote: +static inline unsigned int ntb_query_max_cbs(struct ntb_device *ndev) +{ + return ndev-max_cbs; +} It is shorter, and simpler, to just write the '-variable' version out for this, than to make the function call here.

Re: [1/2] PCI-Express Non-Transparent Bridge Support

2012-10-10 Thread Jon Mason
On Sun, Oct 07, 2012 at 02:13:44PM +0200, Jakub Kicinski wrote: > Hi, > > it's good to see some NTB code getting into mainline! I have a few comments > though. > > On Tue, 02 Oct 2012 21:26:16 -, Jon Mason > wrote: > > [...] > >+/** > >+ * ntb_write_local_spad() - write to the secondary

Re: [1/2] PCI-Express Non-Transparent Bridge Support

2012-10-10 Thread Jon Mason
On Sun, Oct 07, 2012 at 02:13:44PM +0200, Jakub Kicinski wrote: Hi, it's good to see some NTB code getting into mainline! I have a few comments though. On Tue, 02 Oct 2012 21:26:16 -, Jon Mason jon.ma...@intel.com wrote: [...] +/** + * ntb_write_local_spad() - write to the

Re: [1/2] PCI-Express Non-Transparent Bridge Support

2012-10-07 Thread Jakub Kicinski
Hi, it's good to see some NTB code getting into mainline! I have a few comments though. On Tue, 02 Oct 2012 21:26:16 -, Jon Mason wrote: [...] >+/** >+ * ntb_write_local_spad() - write to the secondary scratchpad register >+ * @ndev: pointer to ntb_device instance >+ * @idx: index to the

Re: [1/2] PCI-Express Non-Transparent Bridge Support

2012-10-07 Thread Jakub Kicinski
Hi, it's good to see some NTB code getting into mainline! I have a few comments though. On Tue, 02 Oct 2012 21:26:16 -, Jon Mason jon.ma...@intel.com wrote: [...] +/** + * ntb_write_local_spad() - write to the secondary scratchpad register + * @ndev: pointer to ntb_device instance + * @idx:

Re: [RFC v3 1/2] PCI-Express Non-Transparent Bridge Support

2012-09-21 Thread Jon Mason
On Fri, Sep 21, 2012 at 02:14:47PM -0400, David Miller wrote: > From: Jon Mason > Date: Fri, 21 Sep 2012 11:09:48 -0700 > > > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > > connecting 2 systems, providing electrical isolation between the two > > subsystems. > > A

Re: [RFC v3 1/2] PCI-Express Non-Transparent Bridge Support

2012-09-21 Thread David Miller
From: Jon Mason Date: Fri, 21 Sep 2012 11:09:48 -0700 > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > connecting 2 systems, providing electrical isolation between the two > subsystems. > A non-transparent bridge is functionally similar to a transparent bridge >

Re: [RFC v3 1/2] PCI-Express Non-Transparent Bridge Support

2012-09-21 Thread David Miller
From: Jon Mason jon.ma...@intel.com Date: Fri, 21 Sep 2012 11:09:48 -0700 A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent

Re: [RFC v3 1/2] PCI-Express Non-Transparent Bridge Support

2012-09-21 Thread Jon Mason
On Fri, Sep 21, 2012 at 02:14:47PM -0400, David Miller wrote: From: Jon Mason jon.ma...@intel.com Date: Fri, 21 Sep 2012 11:09:48 -0700 A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-08-01 Thread Jon Mason
On Tue, Jul 31, 2012 at 03:25:55PM -0700, Greg KH wrote: > On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: > > +struct ntb_transport_qp; > > + > > +struct ntb_client { > > + char *name; > > + int (*probe) (struct pci_dev *pdev); > > + void (*remove) (struct pci_dev *pdev); > > +};

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-08-01 Thread Jon Mason
On Tue, Jul 31, 2012 at 02:02:25PM -0400, chetan loke wrote: > On Tue, Jul 31, 2012 at 1:27 PM, Jon Mason wrote: > > > > I don't see the benefit of having the driver in staging. Any vendors > > who would notice the ntb driver in staging would be sitting on these > > mailing lists and hopefully

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-08-01 Thread Jon Mason
On Tue, Jul 31, 2012 at 02:02:25PM -0400, chetan loke wrote: On Tue, Jul 31, 2012 at 1:27 PM, Jon Mason jon.ma...@intel.com wrote: I don't see the benefit of having the driver in staging. Any vendors who would notice the ntb driver in staging would be sitting on these mailing lists and

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-08-01 Thread Jon Mason
On Tue, Jul 31, 2012 at 03:25:55PM -0700, Greg KH wrote: On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: +struct ntb_transport_qp; + +struct ntb_client { + char *name; + int (*probe) (struct pci_dev *pdev); + void (*remove) (struct pci_dev *pdev); +}; Why isn't

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jiang, Dave
On Jul 31, 2012, at 7:10 PM, "Jianbin Kang" wrote: >> Actually this is what I'm working on now, using async_tx to replace the >> memcpy. I believe the changes shouldn't be that significant. >> >> Is the "hardware that can setup dma" you refer to something that does >> not use this interface?

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jianbin Kang
> Actually this is what I'm working on now, using async_tx to replace the > memcpy. I believe the changes shouldn't be that significant. > > Is the "hardware that can setup dma" you refer to something that does > not use this interface? > Yes, they use this interface, but split 'memcpy_toio' to

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Tue, Jul 31, 2012 at 03:51:05PM -0700, Jon Mason wrote: > On Tue, Jul 31, 2012 at 03:23:38PM -0700, Greg KH wrote: > > On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: > > > + * You should have received a copy of the GNU General Public License > > > + * along with this program; if

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 03:23:38PM -0700, Greg KH wrote: > On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: > > + * You should have received a copy of the GNU General Public License > > + * along with this program; if not, write to the Free Software > > + * Foundation, Inc., 51

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: > +struct ntb_transport_qp; > + > +struct ntb_client { > + char *name; > + int (*probe) (struct pci_dev *pdev); > + void (*remove) (struct pci_dev *pdev); > +}; Why isn't this tied into the driver model? That looks like you

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 > USA. You really

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Tue, Jul 31, 2012 at 1:27 PM, Jon Mason wrote: > > I don't see the benefit of having the driver in staging. Any vendors > who would notice the ntb driver in staging would be sitting on these > mailing lists and hopefully have planety of comments on the design. > Stashing the driver in staging

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 12:02:20PM -0400, chetan loke wrote: > On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas wrote: > > On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason wrote: > >> > >> I've tried to make it all generic enough that non-Intel NTBs should plug > >> in with > >> minimal changes to

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 07:45:29AM -0600, Bjorn Helgaas wrote: > On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason wrote: > > On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: > >> On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason wrote: > >> > A PCI-Express non-transparent bridge (NTB) is a

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Bjorn Helgaas
On Tue, Jul 31, 2012 at 10:02 AM, chetan loke wrote: > On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas wrote: >> On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason wrote: >>> >>> I've tried to make it all generic enough that non-Intel NTBs should plug in >>> with >>> minimal changes to ntb_hw.c. If

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 11:35:33AM +0800, Jianbin Kang wrote: > > I've tried to make it all generic enough that non-Intel NTBs should plug in > > with > > minimal changes to ntb_hw.c. If their design is too divergent, then a > > slight > > redesign of ntb_hw.c might be necessary. But from what

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Sun, Jul 29, 2012 at 8:26 PM, Jon Mason wrote: > +static void ntb_tx_copy_task(struct ntb_transport_qp *qp, > +struct ntb_queue_entry *entry, > +void *offset) > +{ > + struct ntb_payload_header *hdr = offset; > + > + offset

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas wrote: > On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason wrote: >> >> I've tried to make it all generic enough that non-Intel NTBs should plug in >> with >> minimal changes to ntb_hw.c. If their design is too divergent, then a slight >> redesign of

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Bjorn Helgaas
On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason wrote: > On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: >> On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason wrote: >> > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus >> > connecting 2 systems, providing electrical

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Bjorn Helgaas
On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason jon.ma...@intel.com wrote: On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas bhelg...@google.com wrote: On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason jon.ma...@intel.com wrote: I've tried to make it all generic enough that non-Intel NTBs should plug in with minimal changes to ntb_hw.c. If their design is too divergent,

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Sun, Jul 29, 2012 at 8:26 PM, Jon Mason jon.ma...@intel.com wrote: snip +static void ntb_tx_copy_task(struct ntb_transport_qp *qp, +struct ntb_queue_entry *entry, +void *offset) +{ + struct ntb_payload_header *hdr = offset; +

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 11:35:33AM +0800, Jianbin Kang wrote: I've tried to make it all generic enough that non-Intel NTBs should plug in with minimal changes to ntb_hw.c. If their design is too divergent, then a slight redesign of ntb_hw.c might be necessary. But from what I've seen

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Bjorn Helgaas
On Tue, Jul 31, 2012 at 10:02 AM, chetan loke loke.che...@gmail.com wrote: On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas bhelg...@google.com wrote: On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason jon.ma...@intel.com wrote: I've tried to make it all generic enough that non-Intel NTBs should plug

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 07:45:29AM -0600, Bjorn Helgaas wrote: On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason jon.ma...@intel.com wrote: On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason jon.ma...@intel.com wrote: A PCI-Express

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 12:02:20PM -0400, chetan loke wrote: On Tue, Jul 31, 2012 at 9:45 AM, Bjorn Helgaas bhelg...@google.com wrote: On Mon, Jul 30, 2012 at 12:15 PM, Jon Mason jon.ma...@intel.com wrote: I've tried to make it all generic enough that non-Intel NTBs should plug in with

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread chetan loke
On Tue, Jul 31, 2012 at 1:27 PM, Jon Mason jon.ma...@intel.com wrote: I don't see the benefit of having the driver in staging. Any vendors who would notice the ntb driver in staging would be sitting on these mailing lists and hopefully have planety of comments on the design. Stashing the

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. You really are

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: +struct ntb_transport_qp; + +struct ntb_client { + char *name; + int (*probe) (struct pci_dev *pdev); + void (*remove) (struct pci_dev *pdev); +}; Why isn't this tied into the driver model? That looks like you really

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jon Mason
On Tue, Jul 31, 2012 at 03:23:38PM -0700, Greg KH wrote: On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Greg KH
On Tue, Jul 31, 2012 at 03:51:05PM -0700, Jon Mason wrote: On Tue, Jul 31, 2012 at 03:23:38PM -0700, Greg KH wrote: On Sun, Jul 29, 2012 at 05:26:33PM -0700, Jon Mason wrote: + * You should have received a copy of the GNU General Public License + * along with this program; if not,

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jianbin Kang
Actually this is what I'm working on now, using async_tx to replace the memcpy. I believe the changes shouldn't be that significant. Is the hardware that can setup dma you refer to something that does not use this interface? Yes, they use this interface, but split 'memcpy_toio' to two

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-31 Thread Jiang, Dave
On Jul 31, 2012, at 7:10 PM, Jianbin Kang kjbm...@gmail.com wrote: Actually this is what I'm working on now, using async_tx to replace the memcpy. I believe the changes shouldn't be that significant. Is the hardware that can setup dma you refer to something that does not use this

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Jianbin Kang
> I've tried to make it all generic enough that non-Intel NTBs should plug in > with > minimal changes to ntb_hw.c. If their design is too divergent, then a slight > redesign of ntb_hw.c might be necessary. But from what I've seen of other > designs on the internet, they appear to be extremely

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Jon Mason
On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: > On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason wrote: > > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > > connecting 2 systems, providing electrical isolation between the two > > subsystems. > > A

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Bjorn Helgaas
On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason wrote: > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > connecting 2 systems, providing electrical isolation between the two > subsystems. > A non-transparent bridge is functionally similar to a transparent bridge > except >

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Bjorn Helgaas
On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Jon Mason
On Mon, Jul 30, 2012 at 10:50:13AM -0600, Bjorn Helgaas wrote: On Sun, Jul 29, 2012 at 6:26 PM, Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A

Re: [RFC v2 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-30 Thread Jianbin Kang
I've tried to make it all generic enough that non-Intel NTBs should plug in with minimal changes to ntb_hw.c. If their design is too divergent, then a slight redesign of ntb_hw.c might be necessary. But from what I've seen of other designs on the internet, they appear to be extremely

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Mon, Jul 16, 2012 at 03:27:48PM -0400, chetan loke wrote: > On Mon, Jul 16, 2012 at 2:38 PM, Jon Mason wrote: > > On Mon, Jul 16, 2012 at 12:49:39PM -0400, chetan loke wrote: > > > > >> Is it ok to rename the following vars for convenience sake? > >> > >> > + struct list_head txq;

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Mon, Jul 16, 2012 at 12:49:39PM -0400, chetan loke wrote: > Hi Jon, > > On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason wrote: > > Just a few minor comments/questions: > > > > > +struct ntb_transport_qp { > > + struct ntb_device *ndev; > > + > > + bool client_ready; > > +

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Greg KH
On Mon, Jul 16, 2012 at 10:55:06AM -0700, Jon Mason wrote: > On Sun, Jul 15, 2012 at 05:19:21PM -0700, Greg KH wrote: > > On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: > > > On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: > > > > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread chetan loke
Jon, On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason wrote: .. > +/** > + * ntb_ring_sdb() - Set the doorbell on the secondary/external side > + * @ndev: pointer to ntb_device instance > + * @db: doorbell to ring > + * > + * This function allows triggering of a doorbell on the

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Sun, Jul 15, 2012 at 05:19:21PM -0700, Greg KH wrote: > On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: > > On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: > > > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > > > > +static int max_num_cbs = 2; > > > >

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread chetan loke
Hi Jon, On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason wrote: Just a few minor comments/questions: > +struct ntb_transport_qp { > + struct ntb_device *ndev; > + > + bool client_ready; > + bool qp_link; > + u8 qp_num; /* Only 64 QP's are allowed. 0-63 */ > + > +

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread chetan loke
Hi Jon, On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason jon.ma...@intel.com wrote: Just a few minor comments/questions: +struct ntb_transport_qp { + struct ntb_device *ndev; + + bool client_ready; + bool qp_link; + u8 qp_num; /* Only 64 QP's are allowed.

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Sun, Jul 15, 2012 at 05:19:21PM -0700, Greg KH wrote: On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: +static int max_num_cbs = 2;

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread chetan loke
Jon, On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason jon.ma...@intel.com wrote: .. +/** + * ntb_ring_sdb() - Set the doorbell on the secondary/external side + * @ndev: pointer to ntb_device instance + * @db: doorbell to ring + * + * This function allows triggering of a doorbell on

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Greg KH
On Mon, Jul 16, 2012 at 10:55:06AM -0700, Jon Mason wrote: On Sun, Jul 15, 2012 at 05:19:21PM -0700, Greg KH wrote: On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Mon, Jul 16, 2012 at 12:49:39PM -0400, chetan loke wrote: Hi Jon, On Fri, Jul 13, 2012 at 5:44 PM, Jon Mason jon.ma...@intel.com wrote: Just a few minor comments/questions: +struct ntb_transport_qp { + struct ntb_device *ndev; + + bool client_ready; +

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-16 Thread Jon Mason
On Mon, Jul 16, 2012 at 03:27:48PM -0400, chetan loke wrote: On Mon, Jul 16, 2012 at 2:38 PM, Jon Mason jon.ma...@intel.com wrote: On Mon, Jul 16, 2012 at 12:49:39PM -0400, chetan loke wrote: Is it ok to rename the following vars for convenience sake? + struct list_head

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Greg KH
On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: > On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: > > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > > > +static int max_num_cbs = 2; > > > +module_param(max_num_cbs, uint, 0644); > > > +MODULE_PARM_DESC(max_num_cbs,

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Jon Mason
On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > > +static int max_num_cbs = 2; > > +module_param(max_num_cbs, uint, 0644); > > +MODULE_PARM_DESC(max_num_cbs, "Maximum number of NTB transport > > connections"); > > + > >

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Greg KH
On Sun, Jul 15, 2012 at 04:50:41PM -0700, Jon Mason wrote: > On Sat, Jul 14, 2012 at 10:04:11AM -0700, Greg KH wrote: > > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > > > The NTB device driver is needed to configure these memory windows, > > > doorbell, and > > > scratch-pad

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Jon Mason
On Sat, Jul 14, 2012 at 10:04:11AM -0700, Greg KH wrote: > On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > > The NTB device driver is needed to configure these memory windows, > > doorbell, and > > scratch-pad registers as well as use them in such a way as they can be > > turned > >

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread David Hagood
Have you looked at any of the work that the PXI group has done on NTB support within PXI? http://www.ni.com/white-paper/12523/en I was on that working group, and one of the first capabilities I suggested for it was IP over NTB - I was going to implement this at my employer, but the project took a

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread David Hagood
Have you looked at any of the work that the PXI group has done on NTB support within PXI? http://www.ni.com/white-paper/12523/en I was on that working group, and one of the first capabilities I suggested for it was IP over NTB - I was going to implement this at my employer, but the project took a

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Jon Mason
On Sat, Jul 14, 2012 at 10:04:11AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: The NTB device driver is needed to configure these memory windows, doorbell, and scratch-pad registers as well as use them in such a way as they can be turned into a

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Greg KH
On Sun, Jul 15, 2012 at 04:50:41PM -0700, Jon Mason wrote: On Sat, Jul 14, 2012 at 10:04:11AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: The NTB device driver is needed to configure these memory windows, doorbell, and scratch-pad registers as well

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Jon Mason
On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: +static int max_num_cbs = 2; +module_param(max_num_cbs, uint, 0644); +MODULE_PARM_DESC(max_num_cbs, Maximum number of NTB transport connections); + +static bool

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-15 Thread Greg KH
On Sun, Jul 15, 2012 at 04:55:48PM -0700, Jon Mason wrote: On Sat, Jul 14, 2012 at 10:10:15AM -0700, Greg KH wrote: On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: +static int max_num_cbs = 2; +module_param(max_num_cbs, uint, 0644); +MODULE_PARM_DESC(max_num_cbs, Maximum

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-14 Thread Greg KH
On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: > The NTB device driver is needed to configure these memory windows, doorbell, > and > scratch-pad registers as well as use them in such a way as they can be turned > into a viable communication channel to the remote system. ntb_hw.[ch]

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-14 Thread Jon Mason
On Fri, Jul 13, 2012 at 05:13:44PM -0700, Stephen Hemminger wrote: > On Fri, 13 Jul 2012 14:44:59 -0700 > Jon Mason wrote: > > > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > > connecting 2 systems, providing electrical isolation between the two > > subsystems. > > A

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-14 Thread Jon Mason
On Fri, Jul 13, 2012 at 05:13:44PM -0700, Stephen Hemminger wrote: On Fri, 13 Jul 2012 14:44:59 -0700 Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-14 Thread Greg KH
On Fri, Jul 13, 2012 at 02:44:59PM -0700, Jon Mason wrote: The NTB device driver is needed to configure these memory windows, doorbell, and scratch-pad registers as well as use them in such a way as they can be turned into a viable communication channel to the remote system. ntb_hw.[ch]

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2012 14:44:59 -0700 Jon Mason wrote: > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > connecting 2 systems, providing electrical isolation between the two > subsystems. > A non-transparent bridge is functionally similar to a transparent bridge > except

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2012 14:44:59 -0700 Jon Mason wrote: > A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus > connecting 2 systems, providing electrical isolation between the two > subsystems. > A non-transparent bridge is functionally similar to a transparent bridge > except

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2012 14:44:59 -0700 Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent

Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support

2012-07-13 Thread Stephen Hemminger
On Fri, 13 Jul 2012 14:44:59 -0700 Jon Mason jon.ma...@intel.com wrote: A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus connecting 2 systems, providing electrical isolation between the two subsystems. A non-transparent bridge is functionally similar to a transparent