Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
* Is the Scratchpad Implementation Using a LUT Standard?
@ 2017-10-10 12:57 Doug Meyer
  2017-10-10 14:17 ` Allen Hubbe
  0 siblings, 1 reply; 12+ messages in thread
From: Doug Meyer @ 2017-10-10 12:57 UTC (permalink / raw)
  To: linux-ntb


[-- Attachment #1.1: Type: text/plain, Size: 1621 bytes --]

Gents,

As I continue to gain understanding about the NTB code, I am wondering 
about the use and requirements surrounding scratchpads, at least as I see 
things in the Switchtec code.

In there, I see that a LUT (LUT0) is used, the size of the LUTs apparently 
being hard-coded to 64 KiB, for a shared memory window (struct shared_mw) 
which contains an array of 128 u32 for the scratchpad. Also, it appears 
that this is what is used both to determine link status and to pass memory 
address/size information between hosts (ports, peers). I apologize if I 
have that wrong. Please correct me.

The goal here is just to gain understanding... learn about required APIs vs 
philosophical decisions vs convenience, etc.

My questions are whether this is a fixture of the NTB architecture, or if 
this is a convenience to support something else (the latter being a 
requirement)?

In particular,

But most importantly, I'm wondering about struct shared_mw. Could the 
Switchtec message registers have been used?
What do people think about how this technique scales when there are more 
than two peers? Obviously LUTs are a precious resource, and a LUT per peer 
shared_mw is expensive. A LUT broken up into many shared_mw is a 
possibility, though there is always risk of trashing stuff.
Also, if the LUTs need to be much larger (for application use), then a 
large chunk of the BAR space could be used for a relatively small structure.
I'd love to hear anyone's thoughts on this.

As an aside, I'm curious why the LUT size is 64 KiB? Was this just a nice 
number as a starting point?

Thanks again, folks.

Blessings,
Doug

[-- Attachment #1.2: Type: text/html, Size: 1908 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-12 18:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 12:57 Is the Scratchpad Implementation Using a LUT Standard? Doug Meyer
2017-10-10 14:17 ` Allen Hubbe
2017-10-10 15:52   ` Doug Meyer
2017-10-11 16:19     ` lsgunthorpe
2017-10-11 17:41       ` Serge Semin
2017-10-11 18:03         ` Logan Gunthorpe
2017-10-12 18:31           ` D Meyer
2017-10-12 18:38             ` Logan Gunthorpe
2017-10-11 18:23         ` D Meyer
2017-10-11 18:44           ` Logan Gunthorpe
2017-10-12 18:05             ` D Meyer
2017-10-12 18:33               ` Logan Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox