Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 963de473 authored by Allen Hubbe's avatar Allen Hubbe Committed by Jon Mason
Browse files

NTB: Add ping pong test client



This is a simple ping pong driver that exercises the scratch pads and
doorbells of the ntb hardware.  This driver may be used to test that
your ntb hardware and drivers are functioning at a basic level.

Signed-off-by: default avatarAllen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 42fefc86
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -37,6 +37,33 @@ Transport queue pair. Network data is copied between socket buffers and the
Transport queue pair buffer.  The Transport client may be used for other things
besides Netdev, however no other applications have yet been written.

### NTB Ping Pong Test Client (ntb\_pingpong)

The Ping Pong test client serves as a demonstration to exercise the doorbell
and scratchpad registers of NTB hardware, and as an example simple NTB client.
Ping Pong enables the link when started, waits for the NTB link to come up, and
then proceeds to read and write the doorbell scratchpad registers of the NTB.
The peers interrupt each other using a bit mask of doorbell bits, which is
shifted by one in each round, to test the behavior of multiple doorbell bits
and interrupt vectors.  The Ping Pong driver also reads the first local
scratchpad, and writes the value plus one to the first peer scratchpad, each
round before writing the peer doorbell register.

Module Parameters:

* unsafe - Some hardware has known issues with scratchpad and doorbell
	registers.  By default, Ping Pong will not attempt to exercise such
	hardware.  You may override this behavior at your own risk by setting
	unsafe=1.
* delay\_ms - Specify the delay between receiving a doorbell
	interrupt event and setting the peer doorbell register for the next
	round.
* init\_db - Specify the doorbell bits to start new series of rounds.  A new
	series begins once all the doorbell bits have been shifted out of
	range.
* dyndbg - It is suggested to specify dyndbg=+p when loading this module, and
	then to observe debugging output on the console.

## NTB Hardware Drivers

NTB hardware drivers should register devices with the NTB core driver.  After
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ if NTB

source "drivers/ntb/hw/Kconfig"

source "drivers/ntb/test/Kconfig"

config NTB_TRANSPORT
	tristate "NTB Transport Client"
	help
+1 −1
Original line number Diff line number Diff line
obj-$(CONFIG_NTB) += ntb.o hw/
obj-$(CONFIG_NTB) += ntb.o hw/ test/
obj-$(CONFIG_NTB_TRANSPORT) += ntb_transport.o
+8 −0
Original line number Diff line number Diff line
config NTB_PINGPONG
	tristate "NTB Ping Pong Test Client"
	help
	 This is a simple ping pong driver that exercises the scratchpads and
	 doorbells of the ntb hardware.  This driver may be used to test that
	 your ntb hardware and drivers are functioning at a basic level.

	 If unsure, say N.
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_NTB_PINGPONG) += ntb_pingpong.o
Loading