Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for handling shutting down connections when testing over vsock. #4

Open
bchalios opened this issue Oct 4, 2024 · 0 comments

Comments

@bchalios
Copy link

bchalios commented Oct 4, 2024

Context

  • Version of iperf3: 6.8.0-45-generic
  • Hardware: x86_64, aarch64
  • Operating system (and distribution, if any): Linux

Enhancement Request

  • Current behavior

We are using iperf-vsock to test the performance of Firecracker's [1] vsock implementation. In Firecracker, we have implemented vsock opting for the hybrid vosck/UDS design. The guest uses an AF_VSOCK socket, whereas Firecracker by-passes the host kernel's vhost code and forwards the traffic to a Unix domain socket.

During our performance testing, we sometimes see errors like: IOError(Os { code: 104, kind: ConnectionReset, mess age: "Connection reset by peer" }) when Firecracker is trying to read from the host Unix socket file descriptor.

We are not sure what is causing this, but our best guess at the moment is that this is happening because iperf3 doesn't seem to have the machinery to terminate connections. IIUC, when a peer wants to shut down an established connection, it needs to send a VSOCK_OP_SHUTDOWN packet, but iperf3 doesn't support this. The protocol allows hooks for accept, listen, connect, send, recv and init, but there isn't any hook for terminating an established connection.

We believe that the error we see might due to the lack of properly closing connections because when we see the failures, they are always during the end of the test.

Again, I want to clarify that we are not sure that the failure we see is indeed due to this lack of API in iperf-vsock. We are opening the issue to see if anybody else has observed something similar and because we think that adding the missing functionality is worth it regardless.

  • Desired behavior

Add logic in iperf-vsock to handle shutting down vsock connections

  • Implementation notes

As a very superficial, initial, thought, we could extend struct protocol to include a hook like int (*shutdown)(struct iperf_test *). This would only be implemented by the vsock back-end.

Happy to hear thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant