Skip to content

Commit

Permalink
ntb_tool: Postpone memory window initialization for the user
Browse files Browse the repository at this point in the history
In order to make the interface closer to the raw NTB API, this commit
changes memory windows so they are not initialized on link up.
Instead, the 'peer_trans*' debugfs files are introduced. When read,
they return information provided by ntb_mw_get_range. When written,
they create a buffer and initialize the memory window. The
value written is taken as the requested size of the buffer (which
is then rounded for alignment). Writing a value of zero frees the buffer
and tears down the memory window translation. The 'peer_mw*' file is
only created once the memory window translation is setup by the user.

Additionally, it was noticed that the read and write functions for the
'peer_mw*' files should have checked for a NULL pointer.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Logan Gunthorpe authored and Jon Mason committed Aug 5, 2016
1 parent 26dc638 commit 717146a
Showing 1 changed file with 228 additions and 138 deletions.
Loading

0 comments on commit 717146a

Please sign in to comment.