Lines Matching +full:multi +full:- +full:socket
1 .. SPDX-License-Identifier: GPL-2.0
25 Most OSes today have built-in support for a number of "fake"
27 User Mode Linux takes this concept to the ultimate extreme - there
30 concepts which map onto something provided by the host - files, sockets,
36 The UML kernel is just a process running on Linux - same as any other
57 * You can run a usermode kernel as a non-root user (you may need to
99 This is extremely easy on Debian - you can do it using debootstrap. It is
100 also easy on OpenWRT - the build process can build UML images. All other
101 distros - YMMV.
114 or by running ``tune2fs -o discard /dev/ubdXX`` will request UML to
131 Set the root password -t he easiest way to do that is to chroot into the
144 /dev/ubd0 ext4 discard,errors=remount-ro 0 1
150 UML supports two classes of network devices - the older uml_net ones
177 # cp -rax /usr/lib/uml/modules /mnt/lib/modules
191 connection may be either a point-to-point (similar to a connection
192 between machines using a back-to-back cable) or a connection to a
198 +-----------+--------+------------------------------------+------------+
202 +-----------+--------+------------------------------------+------------+
204 +-----------+--------+------------------------------------+------------+
206 +-----------+--------+------------------------------------+------------+
208 +-----------+--------+------------------------------------+------------+
210 +-----------+--------+------------------------------------+------------+
212 +-----------+--------+------------------------------------+------------+
214 +-----------+--------+------------------------------------+------------+
216 +-----------+--------+------------------------------------+------------+
218 +-----------+--------+------------------------------------+------------+
219 | socket | legacy | none | ~ 450Mbit |
220 +-----------+--------+------------------------------------+------------+
222 +-----------+--------+------------------------------------+------------+
224 +-----------+--------+------------------------------------+------------+
226 +-----------+--------+------------------------------------+------------+
231 * All transports which have multi-packet rx and/or tx can deliver pps
234 * All legacy transports are generally limited to ~600-700MBit and 0.05Mps
239 * Socket allows connections only between UML instances.
277 --------------
281 * ``depth=int`` - sets the queue depth for vector IO. This is the
284 for most applications that need throughput in the 2-4 Gbit range.
287 * ``mac=XX:XX:XX:XX:XX`` - sets the interface MAC address value.
289 * ``gro=[0,1]`` - sets GRO on or off. Enables receive/transmit offloads.
299 * ``mtu=int`` - sets the interface MTU
301 * ``headroom=int`` - adjusts the default headroom (32 bytes) reserved
302 if a packet will need to be re-encapsulated into for instance VXLAN.
304 * ``vec=0`` - disable multipacket io and fall back to packet at a
308 --------------
311 have a shared option - the name of the interface to bind to.
313 * ``src, dst, src_port, dst_port`` - all transports which use sockets
321 option, the socket type is determined based on what do the src and dst
325 -------------
334 tap0 can be configured as a point-to-point interface and given an ip
339 transport at this point, because Linux does not support multi-packet
342 to it at kernel level via specialized interfaces like vhost-net. A
343 vhost-net like helper for UML is planned at some point in the future.
348 UML user using tunctl. Example ``tunctl -u uml-user -t tap0``
353 ----------------
360 and a raw socket for receive. The raw socket allows multi-packet
366 raw socket transport
367 --------------------
371 vecX:transport=raw,ifname=p-veth0,depth=128,gro=1
388 pre-up ip link add veth0 type veth peer name p-veth0 && \
389 ifconfig p-veth0 up
391 UML can now bind to p-veth0 like this::
393 vec0:transport=raw,ifname=p-veth0,depth=128,gro=1
402 * ``bpffile=str`` filename of raw bpf code to be loaded as a socket filter
413 Privileges required: raw socket transport requires `CAP_NET_RAW`
416 GRE socket transport
417 --------------------
429 * ``rx_key=int`` - GRE 32 bit integer key for rx packets, if set,
432 * ``tx_key=int`` - GRE 32 bit integer key for tx packets, if set
435 * ``sequence=[0,1]`` - enable GRE sequence
437 * ``pin_sequence=[0,1]`` - pretend that the sequence is always reset
441 * ``v6=[0,1]`` - force IPv4 or IPv6 sockets respectively
466 pre-up ip link add gt0 type gretap local 192.168.128.1 \
474 l2tpv3 socket transport
475 -----------------------
492 * ``rx_session=int`` - l2tpv3 32 bit integer session for rx packets
494 * ``tx_session=int`` - l2tpv3 32 bit integer session for tx packets
501 * ``rx_cookie=int`` - l2tpv3 32 bit integer cookie for rx packets - same
505 * ``tx_cookie=int`` - l2tpv3 32 bit integer cookie for tx packets
507 * ``cookie64=[0,1]`` - use 64 bit cookies instead of 32 bit.
509 * ``counter=[0,1]`` - enable l2tpv3 counter
511 * ``pin_counter=[0,1]`` - pretend that the counter is always reset on
515 * ``v6=[0,1]`` - force v6 sockets
517 * ``udp=[0,1]`` - use raw sockets (0) or UDP (1) version of the protocol
537 pre-up ip l2tp add tunnel remote 127.0.0.1 \
549 BESS socket transport
550 ---------------------
556 It has support for a simple sequential packet socket mode which in the
564 socket address as source and unix_dst socket address as destination.
566 For BESS configuration and how to allocate a BESS Unix domain socket port
569 https://github.com/NetSys/bess/wiki/Built-In-Modules-and-Ports
583 This section assumes that either the user-mode-linux package from the
596 --------------------
598 * ``mem=int[K,M,G]`` - amount of memory. By default bytes. It will
622 * UBD supports TRIM - asking the Host OS to reclaim any unused
626 * ``root=`` root device - most likely ``/dev/ubd0`` (this is a Linux
630 ----------------------------
637 in a text-only environment.
656 * The null channel - Discard all input or output. Example ``con=null`` will set
659 * The fd channel - use file descriptor numbers for input/out. Example:
662 * The port channel - listen on tcp port number. Example: ``con1=port:4321``
664 * The pty and pts channels - use system pty/pts.
666 * The tty channel - bind to an existing system tty. Example: ``con1=/dev/tty8``
669 * The xterm channel - this is the default - bring up an xterm on this channel
672 port-helper and other utilities needed for UML to communicate with the xterm.
697 shut down the UML instance, mount the image, chroot into it and set it - as
706 management console. The UML management console is a low-level interface to the
708 there is a full-blown operating system under UML, there is much greater
735 That file is the socket that uml_mconsole will use to communicate with
762 -------
770 There are a couple actual uses for this. It's a simple no-op which
776 ----
783 ---------------
793 ------
802 ------
813 -----
818 Documentation/admin-guide/sysrq.rst in your favorite kernel tree to
822 ---
824 This invokes the ``Ctl-Alt-Del`` action in the running image. What exactly
829 ----
836 --
844 ----
846 This takes one argument - the name of a file in /proc which is printed
850 -----
852 This takes one argument - the pid number of a process. Its stack is
867 ---------------------------
870 the copy-on-write (COW) layering capability of the ubd block driver.
872 from either device - the private one if the requested block is valid in
885 inter-socket traffic.
888 bind UML to a set of logical cpus residing on the same socket using the
891 To add a copy-on-write layer to an existing block device file, simply
901 ----------
904 image files to the underlying OS. It is important to use either ls -ls
908 -------------
917 Cows can moo - uml_moo : Merging a COW file with its backing file
918 -----------------------------------------------------------------
938 there are multiple COWs associated with a backing file, a -d merge of
941 noticeably faster than a non-destructive merge.
967 ------------
981 # mount none /mnt/host -t hostfs
985 specify a subdirectory to mount with the -o switch to mount::
987 # mount none /mnt/home -t hostfs -o /home
992 -----------------------------
999 # mount root_fs uml_root_dir -o loop
1010 # find . -uid 0 -exec chown jdike {} \;
1020 --------------
1024 knowledge, UML will not know about it and its own in-memory cache of
1042 Similarly, on large multi-node NUMA systems UML will benefit if all of
1052 mount -t tmpfs -ompol=bind:X none /mnt/tmpfs-nodeX
1053 TEMP=/mnt/tmpfs-nodeX taskset -cX linux options options options..
1059 UML is an excellent platform to develop new Linux kernel concepts -
1064 Example - want to try how linux will work with 4096 "proper" network
1068 is difficult with other virtualization packages - they are
1073 new feature, please send it to ``linux-um@lists.infradead.org``
1075 Please follow all standard Linux patch guidelines such as cc-ing
1077 For more details see ``Documentation/process/submitting-patches.rst``
1079 Note - the list does not accept HTML or attachments, all emails must
1102 host$ strace -p 16566
1103 --- SIGIO {si_signo=SIGIO, si_code=POLL_IN, si_band=65} ---
1113 …--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_TRAPPED, si_pid=16967, si_uid=0, si_status=SIGTRAP, si_…
1121 …--- SIGALRM {si_signo=SIGALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=1631716…
1122 rt_sigreturn({mask=[PIPE]}) = -1 EINTR (Interrupted system call)
1126 * UML interrupt controller uses epoll - this is UML waiting for IO
1151 # gdb -p 16566
1162 to in-kernel only and non-UML specific. The reason for this is that
1188 -----------------------
1193 For example, specifying the socket used for IPC communication
1195 security-wise. Allowing it as a loadable module parameter
1199 (e.g. loading BPF "firmware" for raw socket network transports),