Updated: October 28, 2024 |
Provide the standard VIRTIO interface for network devices
vdev virtio-net options
For a list of options available to all vdevs, see Common vdev options at the beginning of this chapter.
The virtio-net vdev provides an interface for network devices. Normally this device appears as a PCI device, but if you specify the loc and intr options, the guest will see it as a memory-mapped I/O device at the specified location.
For virtio-net, packed virtqueues are enabled if the guest supports them.
Feature bits are used to specify the features exposed to a peer in a network. They can be defined for each individual virtio-net interface (i.e., each peer connection can have its own feature set).
0001 1001 1100 0011with the least-significant bit (bit zero) on the right.
Of particular interest are the bits that support checksumming and Transmit Segmentation Offload (TSO); both these features are supported in the QNX TCP stack (see the table below).
The default peerfeats value for a peer interface is 0x0000.
You should limit the feature bits to the features supported by the guests. For example, if you are configuring two QNX Neutrino guests to connect as peers, you should specify 0x19c3 as the value for the peerfeats option's mask in the VM configuration for each guest.
If you are configuring a peer connection to a QNX io-pkt-* bridge, you must set the peerfeats option to 0x0 (zero) to disable all features on both peer nodes.
ifconfig vp0 -tcp4csum -udp4csum -udp6csum -tcp6csum
This is required so that the host bridge does not incorrectly discard or delay packets. Note, however, that you disable checksums only for receiving IP (-rx), so you can still send packets with checksums. If the peer node is properly configured, it should have checksums disabled and be able to receive your packets.
ifconfig vt1 tcp4csum udp4csum tcp6csum udp6csum tso4 tso6
Bit | Name | Feature |
---|---|---|
0 | VIRTIO_NET_F_CSUM | Device handles packets with partial (or no) checksum. |
1 | VIRTIO_NET_F_GUEST_CSUM | Driver handles packets with partial (or no) checksum. |
Bit | Name | Feature |
---|---|---|
7 | VIRTIO_NET_F_GUEST_TSO4 | Driver can receive TSOv4. |
8 | VIRTIO_NET_F_GUEST_TSO6 | Driver can receive TSOv6. |
11 | VIRTIO_NET_F_HOST_TSO4 | Device can receive TSOv4. |
12 | VIRTIO_NET_F_HOST_TSO6 | Device can receive TSOv6. |
For more information about using the virtio-net vdev, see Networking in the Using Virtual Devices, Networking, and Memory Sharing chapter.