Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@bergwolf
Copy link
Member

@bergwolf bergwolf commented Sep 29, 2016

  1. update kernel to 4.8.5 stable release
  2. enable vsock kernel module
  3. modprobe vmw_vsock_virtio_transport.ko
  4. when vsock device is present, use vsock connection for hyperstart control and tty messages

src/init.c Outdated
#else
ctl_serial = "sh.hyper.channel.0";
tty_serial = "sh.hyper.channel.1";
if (hyper_cmd("/sbin/modprobe vmw_vsock_virtio_transport") < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice patch, could you please remove /sbin ?
related with #191

Copy link
Member Author

@bergwolf bergwolf Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I'll drop it. Thanks for pointing it out.

src/init.c Outdated

static int hyper_vsock_msg_accept(struct hyper_event *he, int efd)
{
return hyper_vsock_accept(he, efd, &ctl.chan, &hyper_vsock_ttyfd_ops);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctl.tty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, thanks!

@bergwolf
Copy link
Member Author

iperf (patched with vsock support, see https://github.com/bergwolf/iperf/tree/vsock) tests with vsock connection. vsock bandwidth is about 3x of IPv4. Both were tested in the same container (64MB with single core).

vsock result:

[hypervsock@src]$./iperf3 -0 -c 1027 -p 12345
Connecting to host 1027, port 12345
[  4] local 2 port 1099 connected to 2 port 1099
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   473 MBytes  3.96 Gbits/sec  2582858320   0.00 Bytes
[  4]   1.00-2.00   sec   463 MBytes  3.88 Gbits/sec    0   0.00 Bytes
[  4]   2.00-3.00   sec   462 MBytes  3.87 Gbits/sec    0   0.00 Bytes
[  4]   3.00-4.00   sec   486 MBytes  4.08 Gbits/sec    0   0.00 Bytes
[  4]   4.00-5.00   sec   458 MBytes  3.84 Gbits/sec    0   0.00 Bytes
[  4]   5.00-6.00   sec   460 MBytes  3.86 Gbits/sec    0   0.00 Bytes
[  4]   6.00-7.00   sec   464 MBytes  3.89 Gbits/sec    0   0.00 Bytes
[  4]   7.00-8.00   sec   461 MBytes  3.87 Gbits/sec    0   0.00 Bytes
[  4]   8.00-9.00   sec   471 MBytes  3.95 Gbits/sec    0   0.00 Bytes
[  4]   9.00-10.00  sec   461 MBytes  3.86 Gbits/sec  1712108976   0.00 Bytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  4.55 GBytes  3.91 Gbits/sec    0             sender
[  4]   0.00-10.00  sec  4.55 GBytes  3.91 Gbits/sec                  receiver

iperf Done.

IPv4 iperf results:

[hypervsock@src]$./iperf3 -4 -c 192.168.122.2 -p 12345
Connecting to host 192.168.122.2, port 12345
[  4] local 192.168.122.1 port 47276 connected to 192.168.122.2 port 12345
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   152 MBytes  1.27 Gbits/sec    0    180 KBytes
[  4]   1.00-2.00   sec   149 MBytes  1.25 Gbits/sec    0    180 KBytes
[  4]   2.00-3.00   sec   153 MBytes  1.28 Gbits/sec    0    180 KBytes
[  4]   3.00-4.00   sec   144 MBytes  1.21 Gbits/sec    0    180 KBytes
[  4]   4.00-5.00   sec   148 MBytes  1.24 Gbits/sec    0    180 KBytes
[  4]   5.00-6.00   sec   154 MBytes  1.28 Gbits/sec    0    180 KBytes
[  4]   6.00-7.00   sec   151 MBytes  1.27 Gbits/sec    0    180 KBytes
[  4]   7.00-8.00   sec   151 MBytes  1.26 Gbits/sec    0    180 KBytes
[  4]   8.00-9.00   sec   155 MBytes  1.30 Gbits/sec    0    180 KBytes
[  4]   9.00-10.00  sec   149 MBytes  1.25 Gbits/sec    0    180 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.47 GBytes  1.26 Gbits/sec    0             sender
[  4]   0.00-10.00  sec  1.47 GBytes  1.26 Gbits/sec                  receiver

iperf Done.

listen control channel on port 2718, and message channel on 2719.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Set up control channel and message channel if unset yet.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
To have larger buffer size and also handle HUP events so that
it is possible to reconnect to hyperstart.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
So that we know when runv closes a connection.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
1. when read returns 0, it means remotes has closed socket, for
normal TCP connections.
2. when read returns -ENOTCONN for vsock, it means remote has closed the
socket.

We should be able to just handle case 1) if we patch vsock kernel
implementation to match normal TCP connection behavior.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
@Jimmy-Xu
Copy link

retest this please

@bergwolf bergwolf closed this Jan 5, 2017
@bergwolf bergwolf mentioned this pull request Jan 5, 2017
@bergwolf bergwolf deleted the vsock branch May 8, 2017 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants