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

[Question] virtio_user for kernel networking? #3

Open
krsna1729 opened this issue Dec 4, 2019 · 7 comments
Open

[Question] virtio_user for kernel networking? #3

krsna1729 opened this issue Dec 4, 2019 · 7 comments

Comments

@krsna1729
Copy link

@trozet Curious if virtio_user was evaluated to provide kernel path, any comparisons with VPort, etc., you could point to. One advantage looks like in-tree vhost ko? I have not used either one.

https://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html

@kot-begemot-uk
Copy link

kot-begemot-uk commented Dec 4, 2019 via email

@krsna1729
Copy link
Author

Can you expand on different use-cases part?

In the below example I imagined BESS to take place of testpmd and the tap interface that gets created (on virtio_user vdev creation in EAL init) will be moved into the netns of the container.

$ sudo dpdk/build/app/testpmd --no-pci -l 2-3 -n 4 \
  --vdev=virtio_user0,path=/dev/vhost-net,queue_size=1024 -- \
  -i --txd=1024 --rxd=1024
$ sudo ifconfig tap0 1.1.1.1/24 up

$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.048 ms
^C
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.048/0.048/0.048/0.000 ms

# Host does not exist. Only to increase counters in testpmd port stats output.
$ ping 1.1.1.2
PING 1.1.1.2 (1.1.1.2) 56(84) bytes of data.
From 1.1.1.1 icmp_seq=1 Destination Host Unreachable
From 1.1.1.1 icmp_seq=2 Destination Host Unreachable
From 1.1.1.1 icmp_seq=3 Destination Host Unreachable
testpmd>show port stats all
  ######################## NIC statistics for port 0  ########################
  RX-packets: 92         RX-missed: 0          RX-bytes:  4312
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 45         TX-errors: 0          TX-bytes:  1962

  Throughput (since last show)
  Rx-pps:            1          Rx-bps:          400
  Tx-pps:            0          Tx-bps:            0
  ############################################################################

@kot-begemot-uk
Copy link

kot-begemot-uk commented Dec 5, 2019 via email

@trozet
Copy link
Contributor

trozet commented Dec 5, 2019

We currently use VPort to get a kernel interface added to BESS (called nimbess0), which is built into the bess ko. I think what you are suggesting here is instead of that, using the vhost exception path instead. Is that correct? It may be worth us looking into as we are facing some issues with how memory is being mapped in the vport driver on some of our servers. The other main advantage would be we perhaps wouldn't need the bess.ko? Which would be great to get rid of having to carry an out of tree kernel module.

As Anton mentioned there would probably be some changes required to get the kernel interface part done.

@krsna1729
Copy link
Author

krsna1729 commented Dec 5, 2019

Yes @trozet . you would not need bess.ko since in the other case vhost.ko is in-kernel and like the guide mentions, its hardened and production tested.

@krsna1729
Copy link
Author

Atleast to do a comparison analysis on robustness, deployment friendliness and definitely performance.

@trozet
Copy link
Contributor

trozet commented Dec 12, 2019

Thanks @krsna1729 let's leave this issue open and we can investigate it. I think it is worth moving to if we get the same functionality/performance and we can get rid of having to carry the bess kernel module.

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

3 participants