1 .\" Copyright (c) 2016 Michio Honda.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
30 .Nd manage VALE network switches provided by netmap
33 .Bl -tag -width "valectl"
35 .Op Fl g Ar valeSSS:PPP
36 .Op Fl a Ar valeSSS:interface
37 .Op Fl h Ar valeSSS:interface
38 .Op Fl d Ar valeSSS:interface
41 .Op Fl l Ar valeSSS:PPP
43 .Op Fl p Ar valeSSS:PPP
44 .Op Fl P Ar valeSSS:PPP
53 network switches, for instance attaching and detaching interfaces, creating
54 and deleting persistent VALE ports, or listing the existing switches
58 is the name of a VALE switch, while
60 is the name of a VALE port of
63 When issued without options it lists all the existing switch ports together
64 with their internal bridge number and port number.
66 .It Fl g Ar valeSSS:PPP
67 Print the number of receive rings of
69 .It Fl a Ar valeSSS:interface
72 (which must be an existing network interface) to
74 and detach it from the host stack.
75 .It Fl h Ar valeSSS:interface
78 (which must be an existing network interface) to
80 while keeping it attached to the host stack.
81 More precisely, packets coming from
82 the host stack and directed to the interface will go through the switch, where
83 they can still reach the interface if the switch rules allow it.
84 Conversely, packets coming from the interface will go through the switch and,
85 if appropriate, will reach the host stack.
86 .It Fl d Ar valeSSS:interface
92 Create a new persistent VALE port with name
94 The name must be different from any other network interface
95 already present in the system.
97 Destroy the persistent VALE port with name
99 .It Fl l Ar valeSSS:PPP
100 Show the internal bridge number and port number of the given switch port.
101 .It Fl p Ar valeSSS:PPP
102 Enable polling mode for
104 In polling mode, a dedicated kernel thread is spawned to handle packets
107 and push them into the switch.
108 The kernel thread busy waits on the switch port rather than relying on
109 interrupts or notifications.
110 Polling mode can only be used on physical NICs attached to a VALE switch.
111 .It Fl P Ar valeSSS:PPP
112 Disable polling mode for
114 .It Fl C Ar x | Ar x,y | Ar x,y,z | Ar x,y,z,w
115 When used in conjunction with
117 it supplies the number of tx and rx rings and slots.
118 The full format with four numbers gives, in order, number of tx slots, number
119 of rx slots, number of tx rings and number of rx rings.
120 The form with three numbers uses
122 for both the number of tx and the number of rx rings.
123 The forms with less than two numbers use the default values for the number
125 The form with two numbers supplies the numbers of tx and rx slots.
126 The form with only one number uses
128 for both the number of tx and the number of rx slots.
130 When used in conjunction with
132 only the first three forms are used.
133 The first number may be either 0 or 1.
134 If 0, then all interface rings will be polled by a single thread, running
135 on the core id given by the second number (the third number, if present,
137 If the first number is 1, then the ring identified by the second number will
138 be polled by the core with the same id.
139 If a third number is given, then this is repeated for as many consecutive
142 Used in conjunction with
144 supplies the netmap memory region identifier to use together with the newly
145 created persistent VALE port.
146 These ports use a private memory region by default.
147 Using this option you can let them share memory with other ports.
150 to use the global memory region already shared by all
151 hardware netmap ports.