113a5d88fSLuigi Rizzo.\" Copyright (c) 2012 Luigi Rizzo, Universita` di Pisa 213a5d88fSLuigi Rizzo.\" All rights reserved. 313a5d88fSLuigi Rizzo.\" 413a5d88fSLuigi Rizzo.\" Redistribution and use in source and binary forms, with or without 513a5d88fSLuigi Rizzo.\" modification, are permitted provided that the following conditions 613a5d88fSLuigi Rizzo.\" are met: 713a5d88fSLuigi Rizzo.\" 1. Redistributions of source code must retain the above copyright 813a5d88fSLuigi Rizzo.\" notice, this list of conditions and the following disclaimer. 913a5d88fSLuigi Rizzo.\" 2. Redistributions in binary form must reproduce the above copyright 1013a5d88fSLuigi Rizzo.\" notice, this list of conditions and the following disclaimer in the 1113a5d88fSLuigi Rizzo.\" documentation and/or other materials provided with the distribution. 1213a5d88fSLuigi Rizzo.\" 1313a5d88fSLuigi Rizzo.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1413a5d88fSLuigi Rizzo.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1513a5d88fSLuigi Rizzo.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1613a5d88fSLuigi Rizzo.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1713a5d88fSLuigi Rizzo.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1813a5d88fSLuigi Rizzo.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1913a5d88fSLuigi Rizzo.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2013a5d88fSLuigi Rizzo.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2113a5d88fSLuigi Rizzo.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2213a5d88fSLuigi Rizzo.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2313a5d88fSLuigi Rizzo.\" SUCH DAMAGE. 2413a5d88fSLuigi Rizzo.\" 2513a5d88fSLuigi Rizzo.\" This document is derived in part from the enet man page (enet.4) 2613a5d88fSLuigi Rizzo.\" distributed with 4.3BSD Unix. 2713a5d88fSLuigi Rizzo.\" $Id: $ 2813a5d88fSLuigi Rizzo.\" 29*9a3fa775STom Hukins.Dd August 30, 2024 3013a5d88fSLuigi Rizzo.Dt VALE 4 3113a5d88fSLuigi Rizzo.Os 3213a5d88fSLuigi Rizzo.Sh NAME 3313a5d88fSLuigi Rizzo.Nm vale 3413a5d88fSLuigi Rizzo.Nd a very fast Virtual Local Ethernet using the netmap API 3513a5d88fSLuigi Rizzo.Sh SYNOPSIS 3613a5d88fSLuigi Rizzo.Cd device netmap 3713a5d88fSLuigi Rizzo.Sh DESCRIPTION 3813a5d88fSLuigi Rizzo.Nm 3913a5d88fSLuigi Rizzois a feature of the 405ac3118aSBenjamin Kaduk.Xr netmap 4 4113a5d88fSLuigi Rizzomodule that implements multiple Virtual switches that can 4213a5d88fSLuigi Rizzobe used to interconnect netmap clients, including traffic 4313a5d88fSLuigi Rizzosources and sinks, packet forwarders, userspace firewalls, 4413a5d88fSLuigi Rizzoand so on. 4513a5d88fSLuigi Rizzo.Pp 4613a5d88fSLuigi Rizzo.Nm 4713a5d88fSLuigi Rizzois implemented completely in software, and is extremely fast. 4813a5d88fSLuigi RizzoOn a modern machine it can move almost 20 Million packets per 4913a5d88fSLuigi Rizzosecond (Mpps) per core with small frames, and about 70 Gbit/s 5013a5d88fSLuigi Rizzowith 1500 byte frames. 5113a5d88fSLuigi Rizzo.Sh OPERATION 5213a5d88fSLuigi Rizzo.Nm 535ac3118aSBenjamin Kadukdynamically creates switches and ports as clients connect 5413a5d88fSLuigi Rizzoto it using the 5513a5d88fSLuigi Rizzo.Xr netmap 4 5613a5d88fSLuigi RizzoAPI. 5713a5d88fSLuigi Rizzo.Pp 5813a5d88fSLuigi Rizzo.Nm 5913a5d88fSLuigi Rizzoports are named 606ab6e9d3SVincenzo Maffione.Pa valeSSS:PPP 6113a5d88fSLuigi Rizzowhere 6213a5d88fSLuigi Rizzo.Pa vale 6313a5d88fSLuigi Rizzois the prefix indicating a VALE switch rather than a standard interface, 646ab6e9d3SVincenzo Maffione.Pa SSS 6513a5d88fSLuigi Rizzoindicates a specific switch (the colon is a separator), 6613a5d88fSLuigi Rizzoand 676ab6e9d3SVincenzo Maffione.Pa PPP 6813a5d88fSLuigi Rizzoindicates a port within the switch. 696ab6e9d3SVincenzo MaffioneBoth SSS and PPP have the form [0-9a-zA-Z_]+ , the string cannot 706ab6e9d3SVincenzo Maffioneexceed IFNAMSIZ characters, and PPP cannot be the name of any 716ab6e9d3SVincenzo Maffioneexisting OS network interface. 7213a5d88fSLuigi Rizzo.Pp 7313a5d88fSLuigi RizzoSee 7413a5d88fSLuigi Rizzo.Xr netmap 4 7513a5d88fSLuigi Rizzofor details on the API. 7613a5d88fSLuigi Rizzo.Ss LIMITS 7713a5d88fSLuigi Rizzo.Nm 78dd6ab49aSVincenzo Maffionecurrently supports up to 254 ports per switch. The maximum 79dd6ab49aSVincenzo Maffionenumber of switches is provided by the max_bridges sysctl variable. 8013a5d88fSLuigi Rizzo.Sh SYSCTL VARIABLES 81723180daSVincenzo MaffioneSee 82723180daSVincenzo Maffione.Xr netmap 4 83723180daSVincenzo Maffionefor a list of sysctl variables that affect 8413a5d88fSLuigi Rizzo.Nm 85723180daSVincenzo Maffionebridges. 8613a5d88fSLuigi Rizzo.Sh EXAMPLES 8713a5d88fSLuigi RizzoCreate one switch, with a traffic generator connected to one 8813a5d88fSLuigi Rizzoport, and a netmap-enabled tcpdump instance on another port: 8913a5d88fSLuigi Rizzo.Bd -literal -offset indent 906ab6e9d3SVincenzo Maffionetcpdump -ni valea:1 & 916ab6e9d3SVincenzo Maffionepkt-gen -i valea:0 -f tx & 9213a5d88fSLuigi Rizzo.Ed 9313a5d88fSLuigi Rizzo.Pp 9413a5d88fSLuigi RizzoCreate two switches, 9513a5d88fSLuigi Rizzoeach connected to two qemu machines on different ports. 9613a5d88fSLuigi Rizzo.Bd -literal -offset indent 976ab6e9d3SVincenzo Maffioneqemu -net nic -net netmap,ifname=vale1:a ... & 986ab6e9d3SVincenzo Maffioneqemu -net nic -net netmap,ifname=vale1:b ... & 996ab6e9d3SVincenzo Maffioneqemu -net nic -net netmap,ifname=vale2:c ... & 1006ab6e9d3SVincenzo Maffioneqemu -net nic -net netmap,ifname=vale2:d ... & 10113a5d88fSLuigi Rizzo.Ed 10213a5d88fSLuigi Rizzo.Sh SEE ALSO 103*9a3fa775STom Hukins.Xr netmap 4 , 104*9a3fa775STom Hukins.Xr valectl 8 10513a5d88fSLuigi Rizzo.Pp 10613a5d88fSLuigi RizzoLuigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines, 10713a5d88fSLuigi RizzoJune 2012, http://info.iet.unipi.it/~luigi/vale/ 10813a5d88fSLuigi Rizzo.Sh AUTHORS 10913a5d88fSLuigi Rizzo.An -nosplit 11013a5d88fSLuigi RizzoThe 11113a5d88fSLuigi Rizzo.Nm 1125ac3118aSBenjamin Kadukswitch was designed and implemented in 2012 by 11313a5d88fSLuigi Rizzo.An Luigi Rizzo 11413a5d88fSLuigi Rizzoand 11513a5d88fSLuigi Rizzo.An Giuseppe Lettieri 11613a5d88fSLuigi Rizzoat the Universita` di Pisa. 11713a5d88fSLuigi Rizzo.Pp 11813a5d88fSLuigi Rizzo.Nm 1195ac3118aSBenjamin Kadukwas funded by the European Commission within FP7 Projects 12013a5d88fSLuigi RizzoCHANGE (257422) and OPENLAB (287581). 121