View | Details | Raw Unified | Return to bug 191320 | Differences between
and this patch

Collapse All | Expand All

(-)b/share/man/man4/Makefile (-1 / +1 lines)
Lines 551-557 MAN= aac.4 \ Link Here
551
	utopia.4 \
551
	utopia.4 \
552
	uvisor.4 \
552
	uvisor.4 \
553
	uvscom.4 \
553
	uvscom.4 \
554
	vale.4 \
555
	vga.4 \
554
	vga.4 \
556
	vge.4 \
555
	vge.4 \
557
	viapm.4 \
556
	viapm.4 \
Lines 685-690 MLINKS+=${_ndis.4} ${_if_ndis.4} Link Here
685
MLINKS+=netfpga10g_nf10bmac.4 if_nf10bmac.4
684
MLINKS+=netfpga10g_nf10bmac.4 if_nf10bmac.4
686
MLINKS+=netintro.4 net.4 \
685
MLINKS+=netintro.4 net.4 \
687
	netintro.4 networking.4
686
	netintro.4 networking.4
687
MLINKS+=netmap.4 vale.4
688
MLINKS+=${_nfe.4} ${_if_nfe.4}
688
MLINKS+=${_nfe.4} ${_if_nfe.4}
689
MLINKS+=nge.4 if_nge.4
689
MLINKS+=nge.4 if_nge.4
690
MLINKS+=${_ntb.4} ${_if_ntb.4} \
690
MLINKS+=${_ntb.4} ${_if_ntb.4} \
(-)b/share/man/man4/netmap.4 (-5 / +10 lines)
Lines 54-60 and Link Here
54
a shared memory packet transport channel.
54
a shared memory packet transport channel.
55
All these are accessed interchangeably with the same API.
55
All these are accessed interchangeably with the same API.
56
.Pp
56
.Pp
57
.Nm , VALE
57
.Nm VALE
58
and
58
and
59
.Nm netmap pipes
59
.Nm netmap pipes
60
are at least one order of magnitude faster than
60
are at least one order of magnitude faster than
Lines 62-68 standard OS mechanisms Link Here
62
(sockets, bpf, tun/tap interfaces, native switches, pipes),
62
(sockets, bpf, tun/tap interfaces, native switches, pipes),
63
reaching 14.88 million packets per second (Mpps)
63
reaching 14.88 million packets per second (Mpps)
64
with much less than one core on a 10 Gbit NIC,
64
with much less than one core on a 10 Gbit NIC,
65
about 20 Mpps per core for VALE ports,
65
about 20 Mpps per core for
66
.Nm VALE
67
ports,
66
and over 100 Mpps for netmap pipes.
68
and over 100 Mpps for netmap pipes.
67
.Pp
69
.Pp
68
Userspace clients can dynamically switch NICs into
70
Userspace clients can dynamically switch NICs into
Lines 172-178 the data path of the NIC is disconnected from the host stack, Link Here
172
and the file descriptor is bound to the NIC (one or all queues),
174
and the file descriptor is bound to the NIC (one or all queues),
173
or to the host stack;
175
or to the host stack;
174
.It Dv valeXXX:YYY (arbitrary XXX and YYY)
176
.It Dv valeXXX:YYY (arbitrary XXX and YYY)
175
the file descriptor is bound to port YYY of a VALE switch called XXX,
177
the file descriptor is bound to port YYY of a
178
.Nm VALE
179
switch called XXX,
176
both dynamically created if necessary.
180
both dynamically created if necessary.
177
The string cannot exceed IFNAMSIZ characters, and YYY cannot
181
The string cannot exceed IFNAMSIZ characters, and YYY cannot
178
be the name of any existing OS network interface.
182
be the name of any existing OS network interface.
Lines 648-654 packets are transmitted only on Link Here
648
or select()/poll() are called with a write event (POLLOUT/wfdset) or a full ring.
652
or select()/poll() are called with a write event (POLLOUT/wfdset) or a full ring.
649
.Pp
653
.Pp
650
When registering a virtual interface that is dynamically created to a
654
When registering a virtual interface that is dynamically created to a
651
.Xr vale 4
655
.Nm VALE
652
switch, we can specify the desired number of rings (1 by default,
656
switch, we can specify the desired number of rings (1 by default,
653
and currently up to 16) on it using nr_tx_rings and nr_rx_rings fields.
657
and currently up to 16) on it using nr_tx_rings and nr_rx_rings fields.
654
.It Dv NIOCTXSYNC
658
.It Dv NIOCTXSYNC
Lines 849-855 to wake up processes when significant events occur, and Link Here
849
to map memory.
853
to map memory.
850
.Xr ioctl 2
854
.Xr ioctl 2
851
is used to configure ports and
855
is used to configure ports and
852
.Nm VALE switches .
856
.Nm VALE
857
switches.
853
.Pp
858
.Pp
854
Applications may need to create threads and bind them to
859
Applications may need to create threads and bind them to
855
specific cores to improve performance, using standard
860
specific cores to improve performance, using standard
(-)a/share/man/man4/vale.4 (-132 lines)
Removed Link Here
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
41
is a feature of the
42
.Xr netmap 4
43
module that implements multiple Virtual switches that can
44
be used to interconnect netmap clients, including traffic
45
sources and sinks, packet forwarders, userspace firewalls,
46
and so on.
47
.Pp
48
.Nm
49
is implemented completely in software, and is extremely fast.
50
On a modern machine it can move almost 20 Million packets per
51
second (Mpps) per core with small frames, and about 70 Gbit/s
52
with 1500 byte frames.
53
.Sh OPERATION
54
.Nm
55
dynamically creates switches and ports as clients connect
56
to it using the
57
.Xr netmap 4
58
API.
59
.Pp
60
.Nm
61
ports are named
62
.Pa vale[bdg:][port]
63
where
64
.Pa vale
65
is the prefix indicating a VALE switch rather than a standard interface,
66
.Pa bdg
67
indicates a specific switch (the colon is a separator),
68
and
69
.Pa port
70
indicates a port within the switch.
71
Bridge and port names are arbitrary strings, the only
72
constraint being that the full name must fit within 16
73
characters.
74
.Pp
75
See
76
.Xr netmap 4
77
for details on the API.
78
.Ss LIMITS
79
.Nm
80
currently supports up to 4 switches, 16 ports per switch, with
81
1024 buffers per port.
82
These hard limits will be
83
changed to sysctl variables in future releases.
84
.Sh SYSCTL VARIABLES
85
.Nm
86
uses the following sysctl variables to control operation:
87
.Bl -tag -width dev.netmap.verbose
88
.It dev.netmap.bridge
89
The maximum number of packets processed internally
90
in each iteration.
91
Defaults to 1024, use lower values to trade latency
92
with throughput.
93
.Pp
94
.It dev.netmap.verbose
95
Set to non-zero values to enable in-kernel diagnostics.
96
.El
97
.Sh EXAMPLES
98
Create one switch, with a traffic generator connected to one
99
port, and a netmap-enabled tcpdump instance on another port:
100
.Bd -literal -offset indent
101
tcpdump -ni vale-a:1 &
102
pkt-gen  -i vale-a:0 -f tx &
103
.Ed
104
.Pp
105
Create two switches,
106
each connected to two qemu machines on different ports.
107
.Bd -literal -offset indent
108
qemu -net nic -net netmap,ifname=vale-1:a ... &
109
qemu -net nic -net netmap,ifname=vale-1:b ... &
110
qemu -net nic -net netmap,ifname=vale-2:c ... &
111
qemu -net nic -net netmap,ifname=vale-2:d ... &
112
.Ed
113
.Sh SEE ALSO
114
.Xr netmap 4
115
.Pp
116
.Xr http://info.iet.unipi.it/~luigi/vale/
117
.Pp
118
Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines,
119
June 2012, http://info.iet.unipi.it/~luigi/vale/
120
.Sh AUTHORS
121
.An -nosplit
122
The
123
.Nm
124
switch was designed and implemented in 2012 by
125
.An Luigi Rizzo
126
and
127
.An Giuseppe Lettieri
128
at the Universita` di Pisa.
129
.Pp
130
.Nm
131
was funded by the European Commission within FP7 Projects
132
CHANGE (257422) and OPENLAB (287581).

Return to bug 191320