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 2D1F5A04B5 for ; Tue, 3 Dec 2019 19:28:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 24A7A5B3C; Tue, 3 Dec 2019 19:28:00 +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 EE8FB8F96 for ; Tue, 3 Dec 2019 19:27:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397678; 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=oM0DSQ60EUCzpUkcFV6hq1KvBd7CAup4juHXtd6e1No=; b=Ks0pzVB4gSi9NftN0m8eIHyCmxCBNfp2Gk7GHUJtsMkJhYua2VqKZtOUprjGfKV3DxCF/G HmMoKpLpI/5p1bR6IUb1I8HqKqDapzTeJTSapRaEqUdroNng2QX0UdsePgG16swrsD3WCS /JD06akKoMX0aNt0IBKNHREyyyzEdWw= 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-156-n7bBl20AO7e6IPmG_yu7_w-1; Tue, 03 Dec 2019 13:27:55 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FAC48017CC; Tue, 3 Dec 2019 18:27:54 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92EE95C6DC; Tue, 3 Dec 2019 18:27:52 +0000 (UTC) From: Kevin Traynor To: Thibaut Collet Cc: Maxime Coquelin , dpdk stable Date: Tue, 3 Dec 2019 18:26:21 +0000 Message-Id: <20191203182714.17297-12-ktraynor@redhat.com> In-Reply-To: <20191203182714.17297-1-ktraynor@redhat.com> References: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: n7bBl20AO7e6IPmG_yu7_w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/10/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/840622c7e1f4fda5dc= 737468082df085e29ace33 Thanks. Kevin. --- >From 840622c7e1f4fda5dc737468082df085e29ace33 Mon Sep 17 00:00:00 2001 From: Thibaut Collet Date: Wed, 11 Sep 2019 18:04:09 +0200 Subject: [PATCH] net/virtio: get all pending Rx packets in vectorized paths [ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ] The loop to read packets does not take all packets as the number of available packets (nb_used) is decremented in the loop. Take all available packets provides a performance improvement of 3%. Fixes: fc3d66212fed ("virtio: add vector Rx") Signed-off-by: Thibaut Collet Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++-- drivers/net/virtio/virtio_rxtx_simple_sse.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/vir= tio/virtio_rxtx_simple_neon.c index 9200db7ff..6bcacb047 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c @@ -43,5 +43,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx= _pkts, =09struct virtqueue *vq =3D rxvq->vq; =09struct virtio_hw *hw =3D vq->hw; -=09uint16_t nb_used; +=09uint16_t nb_used, nb_total; =09uint16_t desc_idx; =09struct vring_used_elem *rused; @@ -107,7 +107,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **= rx_pkts, =09} =20 +=09nb_total =3D nb_used; =09ref_rx_pkts =3D rx_pkts; =09for (nb_pkts_received =3D 0; -=09=09nb_pkts_received < nb_used;) { +=09=09nb_pkts_received < nb_total;) { =09=09uint64x2_t desc[RTE_VIRTIO_DESC_PER_LOOP / 2]; =09=09uint64x2_t mbp[RTE_VIRTIO_DESC_PER_LOOP / 2]; diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virt= io/virtio_rxtx_simple_sse.c index d6194a33f..7a25ac7e4 100644 --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c @@ -44,5 +44,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx= _pkts, =09struct virtqueue *vq =3D rxvq->vq; =09struct virtio_hw *hw =3D vq->hw; -=09uint16_t nb_used; +=09uint16_t nb_used, nb_total; =09uint16_t desc_idx; =09struct vring_used_elem *rused; @@ -109,7 +109,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **= rx_pkts, =09} =20 +=09nb_total =3D nb_used; =09ref_rx_pkts =3D rx_pkts; =09for (nb_pkts_received =3D 0; -=09=09nb_pkts_received < nb_used;) { +=09=09nb_pkts_received < nb_total;) { =09=09__m128i desc[RTE_VIRTIO_DESC_PER_LOOP / 2]; =09=09__m128i mbp[RTE_VIRTIO_DESC_PER_LOOP / 2]; --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:52.514958341 +0000 +++ 0012-net-virtio-get-all-pending-Rx-packets-in-vectorized-.patch=092019-= 12-03 17:29:51.707750848 +0000 @@ -1 +1 @@ -From 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d Mon Sep 17 00:00:00 2001 +From 840622c7e1f4fda5dc737468082df085e29ace33 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 70e89fc42..992e71f01 100644 +index 9200db7ff..6bcacb047 100644 @@ -42 +43 @@ -index cb1610e71..f9ec4ae69 100644 +index d6194a33f..7a25ac7e4 100644