public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/31] Implement user mode network for kvm tools
@ 2011-06-30  8:40 Asias He
  2011-06-30  8:40 ` [PATCH v2 01/31] kvm tools: Introduce ethernet frame buffer system for uip Asias He
                   ` (31 more replies)
  0 siblings, 32 replies; 55+ messages in thread
From: Asias He @ 2011-06-30  8:40 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Cyrill Gorcunov, Ingo Molnar, Sasha Levin, Prasad Joshi, kvm,
	Asias He

This patch series implement user mode network for kvm tools.

This is a from-scratch, lightweight, 1K LOC, implementation of the {TCP,UDP}/IP
protocal stack in user mode. Usr mode network enables plain user without special
privileges to have network access in guest OS. Zero-configuration is needed
in host side. 

uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, ICMP,
IPV4, UDP, TCP. So any network protocols above UDP/TCP should work as well,
e.g., HTTP, FTP, SSH, DNS.

--------------------------------
To use user mode network:
--------------------------------

1) Just add '-net user' option when you starts kvm tools.

2) Since DHCP is not implemented right now, guest needs to setup IP and DNS
   manually.

   # ifconfig eth0 192.168.33.15
   # route add default gw 192.168.33.1
   # echo "nameserver dns_ip" > /etc/resolv.conf

--------------------------------
Performance test:
--------------------------------
All tests are under a 100Mbps network system

TCP_STREAM
guest(using user mode network) -> remote server: 92.97 Mbps (CPU 10.29%)
host(where guest runs on) -> remote server:      93.68 Mbps (CPU 25.31%)

UDP_STREAM
guest(using user mode network) -> remote server: 94.5 Mbps (CPU 99.90%)
host(where guest runs on) -> remote server:      95.7 Mbps (CPU 25.51%)


Asias He (31):
  kvm tools: Introduce ethernet frame buffer system for uip
  kvm tools: Add ARP support for uip
  kvm tools: Add IPV4 support for uip
  kvm tools: Implement IP checksum for uip
  kvm tools: Add ICMP support for uip
  kvm tools: Introduce struct uip_udp to present UDP package
  kvm tools: Introduce struct uip_pseudo_hdr to present UDP pseudo header
  kvm tools: Introduce struct uip_udp_socket
  kvm tools: Add two helpers to return UDP {header, total} length
  kvm tools: Add helper to return ethernet header length
  kvm tools: Implement uip_csum_udp() to calculate UDP checksum
  kvm tools: Add UDP support for uip
  kvm tools: Introduce struct uip_tcp to present TCP package.
  kvm tools: Introduce struct uip_tcp_socket
  kvm tools: Add helpers to return TCP {header, total, payload} length
  kvm tools: Add helper to return start address of TCP payload
  kvm tools: Add helpers to test whether SYN or FIN bit is set.
  kvm tools: Add helper to allocate and get TCP initial sequence number
  kvm tools: Implement uip_csum_tcp() to calculate TCP checksum
  kvm tools: Add TCP support for uip
  kvm tools: Introduce uip_init() for uip
  kvm tools: Introduce uip_tx() for uip
  kvm tools: Introduce uip_rx() for uip
  kvm tools: Add MACRO for user and tap mode for virtio net
  kvm tools: Reanme net_device to net_dev
  kvm tools: Introduce -net {user, tap, none} options for virtio net
  kvm tools: Change default guest MAC address to 00:15:15:15:15:15
  kvm tools: Make virtio net work with user mode network
  kvm tools: Make default network mode to user mode
  kvm tools: Make default host ip address to 192.168.33.1
  kvm tools: Introduce struct net_dev_operations

 tools/kvm/Makefile                 |    8 +
 tools/kvm/include/kvm/uip.h        |  292 +++++++++++++++++++++++++++++++++
 tools/kvm/include/kvm/virtio-net.h |    4 +
 tools/kvm/kvm-run.c                |   40 +++--
 tools/kvm/uip/arp.c                |   30 ++++
 tools/kvm/uip/buf.c                |  114 +++++++++++++
 tools/kvm/uip/core.c               |  188 +++++++++++++++++++++
 tools/kvm/uip/csum.c               |   92 +++++++++++
 tools/kvm/uip/icmp.c               |   29 ++++
 tools/kvm/uip/ipv4.c               |   29 ++++
 tools/kvm/uip/tcp.c                |  317 ++++++++++++++++++++++++++++++++++++
 tools/kvm/uip/udp.c                |  221 +++++++++++++++++++++++++
 tools/kvm/virtio/net.c             |  146 ++++++++++++-----
 13 files changed, 1449 insertions(+), 61 deletions(-)
 create mode 100644 tools/kvm/include/kvm/uip.h
 create mode 100644 tools/kvm/uip/arp.c
 create mode 100644 tools/kvm/uip/buf.c
 create mode 100644 tools/kvm/uip/core.c
 create mode 100644 tools/kvm/uip/csum.c
 create mode 100644 tools/kvm/uip/icmp.c
 create mode 100644 tools/kvm/uip/ipv4.c
 create mode 100644 tools/kvm/uip/tcp.c
 create mode 100644 tools/kvm/uip/udp.c

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2011-07-04  9:43 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30  8:40 [PATCH v2 00/31] Implement user mode network for kvm tools Asias He
2011-06-30  8:40 ` [PATCH v2 01/31] kvm tools: Introduce ethernet frame buffer system for uip Asias He
2011-06-30  8:40 ` [PATCH v2 02/31] kvm tools: Add ARP support " Asias He
2011-06-30  8:40 ` [PATCH v2 03/31] kvm tools: Add IPV4 " Asias He
2011-06-30  8:40 ` [PATCH v2 04/31] kvm tools: Implement IP checksum " Asias He
2011-06-30  8:40 ` [PATCH v2 05/31] kvm tools: Add ICMP support " Asias He
2011-06-30  8:40 ` [PATCH v2 06/31] kvm tools: Introduce struct uip_udp to present UDP package Asias He
2011-06-30  8:40 ` [PATCH v2 07/31] kvm tools: Introduce struct uip_pseudo_hdr to present UDP pseudo header Asias He
2011-06-30  8:40 ` [PATCH v2 08/31] kvm tools: Introduce struct uip_udp_socket Asias He
2011-06-30  8:40 ` [PATCH v2 09/31] kvm tools: Add two helpers to return UDP {header, total} length Asias He
2011-06-30  8:40 ` [PATCH v2 10/31] kvm tools: Add helper to return ethernet header length Asias He
2011-06-30  8:40 ` [PATCH v2 11/31] kvm tools: Implement uip_csum_udp() to calculate UDP checksum Asias He
2011-06-30  8:41 ` [PATCH v2 12/31] kvm tools: Add UDP support for uip Asias He
2011-07-01 11:46   ` Ingo Molnar
2011-07-01 15:24     ` Asias He
2011-06-30  8:41 ` [PATCH v2 13/31] kvm tools: Introduce struct uip_tcp to present TCP package Asias He
2011-06-30  8:41 ` [PATCH v2 14/31] kvm tools: Introduce struct uip_tcp_socket Asias He
2011-06-30  8:41 ` [PATCH v2 15/31] kvm tools: Add helpers to return TCP {header, total, payload} length Asias He
2011-06-30  8:41 ` [PATCH v2 16/31] kvm tools: Add helper to return start address of TCP payload Asias He
2011-06-30  8:41 ` [PATCH v2 17/31] kvm tools: Add helpers to test whether SYN or FIN bit is set Asias He
2011-06-30  8:41 ` [PATCH v2 18/31] kvm tools: Add helper to allocate and get TCP initial sequence number Asias He
2011-06-30  8:41 ` [PATCH v2 19/31] kvm tools: Implement uip_csum_tcp() to calculate TCP checksum Asias He
2011-06-30  8:41 ` [PATCH v2 20/31] kvm tools: Add TCP support for uip Asias He
2011-06-30  8:41 ` [PATCH v2 21/31] kvm tools: Introduce uip_init() " Asias He
2011-06-30  8:41 ` [PATCH v2 22/31] kvm tools: Introduce uip_tx() " Asias He
2011-06-30  8:41 ` [PATCH v2 23/31] kvm tools: Introduce uip_rx() " Asias He
2011-06-30  8:41 ` [PATCH v2 24/31] kvm tools: Add MACRO for user and tap mode for virtio net Asias He
2011-06-30  8:41 ` [PATCH v2 25/31] kvm tools: Reanme net_device to net_dev Asias He
2011-06-30  8:41 ` [PATCH v2 26/31] kvm tools: Introduce -net {user, tap, none} options for virtio net Asias He
2011-06-30  8:41 ` [PATCH v2 27/31] kvm tools: Change default guest MAC address to 00:15:15:15:15:15 Asias He
2011-06-30  8:41 ` [PATCH v2 28/31] kvm tools: Make virtio net work with user mode network Asias He
2011-06-30  8:41 ` [PATCH v2 29/31] kvm tools: Make default network mode to user mode Asias He
2011-06-30  8:41 ` [PATCH v2 30/31] kvm tools: Make default host ip address to 192.168.33.1 Asias He
2011-06-30  8:41 ` [PATCH v2 31/31] kvm tools: Introduce struct net_dev_operations Asias He
2011-06-30  8:56 ` [PATCH v2 00/31] Implement user mode network for kvm tools Stefan Hajnoczi
2011-06-30 15:32   ` Anthony Liguori
2011-07-01  0:18     ` Asias He
2011-07-01 11:53       ` Ingo Molnar
2011-07-01 13:46         ` Alexander Graf
2011-07-02  9:45           ` Pekka Enberg
2011-07-02 10:30             ` Ingo Molnar
2011-07-02 11:19             ` Alexander Graf
2011-07-02 11:27               ` Pekka Enberg
2011-07-02 12:31                 ` Alexander Graf
2011-07-03 19:42           ` Ingo Molnar
2011-07-03 22:15             ` Alexander Graf
2011-07-04  9:11               ` Ingo Molnar
2011-07-04  9:30                 ` Alexander Graf
2011-07-04  9:43                   ` Ingo Molnar
2011-07-02  9:42         ` Pekka Enberg
2011-06-30 23:38   ` Asias He
2011-07-01 16:50     ` Stefan Hajnoczi
2011-07-01 20:36       ` Pekka Enberg
2011-07-02  3:49         ` Asias He
2011-07-02  9:02           ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox