summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/ptnet.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/ptnet.4 3.html')
-rw-r--r--static/freebsd/man4/ptnet.4 3.html98
1 files changed, 98 insertions, 0 deletions
diff --git a/static/freebsd/man4/ptnet.4 3.html b/static/freebsd/man4/ptnet.4 3.html
new file mode 100644
index 00000000..52c179f1
--- /dev/null
+++ b/static/freebsd/man4/ptnet.4 3.html
@@ -0,0 +1,98 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">PTNET(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">PTNET(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">ptnet</code> &#x2014; <span class="Nd">Ethernet
+ driver for passed-through netmap ports</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp">This network driver is included in <a class="Xr">netmap(4)</a>,
+ and it can be compiled into the kernel by adding the following line in your
+ kernel configuration file:</p>
+<div class="Bd Pp Bd-indent"><code class="Cd">device netmap</code></div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">ptnet</code> device driver provides direct
+ access to host netmap ports, from within a Virtual Machine (VM).
+ Applications running inside the VM can access the TX/RX rings and buffers of
+ a netmap port that the hypervisor has passed-through to the VM. Hypervisor
+ support for <code class="Nm">ptnet</code> is currently available for
+ QEMU/KVM. Any <a class="Xr">netmap(4)</a> port can be passed-through,
+ including physical NICs, <a class="Xr">vale(4)</a> ports, netmap pipes,
+ etc.</p>
+<p class="Pp">The main use-case for netmap passthrough is Network Function
+ Virtualization (NFV), where middlebox applications running within VMs may
+ want to process very high packet rates (e.g., 1-10 millions packets per
+ second or more). Note, however, that those applications must use the device
+ in netmap mode in order to achieve such rates. In addition to the general
+ advantages of netmap, the improved performance of
+ <code class="Nm">ptnet</code> when compared to hypervisor device emulation
+ or paravirtualization (e.g., <a class="Xr">vtnet(4)</a>,
+ <a class="Xr">vmx(4)</a>) comes from the hypervisor being completely
+ bypassed in the data-path. For example, when using
+ <a class="Xr">vtnet(4)</a> the VM has to convert each
+ <a class="Xr">mbuf(9)</a> to a VirtIO-specific packet representation and
+ publish that to a VirtIO queue; on the hypervisor side, the packet is
+ extracted from the VirtIO queue and converted to a hypervisor-specific
+ packet representation. The overhead of format conversions (and packet
+ copies, in same cases) is not incured by <code class="Nm">ptnet</code> in
+ netmap mode, because mbufs are not used at all, and the packet format is the
+ one defined by netmap (e.g., <var class="Ar">struct netmap_slot</var>) along
+ the whole data-path. No format conversions or copies happen.</p>
+<p class="Pp">It is also possible to use a <code class="Nm">ptnet</code> device
+ like a regular network interface, which interacts with the
+ <span class="Ux">FreeBSD</span> network stack (i.e., not in netmap mode).
+ However, in that case it is necessary to pay the cost of data copies between
+ mbufs and netmap buffers, which generally results in lower TCP/UDP
+ performance than <a class="Xr">vtnet(4)</a> or other paravirtualized network
+ devices. If the passed-through netmap port supports the VirtIO network
+ header, <code class="Nm">ptnet</code> is able to use it, and support TCP/UDP
+ checksum offload (for both transmit and receive), TCP segmentation offload
+ (TSO) and TCP large receive offload (LRO). Currently,
+ <a class="Xr">vale(4)</a> ports support the header. Note that the VirtIO
+ network header is generally not used in NFV use-cases, because middleboxes
+ are not endpoints of TCP/UDP connections.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="TUNABLES"><a class="permalink" href="#TUNABLES">TUNABLES</a></h1>
+<p class="Pp">Tunables can be set at the <a class="Xr">loader(8)</a> prompt
+ before booting the kernel or stored in <a class="Xr">loader.conf(5)</a>.</p>
+<dl class="Bl-tag">
+ <dt id="dev.netmap.ptnet_vnet_hdr"><var class="Va">dev.netmap.ptnet_vnet_hdr</var></dt>
+ <dd>This tunable enables (1) or disables (0) the VirtIO network header. If
+ enabled, <code class="Nm">ptnet</code> uses the same header used by
+ <a class="Xr">vtnet(4)</a> to exchange offload metadata with the
+ hypervisor. If disabled, no header is prepended to transmitted and
+ received packets. The metadata is necessary to support TCP/UDP checksum
+ offloads, TSO, and LRO. The default value is 1.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">netintro(4)</a>, <a class="Xr">netmap(4)</a>,
+ <a class="Xr">vale(4)</a>, <a class="Xr">virtio(4)</a>,
+ <a class="Xr">vmx(4)</a>, <a class="Xr">ifconfig(8)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp">The <code class="Nm">ptnet</code> driver was written by
+ <span class="An">Vincenzo Maffione</span>
+ &lt;<a class="Mt" href="mailto:vmaffione@FreeBSD.org">vmaffione@FreeBSD.org</a>&gt;.
+ It first appeared in <span class="Ux">FreeBSD 12.0</span>.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">December 11, 2018</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>