From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0E4DA034F; Mon, 29 Mar 2021 12:55:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 565F740151; Mon, 29 Mar 2021 12:55:33 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 963C240042 for ; Mon, 29 Mar 2021 12:55:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617015330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jD40TmLhgHYzIGLa2CaZ44LuMQlQ7NbTx8GZozIh12Y=; b=ZQitAHdhr8m7keixX8DvfKlaudBnlqCgcNbTkCxyJSz79lwCwbur+Qm+IEc34S2ffcTV0g KDpl527+CgxeCBobKrny2JFrxCbUdAfFfZcXz/P+5XHxLPppOnVaNKpGsSdiJhndDMKIYL w5lSa/ER0HE6MTwfkEBeAh3wJmLygIs= 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-19-Y8LZTavyPPuIs6rkvLu6ZQ-1; Mon, 29 Mar 2021 06:55:29 -0400 X-MC-Unique: Y8LZTavyPPuIs6rkvLu6ZQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 06C3783DD20; Mon, 29 Mar 2021 10:55:28 +0000 (UTC) Received: from bnemeth.users.ipa.redhat.com (ovpn-114-82.ams2.redhat.com [10.36.114.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58AD12B9FA; Mon, 29 Mar 2021 10:55:20 +0000 (UTC) Message-ID: <0613d6119c46520c71e7d24605cfec97352f6c1d.camel@redhat.com> From: Balazs Nemeth To: Maxime Coquelin , dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, olivier.matz@6wind.com Date: Mon, 29 Mar 2021 12:55:18 +0200 In-Reply-To: <20210316093825.478723-1-maxime.coquelin@redhat.com> References: <20210316093825.478723-1-maxime.coquelin@redhat.com> User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bnemeth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 0/4] net/virtio: make virtqueue struct cache-friendly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Tue, 2021-03-16 at 10:38 +0100, Maxime Coquelin wrote: > This series optimizes the cache usage of virtqueue struct, > by making a "fake" mbuf being dynamically allocated in Rx > virtnet struct, by removing a useless virtuque pointer > into the virtnet structs and by moving a few fields > to pack holes. > > With these 3 patches, the virtqueue struct size goes from > 576 bytes (9 cachelines) to 248 bytes (4 cachelines). > > Changes in v4: > ============== > - Fix ARM build failure after rebase (0-day robot) > - Fix fake_mbuf freeing (David) > - Applied David R-by > > Changes in v3: > ============== > - Use rte_zmalloc_socket for fake mbuf alloc (David) > - Fix typos in commit messages > - Remove superfluous pointer check befor freeing (David) > - Fix checkpatch warnings > > Changes in v2: > ============== > - Rebase on latest main > - Improve error path in virtio_init_queue > - Fix various typos in commit messages > > Maxime Coquelin (4): >   net/virtio: remove reference to virtqueue in vrings >   net/virtio: improve queue init error path >   net/virtio: allocate fake mbuf in Rx queue >   net/virtio: pack virtqueue struct > >  drivers/net/virtio/virtio_ethdev.c            | 64 +++++++++++-------- >  drivers/net/virtio/virtio_rxtx.c              | 37 +++++------ >  drivers/net/virtio/virtio_rxtx.h              |  5 +- >  drivers/net/virtio/virtio_rxtx_packed.c       |  4 +- >  drivers/net/virtio/virtio_rxtx_packed.h       |  6 +- >  drivers/net/virtio/virtio_rxtx_packed_avx.h   |  4 +- >  drivers/net/virtio/virtio_rxtx_packed_neon.h  |  4 +- >  drivers/net/virtio/virtio_rxtx_simple.h       |  2 +- >  .../net/virtio/virtio_rxtx_simple_altivec.c   |  2 +- >  drivers/net/virtio/virtio_rxtx_simple_neon.c  |  2 +- >  drivers/net/virtio/virtio_rxtx_simple_sse.c   |  2 +- >  .../net/virtio/virtio_user/virtio_user_dev.c  |  4 +- >  drivers/net/virtio/virtio_user_ethdev.c       |  2 +- >  drivers/net/virtio/virtqueue.h                | 24 ++++--- >  14 files changed, 87 insertions(+), 75 deletions(-) > Tested this in a PVP setup on ARM, giving a slight improvement in performance. For the series: Tested-by: Balazs Nemeth