~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/vsock/README

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/vsock/README (Architecture sparc64) and /tools/testing/vsock/README (Architecture m68k)


  1 AF_VSOCK test suite                                 1 AF_VSOCK test suite
  2 -------------------                                 2 -------------------
  3 These tests exercise net/vmw_vsock/ host<->gue      3 These tests exercise net/vmw_vsock/ host<->guest sockets for VMware, KVM, and
  4 Hyper-V.                                            4 Hyper-V.
  5                                                     5 
  6 The following tests are available:                  6 The following tests are available:
  7                                                     7 
  8   * vsock_test - core AF_VSOCK socket function      8   * vsock_test - core AF_VSOCK socket functionality
  9   * vsock_diag_test - vsock_diag.ko module for      9   * vsock_diag_test - vsock_diag.ko module for listing open sockets
 10                                                    10 
 11 The following prerequisite steps are not autom     11 The following prerequisite steps are not automated and must be performed prior
 12 to running tests:                                  12 to running tests:
 13                                                    13 
 14 1. Build the kernel, make headers_install, and     14 1. Build the kernel, make headers_install, and build these tests.
 15 2. Install the kernel and tests on the host.       15 2. Install the kernel and tests on the host.
 16 3. Install the kernel and tests inside the gue     16 3. Install the kernel and tests inside the guest.
 17 4. Boot the guest and ensure that the AF_VSOCK     17 4. Boot the guest and ensure that the AF_VSOCK transport is enabled.
 18                                                    18 
 19 Invoke test binaries in both directions as fol     19 Invoke test binaries in both directions as follows:
 20                                                    20 
 21   # host=server, guest=client                      21   # host=server, guest=client
 22   (host)# $TEST_BINARY --mode=server \             22   (host)# $TEST_BINARY --mode=server \
 23                        --control-port=1234 \       23                        --control-port=1234 \
 24                        --peer-cid=3                24                        --peer-cid=3
 25   (guest)# $TEST_BINARY --mode=client \            25   (guest)# $TEST_BINARY --mode=client \
 26                         --control-host=$HOST_I     26                         --control-host=$HOST_IP \
 27                         --control-port=1234 \      27                         --control-port=1234 \
 28                         --peer-cid=2               28                         --peer-cid=2
 29                                                    29 
 30   # host=client, guest=server                      30   # host=client, guest=server
 31   (guest)# $TEST_BINARY --mode=server \            31   (guest)# $TEST_BINARY --mode=server \
 32                         --control-port=1234 \      32                         --control-port=1234 \
 33                         --peer-cid=2               33                         --peer-cid=2
 34   (host)# $TEST_BINARY --mode=client \             34   (host)# $TEST_BINARY --mode=client \
 35                        --control-port=$GUEST_I     35                        --control-port=$GUEST_IP \
 36                        --control-port=1234 \       36                        --control-port=1234 \
 37                        --peer-cid=3                37                        --peer-cid=3
 38                                                    38 
 39 vsock_perf utility                                 39 vsock_perf utility
 40 -------------------                                40 -------------------
 41 'vsock_perf' is a simple tool to measure vsock     41 'vsock_perf' is a simple tool to measure vsock performance. It works in
 42 sender/receiver modes: sender connect to peer      42 sender/receiver modes: sender connect to peer at the specified port and
 43 starts data transmission to the receiver. Afte     43 starts data transmission to the receiver. After data processing is done,
 44 it prints several metrics(see below).              44 it prints several metrics(see below).
 45                                                    45 
 46 Usage:                                             46 Usage:
 47 # run as sender                                    47 # run as sender
 48 # connect to CID 2, port 1234, send 1G of data     48 # connect to CID 2, port 1234, send 1G of data, tx buf size is 1M
 49 ./vsock_perf --sender 2 --port 1234 --bytes 1G     49 ./vsock_perf --sender 2 --port 1234 --bytes 1G --buf-size 1M
 50                                                    50 
 51 Output:                                            51 Output:
 52 tx performance: A Gbits/s                          52 tx performance: A Gbits/s
 53                                                    53 
 54 Output explanation:                                54 Output explanation:
 55 A is calculated as "number of bits to send" /      55 A is calculated as "number of bits to send" / "time in tx loop"
 56                                                    56 
 57 # run as receiver                                  57 # run as receiver
 58 # listen port 1234, rx buf size is 1M, socket      58 # listen port 1234, rx buf size is 1M, socket buf size is 1G, SO_RCVLOWAT is 64K
 59 ./vsock_perf --port 1234 --buf-size 1M --vsk-s     59 ./vsock_perf --port 1234 --buf-size 1M --vsk-size 1G --rcvlowat 64K
 60                                                    60 
 61 Output:                                            61 Output:
 62 rx performance: A Gbits/s                          62 rx performance: A Gbits/s
 63 total in 'read()': B sec                           63 total in 'read()': B sec
 64 POLLIN wakeups: C                                  64 POLLIN wakeups: C
 65 average in 'read()': D ns                          65 average in 'read()': D ns
 66                                                    66 
 67 Output explanation:                                67 Output explanation:
 68 A is calculated as "number of received bits" /     68 A is calculated as "number of received bits" / "time in rx loop".
 69 B is time, spent in 'read()' system call(exclu     69 B is time, spent in 'read()' system call(excluding 'poll()')
 70 C is number of 'poll()' wake ups with POLLIN b     70 C is number of 'poll()' wake ups with POLLIN bit set.
 71 D is B / C, e.g. average amount of time, spent     71 D is B / C, e.g. average amount of time, spent in single 'read()'.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php