xref: /freebsd/share/man/man4/vale.4 (revision efe3b0de1438e7a8473d92f2be57072394559e3c)
1.\" Copyright (c) 2012 Luigi Rizzo, Universita` di Pisa
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" This document is derived in part from the enet man page (enet.4)
26.\" distributed with 4.3BSD Unix.
27.\"
28.\" $FreeBSD$
29.\" $Id: $
30.\"
31.Dd July 27, 2012
32.Dt VALE 4
33.Os
34.Sh NAME
35.Nm vale
36.Nd a very fast Virtual Local Ethernet using the netmap API
37.Sh SYNOPSIS
38.Cd device netmap
39.Sh DESCRIPTION
40.Nm
41is a feature of the
42.Xr netmap 4
43module that implements multiple Virtual switches that can
44be used to interconnect netmap clients, including traffic
45sources and sinks, packet forwarders, userspace firewalls,
46and so on.
47.Pp
48.Nm
49is implemented completely in software, and is extremely fast.
50On a modern machine it can move almost 20 Million packets per
51second (Mpps) per core with small frames, and about 70 Gbit/s
52with 1500 byte frames.
53.Sh OPERATION
54.Nm
55dynamically creates switches and ports as clients connect
56to it using the
57.Xr netmap 4
58API.
59.Pp
60.Nm
61ports are named
62.Pa vale[bdg:][port]
63where
64.Pa vale
65is the prefix indicating a VALE switch rather than a standard interface,
66.Pa bdg
67indicates a specific switch (the colon is a separator),
68and
69.Pa port
70indicates a port within the switch.
71Bridge and port names are arbitrary strings, the only
72constraint being that the full name must fit within 16
73characters.
74.Pp
75See
76.Xr netmap 4
77for details on the API.
78.Ss LIMITS
79.Nm
80currently supports up to 4 switches, 16 ports per switch, with
811024 buffers per port.
82These hard limits will be
83changed to sysctl variables in future releases.
84.Sh SYSCTL VARIABLES
85.Nm
86uses the following sysctl variables to control operation:
87.Bl -tag -width dev.netmap.verbose
88.It dev.netmap.bridge
89The maximum number of packets processed internally
90in each iteration.
91Defaults to 1024, use lower values to trade latency
92with throughput.
93.It dev.netmap.verbose
94Set to non-zero values to enable in-kernel diagnostics.
95.El
96.Sh EXAMPLES
97Create one switch, with a traffic generator connected to one
98port, and a netmap-enabled tcpdump instance on another port:
99.Bd -literal -offset indent
100tcpdump -ni vale-a:1 &
101pkt-gen  -i vale-a:0 -f tx &
102.Ed
103.Pp
104Create two switches,
105each connected to two qemu machines on different ports.
106.Bd -literal -offset indent
107qemu -net nic -net netmap,ifname=vale-1:a ... &
108qemu -net nic -net netmap,ifname=vale-1:b ... &
109qemu -net nic -net netmap,ifname=vale-2:c ... &
110qemu -net nic -net netmap,ifname=vale-2:d ... &
111.Ed
112.Sh SEE ALSO
113.Xr netmap 4
114.Pp
115.Xr http://info.iet.unipi.it/~luigi/vale/
116.Pp
117Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines,
118June 2012, http://info.iet.unipi.it/~luigi/vale/
119.Sh AUTHORS
120.An -nosplit
121The
122.Nm
123switch was designed and implemented in 2012 by
124.An Luigi Rizzo
125and
126.An Giuseppe Lettieri
127at the Universita` di Pisa.
128.Pp
129.Nm
130was funded by the European Commission within FP7 Projects
131CHANGE (257422) and OPENLAB (287581).
132