All of lore.kernel.org
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
	Allen Hubbe <Allen.Hubbe@emc.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com,
	linux-kselftest@vger.kernel.org,
	Logan Gunthorpe <logang@deltatee.com>
Subject: [PATCH v3 00/10] NTB Selftest Script
Date: Wed, 15 Jun 2016 15:26:29 -0600	[thread overview]
Message-ID: <cover.1466025130.git.logang@deltatee.com> (raw)

Changes since v2:

1) As per Allan's suggestion, I've added a patch to postpone the
peer memory window setup until the user requests it with a 'peer_trans*'
file. This pushes the ntb_tool API closer to the kernel API and allows
the link status file to return the raw status of the NTB link.

2) Change the link status file to return the value of ntb_link_is_up
instead of the local 'memory window ready' value.

3) Change the link_event file to just block on write. As it was in v2,
if multiple users attempted to use the link_event file they could
corrupt the state another user had set. Reads to this file are no
longer permitted.

4) Updates to the ntb_test script to accommodate the above changes.

5) Added some link tests to the ntb_test script. It will bring the link
down and check that the other side agrees.

6) Added a minor bug fix (Patch #10) to ntb_perf. During discussions
with Allen it was noticed that the link_is_up flag is never cleared if
the link goes away.

---

Changes since v1:

1) Add a comment to explain the *15 in the buf size calculation,
as per Allen's feedback.

2) Clean up the changes to the pingpong client as there were some
sloppy copying mistakes.

3) Rework the 'link' file in ntb_tool as per Allen's suggestions.
I've added a 'link_event' file the works essentially how he's asked.
Though, I found no need to use a completion as suggested and the flow
is maybe slightly simpler than he's suggested. Just write a boolean
to the event file then read to wait for the link to be either up or
down. There's still some discussion on the best interface and it's
not much work to make additional minor functional changes.

4) Update the selftest script to use the new 'link_event' file.

5) Minor change to the way the selftest script lists devices thanks to
Allen's observation.

---

I've written a ntb_test.sh script that would probably be useful if it
were included in the kernel. This series ends with that script and
includes some useful interface improvements and fixes to the existing ntb
test modules. Please see each individual commit for more information.
They are mostly independent.

The series is based off of v4.6 plus the patches I've submitted that
have been accepted into ntb-next. They've been run through checkpatch
with --strict this time.

As always, I'm happy to incorporate any feedback.

Thanks,

Logan

---

Logan Gunthorpe (10):
  ntb_perf: Schedule based on time not on performance
  ntb_perf: Improve thread handling to increase robustness
  ntb_perf: Return results by reading the run file
  ntb_perf: Wait for link before running test
  ntb_tool: BUG: Ensure the buffer size is large enough to return all
    spads
  ntb_tool: Postpone memory window initialization for the user
  ntb_tool: Add link status and files to debugfs
  ntb_pingpong: Add a debugfs file to get the ping count
  ntb_test: Add a selftest script for the NTB subsystem
  ntb_perf: clear link_is_up flag when the link goes down.

 MAINTAINERS                             |   1 +
 drivers/ntb/test/ntb_perf.c             | 198 +++++++++-----
 drivers/ntb/test/ntb_pingpong.c         |  62 ++++-
 drivers/ntb/test/ntb_tool.c             | 455 ++++++++++++++++++++++----------
 tools/testing/selftests/ntb/ntb_test.sh | 417 +++++++++++++++++++++++++++++
 5 files changed, 932 insertions(+), 201 deletions(-)
 create mode 100755 tools/testing/selftests/ntb/ntb_test.sh

--
2.1.4

             reply	other threads:[~2016-06-15 21:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 21:26 Logan Gunthorpe [this message]
2016-06-15 21:26 ` [PATCH v3 01/10] ntb_perf: Schedule based on time not on performance Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 02/10] ntb_perf: Improve thread handling to increase robustness Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 03/10] ntb_perf: Return results by reading the run file Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 04/10] ntb_perf: Wait for link before running test Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 05/10] ntb_tool: BUG: Ensure the buffer size is large enough to return all spads Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 06/10] ntb_tool: Postpone memory window initialization for the user Logan Gunthorpe
2016-06-15 21:53   ` Allen Hubbe
2016-06-15 21:53     ` Allen Hubbe
2016-06-15 21:26 ` [PATCH v3 07/10] ntb_tool: Add link status and files to debugfs Logan Gunthorpe
2016-06-15 21:48   ` Allen Hubbe
2016-06-15 21:48     ` Allen Hubbe
2016-06-15 21:26 ` [PATCH v3 08/10] ntb_pingpong: Add a debugfs file to get the ping count Logan Gunthorpe
2016-06-15 21:48   ` Allen Hubbe
2016-06-15 21:48     ` Allen Hubbe
2016-06-15 21:26 ` [PATCH v3 09/10] ntb_test: Add a selftest script for the NTB subsystem Logan Gunthorpe
2016-06-15 21:49   ` Allen Hubbe
2016-06-15 21:49     ` Allen Hubbe
2016-06-15 21:54     ` Logan Gunthorpe
2016-06-15 22:17       ` Allen Hubbe
2016-06-15 22:17         ` Allen Hubbe
2016-06-15 22:30         ` Logan Gunthorpe
2016-06-15 21:26 ` [PATCH v3 10/10] ntb_perf: clear link_is_up flag when the link goes down Logan Gunthorpe
2016-06-15 21:33   ` Jiang, Dave
2016-06-15 22:20     ` Logan Gunthorpe
2016-06-15 22:24       ` Jiang, Dave
2016-06-15 23:11         ` Logan Gunthorpe

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=cover.1466025130.git.logang@deltatee.com \
    --to=logang@deltatee.com \
    --cc=Allen.Hubbe@emc.com \
    --cc=arnd@arndb.de \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-ntb@googlegroups.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=sudipm.mukherjee@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.