From nobody Mon Feb 9 06:34:05 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1712144766029409.83807826874715; Wed, 3 Apr 2024 04:46:06 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id CE68018C9; Wed, 3 Apr 2024 07:46:04 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 77F071AB7; Wed, 3 Apr 2024 07:44:49 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3C6F518FC; Wed, 3 Apr 2024 07:44:45 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C281118FC for ; Wed, 3 Apr 2024 07:44:44 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-140-7KtXYOkZN4u7wSPLm0AH2Q-1; Wed, 03 Apr 2024 07:44:43 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0388828043C9 for ; Wed, 3 Apr 2024 11:44:43 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70D444853 for ; Wed, 3 Apr 2024 11:44:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: 7KtXYOkZN4u7wSPLm0AH2Q-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 1/2] docs: Rewrite documentation for network device models Date: Wed, 3 Apr 2024 13:44:19 +0200 Message-ID: <27a3e14682da8f3d52da3c5ae5a8b061dc6bd63e.1712144605.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: CWFT7JOACEINY5EOU5MLLHKI4DSASRLL X-Message-ID-Hash: CWFT7JOACEINY5EOU5MLLHKI4DSASRLL X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1712144767533100001 Since libvirt now tries to interpret network device models (unless an unknow model is used) the documentation didn't make a good job specifying what is supported. Rewrite the docs to explicitly list the models which we do parse. Signed-off-by: Peter Krempa Reviewed-by: Jonathon Jongsma --- docs/formatdomain.rst | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index e2f66b982c..a68d90c4a4 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -5592,23 +5592,26 @@ Setting the NIC model ... For hypervisors which support this, you can set the model of emulated netw= ork -interface card. +interface card via the ``model`` element. -The values for ``type`` aren't defined specifically by libvirt, but by wha= t the -underlying hypervisor supports (if any). For QEMU and KVM you can get a li= st of -supported models with these commands: +While libvirt accepts any value as the ``type`` and passes it to the +hypervisor to preserve compatibility, most devices nowadays have additional +handling and address allocation which may not work properly unless the mod= el +is known by libvirt. -:: +Libvirt supports natively the following network device models: +``virtio``, ``virtio-transitional`` (:since:`Since 5.2.0`), +``virtio-non-transitional`` (:since:`Since 5.2.0`), ``e1000``, ``e1000e``, +``igb`` (:since:`Since 9.3.0`), ``rtl8139``, ``netfront``, +``usb-net`` (:since:`Since 10.3.0`), ``spapr-vlan``, ``lan9118``, ``scm91c= 111``, +``vlance``, ``vmxnet``, ``vmxnet2``, ``vmxnet3``, ``Am79C970A``, ``Am79C97= 3``, +``82540EM``, ``82545EM``, ``82543GC``. + +For QEMU you can get a list of supported models with this commands: - qemu -net nic,model=3D? /dev/null - qemu-kvm -net nic,model=3D? /dev/null +:: -Typical values for QEMU and KVM include: ne2k_isa i82551 i82557b i82559er -ne2k_pci pcnet rtl8139 e1000 virtio. :since:`Since 5.2.0`, -``virtio-transitional`` and ``virtio-non-transitional`` values are support= ed. -See `Virtio transitional devices`_ for more details. -:since:`Since 9.3.0` igb is also supported. -:since:`Since 10.3.0` usb-net is supported. + qemu-system-x86_64 -net nic,model=3D? Setting NIC driver-specific options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org