From: Jon Mason <jon.mason@intel.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-pci@vger.kernel.org, Dave Jiang <dave.jiang@intel.com>
Subject: Re: [RFC 1/2] PCI-Express Non-Transparent Bridge Support
Date: Fri, 13 Jul 2012 23:19:54 -0700 [thread overview]
Message-ID: <20120714061953.GD4808@jonmason-lab> (raw)
In-Reply-To: <20120713171344.1066d3b1@nehalam.linuxnetplumber.net>
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.mason@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 bridge except
> > that both sides of the bridge have their own independent address domains. The
> > host on one side of the bridge will not have the visibility of the complete
> > memory or I/O space on the other side of the bridge. To communicate across the
> > non-transparent bridge, each NTB endpoint has one (or more) apertures exposed to
> > the local system. Writes to these apertures are mirrored to memory on the
> > remote system. Communications can also occur through the use of doorbell
> > registers that initiate interrupts to the alternate domain, and scratch-pad
> > registers accessible from both sides.
> >
> > 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]
> > determines the usage model (NTB to NTB or NTB to Root Port) and abstracts away
> > the underlying hardware to provide access and a common interface to the doorbell
> > registers, scratch pads, and memory windows. These hardware interfaces are
> > exported so that other, non-mainlined kernel drivers can access these.
> > ntb_transport.[ch] also uses the exported interfaces in ntb_hw.[ch] to setup a
> > communication channel(s) and provide a reliable way of transferring data from
> > one side to the other, which it then exports so that "client" drivers can access
> > them. These client drivers are used to provide a standard kernel interface
> > (i.e., Ethernet device) to NTB, such that Linux can transfer data from one
> > system to the other in a standard way.
> >
> > Signed-off-by: Jon Mason <jon.mason@intel.com>
>
> This driver does some reimplementing of standard type operations is this
> because you are trying to use the same code on multiple platforms?
>
> Example:
> +
> +static void ntb_list_add_head(spinlock_t *lock, struct list_head *entry,
> + struct list_head *list)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(lock, flags);
> + list_add(entry, list);
> + spin_unlock_irqrestore(lock, flags);
> +}
> +
> +static void ntb_list_add_tail(spinlock_t *lock, struct list_head *entry,
> + struct list_head *list)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(lock, flags);
> + list_add_tail(entry, list);
> + spin_unlock_irqrestore(lock, flags);
> +}
>
> Which are used on skb's and yet we already have sk_buff_head with locking?
>
> I know you probably are committed to this API, but is there some way to
> reuse existing shared memory used by virtio-net between two ports?
>
>
The intention is to be able to have multiple client drivers/virtual devices that are able to use NTB as the transport to the remote system. This is the reason why a void* is passed into the transport instead of skb*, making all of the extra book keeping necessary. Currently, only the virtual Ethernet has been done, which may be part of the confusion. I'd like to be able to find a way to have the virtio devices use ntb (and save me the work of reinventing the wheel), but step one is getting this code accepted :)
Thanks,
Jon
next prev parent reply other threads:[~2012-07-14 6:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 21:44 [RFC 1/2] PCI-Express Non-Transparent Bridge Support Jon Mason
2012-07-13 21:45 ` [RFC 2/2] net: Add support for NTB virtual ethernet device Jon Mason
2012-07-13 23:14 ` Jiri Pirko
2012-07-14 5:50 ` Jon Mason
2012-07-14 8:30 ` Jiri Pirko
2012-07-14 0:08 ` Stephen Hemminger
2012-07-14 5:55 ` Jon Mason
2012-07-14 0:00 ` [RFC 1/2] PCI-Express Non-Transparent Bridge Support Stephen Hemminger
2012-07-14 0:13 ` Stephen Hemminger
2012-07-14 6:19 ` Jon Mason [this message]
2012-07-15 12:37 ` David Hagood
2012-07-14 17:04 ` Greg KH
2012-07-15 23:50 ` Jon Mason
2012-07-15 23:53 ` Greg KH
2012-07-14 17:10 ` Greg KH
2012-07-15 23:55 ` Jon Mason
2012-07-16 0:19 ` Greg KH
2012-07-16 17:55 ` Jon Mason
2012-07-16 18:30 ` Greg KH
2012-07-16 16:49 ` chetan loke
2012-07-16 18:38 ` Jon Mason
2012-07-16 19:27 ` chetan loke
2012-07-17 0:23 ` Jon Mason
2012-07-16 18:26 ` chetan loke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120714061953.GD4808@jonmason-lab \
--to=jon.mason@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).