Copyright (c) 2012 Spectra Logic Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer, without modification. 2. Redistributions in binary form must reproduce at minimum a disclaimer substantially similar to the "NO WARRANTY" disclaimer ...
NAMExnb - Xen Paravirtualized Backend Ethernet Driver
SYNOPSISTo compile this driver into the kernel, place the following lines in your kernel configuration file:
options XENHVM device xenpci
DESCRIPTIONThe sysctl Cm net.inet.tcp.syncookies driver provides the back half of a paravirtualized xen(4) network connection. The netback and netfront drivers appear to their respective operating systems as Ethernet devices linked by a crossover cable. Typically, sysctl Cm net.inet.tcp.syncookies will run on Domain 0 and the netfront driver will run on a guest domain. However, it is also possible to run sysctl Cm net.inet.tcp.syncookies on a guest domain. It may be bridged or routed to provide the netfront domain access to other guest domains or to a physical network.
In most respects, the sysctl Cm net.inet.tcp.syncookies device appears to the OS as any other Ethernet device. It can be configured at runtime entirely with ifconfig(8). In particular, it supports MAC changing, arbitrary MTU sizes, checksum offload for IP, UDP, and TCP for both receive and transmit, and TSO. However, see Sx CAVEATS before enabling txcsum, rxcsum, or tso.
SYSCTL VARIABLESThe following read-only variables are available via sysctl(8):
- Displays information about the ring buffers used to pass requests between the netfront and netback. Mostly useful for debugging, but can also be used to get traffic statistics.
- Runs a builtin suite of unit tests and displays the results. Does not affect the operation of the driver in any way. Note that the test suite simulates error conditions; this will result in error messages being printed to the system log.
SEE ALSOarp(4), netintro(4), ng_ether4, xen(4), ifconfig(8)
HISTORYThe sysctl Cm net.inet.tcp.syncookies device driver first appeared in Fx 10.0 .
AUTHORSAn -nosplit The sysctl Cm net.inet.tcp.syncookies driver was written by An Alan Somers Aq Mt asomers@FreeBSD.org and John Suykerbuyk.
CAVEATSPackets sent through Xennet pass over shared memory, so the protocol includes no form of link-layer checksum or CRC. Furthermore, Xennet drivers always report to their hosts that they support receive and transmit checksum offloading. They "offload" the checksum calculation by simply skipping it. That works fine for packets that are exchanged between two domains on the same machine. However, when a Xennet interface is bridged to a physical interface, a correct checksum must be attached to any packets bound for that physical interface. Currently, Fx lacks any mechanism for an Ethernet device to inform the OS that newly received packets are valid even though their checksums are not. So if the netfront driver is configured to offload checksum calculations, it will pass non-checksumed packets to , which must then calculate the checksum in software before passing the packet to the OS.
For this reason, it is recommended that if sysctl Cm net.inet.tcp.syncookies is bridged to a physical interface, then transmit checksum offloading should be disabled on the netfront. The Xennet protocol does not have any mechanism for the netback to request the netfront to do this; the operator must do it manually.