From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E477A04E0; Thu, 28 Nov 2019 15:30:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 572822B9C; Thu, 28 Nov 2019 15:30:42 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 858FD28EE for ; Thu, 28 Nov 2019 15:30:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574951439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HtOMtOIsDsf0BQpi/L5s2uzO4ovmUoDtHMPEVw/KT04=; b=Mhs3gtvWeMvrKhixB2JQfovb9eLrxKX3J5QEAToGhbfrlpMmMkj2wr9hwBgt/8H3oEmMfL 7JAbQcbc2M7RI4b6U/kh9V52t3a4xu1UM4gC+PY5CvVNla77TcZUIVFffXLYsAXvo0WmS6 dTsbMiPNVzj0k8KAhLX+pkSLqZ5YzTo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-20--IESP-v5PBeEfMnc2AboXQ-1; Thu, 28 Nov 2019 09:30:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75A81107B78B; Thu, 28 Nov 2019 14:30:35 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21828608BF; Thu, 28 Nov 2019 14:30:29 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org Cc: thomas@monjalon.net, Yinan Wang , Tiwei Bie , Maxime Coquelin Date: Thu, 28 Nov 2019 15:30:21 +0100 Message-Id: <20191128143021.20928-1-maxime.coquelin@redhat.com> In-Reply-To: <20191127151952.7770-1-yinan.wang@intel.com> References: <20191127151952.7770-1-yinan.wang@intel.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: -IESP-v5PBeEfMnc2AboXQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH v6] doc: clarify virtio PMD path selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yinan Wang Add virtio paths selection and usage introduction for better virtio usability. Signed-off-by: Yinan Wang Acked-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- v6: - Move to Virtio NIC documentation doc/guides/nics/virtio.rst | 124 +++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index fb378a4b94..d1f5fb8986 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -402,3 +402,127 @@ Below devargs are supported by the virtio-user vdev: =20 It is used to enable virtio device packed virtqueue feature. (Default: 0 (disabled)) + +Virtio paths Selection and Usage +-------------------------------- + +Logically virtio-PMD has 9 paths based on the combination of virtio featur= es +(Rx mergeable, In-order, Packed virtqueue), below is an introduction of th= ese +features: + +* `Rx mergeable `_: With this feature negotiated, dev= ice + can receive large packets by combining individual descriptors. +* `In-order `_: Some devices always use descriptor= s + in the same order in which they have been made available, these + devices can offer the VIRTIO_F_IN_ORDER feature. With this feature neg= otiated, + driver will use descriptors in order. +* `Packed virtqueue `_: The structure of packed virtqueue = is + different from split virtqueue, split virtqueue is composed of availab= le ring, + used ring and descriptor table, while packed virtqueue is composed of = descriptor + ring, driver event suppression and device event suppression. The idea = behind + this is to improve performance by avoiding cache misses and make it ea= sier + for hardware to implement. + +Virtio paths Selection +~~~~~~~~~~~~~~~~~~~~~~ + +If packed virtqueue is not negotiated, below split virtqueue paths will be= selected +according to below configuration: + +#. Split virtqueue mergeable path: If Rx mergeable is negotiated, in-order= feature is + not negotiated, this path will be selected. +#. Split virtqueue non-mergeable path: If Rx mergeable and in-order featur= e are not + negotiated, also Rx offload(s) are requested, this path will be selecte= d. +#. Split virtqueue in-order mergeable path: If Rx mergeable and in-order f= eature are + both negotiated, this path will be selected. +#. Split virtqueue in-order non-mergeable path: If in-order feature is neg= otiated and + Rx mergeable is not negotiated, this path will be selected. +#. Split virtqueue vectorized Rx path: If Rx mergeable is disabled and no = Rx offload + requested, this path will be selected. + +If packed virtqueue is negotiated, below packed virtqueue paths will be se= lected +according to below configuration: + +#. Packed virtqueue mergeable path: If Rx mergeable is negotiated, in-orde= r feature + is not negotiated, this path will be selected. +#. Packed virtqueue non-mergeable path: If Rx mergeable and in-order featu= re are not + negotiated, this path will be selected. +#. Packed virtqueue in-order mergeable path: If in-order and Rx mergeable = feature are + both negotiated, this path will be selected. +#. Packed virtqueue in-order non-mergeable path: If in-order feature is ne= gotiated and + Rx mergeable is not negotiated, this path will be selected. + +Rx/Tx callbacks of each Virtio path +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Refer to above description, virtio path and corresponding Rx/Tx callbacks = will +be selected automatically. Rx callbacks and Tx callbacks for each virtio p= ath +are shown in below table: + +.. table:: Virtio Paths and Callbacks + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D + Virtio paths Rx callbacks = Tx callbacks + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D + Split virtqueue mergeable path virtio_recv_mergeable_pkts= virtio_xmit_pkts + Split virtqueue non-mergeable path virtio_recv_pkts = virtio_xmit_pkts + Split virtqueue in-order mergeable path virtio_recv_pkts_inorder = virtio_xmit_pkts_inorder + Split virtqueue in-order non-mergeable path virtio_recv_pkts_inorder = virtio_xmit_pkts_inorder + Split virtqueue vectorized Rx path virtio_recv_pkts_vec = virtio_xmit_pkts + Packed virtqueue mergeable path virtio_recv_mergeable_pkts= _packed virtio_xmit_pkts_packed + Packed virtqueue non-meregable path virtio_recv_pkts_packed = virtio_xmit_pkts_packed + Packed virtqueue in-order mergeable path virtio_recv_mergeable_pkts= _packed virtio_xmit_pkts_packed + Packed virtqueue in-order non-mergeable path virtio_recv_pkts_packed = virtio_xmit_pkts_packed + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D + +Virtio paths Support Status from Release to Release +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Virtio feature implementation: + +* In-order feature is supported since DPDK 18.08 by adding new Rx/Tx cal= lbacks + ``virtio_recv_pkts_inorder`` and ``virtio_xmit_pkts_inorder``. +* Packed virtqueue is supported since DPDK 19.02 by adding new Rx/Tx cal= lbacks + ``virtio_recv_pkts_packed`` , ``virtio_recv_mergeable_pkts_packed`` an= d + ``virtio_xmit_pkts_packed``. + +All virtio paths support status are shown in below table: + +.. table:: Virtio Paths and Releases + + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + Virtio paths 16.11 ~ 18.05 18.08 ~ 18.1= 1 19.02 ~ 19.11 + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + Split virtqueue mergeable path Y Y = Y + Split virtqueue non-mergeable path Y Y = Y + Split virtqueue vectorized Rx path Y Y = Y + Split virtqueue simple Tx path Y N = N + Split virtqueue in-order mergeable path Y = Y + Split virtqueue in-order non-mergeable path Y = Y + Packed virtqueue mergeable path = Y + Packed virtqueue non-mergeable path = Y + Packed virtqueue in-order mergeable path = Y + Packed virtqueue in-order non-mergeable path = Y + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +QEMU Support Status +~~~~~~~~~~~~~~~~~~~ + +* Qemu now supports three paths of split virtqueue: Split virtqueue merg= eable path, + Split virtqueue non-mergeable path, Split virtqueue vectorized Rx path= . +* Since qemu 4.2.0, Packed virtqueue mergeable path and Packed virtqueue= non-mergeable + path can be supported. + +How to Debug +~~~~~~~~~~~~ + +If you meet performance drop or some other issues after upgrading the driv= er +or configuration, below steps can help you identify which path you selecte= d and +root cause faster. + +#. Run vhost/virtio test case; +#. Run "perf top" and check virtio Rx/Tx callback names; +#. Identify which virtio path is selected refer to above table. --=20 2.21.0