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 5D9EFA0555 for ; Wed, 19 Feb 2020 16:56:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55FA9B62; Wed, 19 Feb 2020 16:56:55 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 581ACB62 for ; Wed, 19 Feb 2020 16:56:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582127813; 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=UkhH6ukmi0yjPtBXiIfIS+x6J9n3Ljlnhczy7expNn0=; b=iMLrmPgge1zHx4YCPm+/0Mq0Tn3laIdQpjesVcx2y7Cu9us030ppA1runyf5Q3xkH9OH/x w0UfRRf+bcGmeCtg9jOsTSk5Tnj+Z2VASXSXtmaijC5WMdgqILvboV9asnKr5VfLPBxCBx 18q8bEBCB/RvM8ce9Mpark/rgwZD39s= 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-51-av8jdUJ8O_WYPIrvUuAiUA-1; Wed, 19 Feb 2020 10:56:50 -0500 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 9E9FE80259A; Wed, 19 Feb 2020 15:56:49 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 29AD4811F8; Wed, 19 Feb 2020 15:56:45 +0000 (UTC) From: Kevin Traynor To: Scott Wasson Cc: Ferruh Yigit , dpdk stable Date: Wed, 19 Feb 2020 15:55:50 +0000 Message-Id: <20200219155607.20495-5-ktraynor@redhat.com> In-Reply-To: <20200219155607.20495-1-ktraynor@redhat.com> References: <20200219155607.20495-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: av8jdUJ8O_WYPIrvUuAiUA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'kni: fix not contiguous FIFO' has been queued to LTS release 18.11.7 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/20. 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/0e793ac50f77634154= dd9ebcb96d824b2a177684 Thanks. Kevin. --- >From 0e793ac50f77634154dd9ebcb96d824b2a177684 Mon Sep 17 00:00:00 2001 From: Scott Wasson Date: Fri, 14 Feb 2020 10:00:52 +0000 Subject: [PATCH] kni: fix not contiguous FIFO [ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ] KNI requires FIFO to be physically contiguous, with existing 'rte_memzone_reserve()' API this is not guaranteed by default and as a result KNI rings and packet delivery may be broken if reserved memory is not physically contiguous. Fixing it by providing 'RTE_MEMZONE_IOVA_CONTIG' flag to ask physically contiguous memory. Bugzilla ID: 389 Fixes: 23fa86e529e4 ("memzone: enable IOVA-contiguous reserving") Signed-off-by: Scott Wasson Acked-by: Ferruh Yigit --- lib/librte_kni/rte_kni.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 941bec9682..b7bd8773bc 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -143,29 +143,36 @@ kni_reserve_mz(struct rte_kni *kni) =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_TX_Q_MZ_NAME_FMT, kni->name= ); -=09kni->m_tx_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_A= NY, 0); +=09kni->m_tx_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_A= NY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_tx_q =3D=3D NULL, tx_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RX_Q_MZ_NAME_FMT, kni->name= ); -=09kni->m_rx_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_A= NY, 0); +=09kni->m_rx_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_A= NY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_rx_q =3D=3D NULL, rx_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_ALLOC_Q_MZ_NAME_FMT, kni->n= ame); -=09kni->m_alloc_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_I= D_ANY, 0); +=09kni->m_alloc_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_I= D_ANY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_alloc_q =3D=3D NULL, alloc_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_FREE_Q_MZ_NAME_FMT, kni->na= me); -=09kni->m_free_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID= _ANY, 0); +=09kni->m_free_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID= _ANY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_free_q =3D=3D NULL, free_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_REQ_Q_MZ_NAME_FMT, kni->nam= e); -=09kni->m_req_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_= ANY, 0); +=09kni->m_req_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_= ANY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_req_q =3D=3D NULL, req_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RESP_Q_MZ_NAME_FMT, kni->na= me); -=09kni->m_resp_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID= _ANY, 0); +=09kni->m_resp_q =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID= _ANY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_resp_q =3D=3D NULL, resp_q_fail); =20 =09snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_SYNC_ADDR_MZ_NAME_FMT, kni-= >name); -=09kni->m_sync_addr =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET= _ID_ANY, 0); +=09kni->m_sync_addr =3D rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET= _ID_ANY, +=09=09=09RTE_MEMZONE_IOVA_CONTIG); =09KNI_MEM_CHECK(kni->m_sync_addr =3D=3D NULL, sync_addr_fail); =20 --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-19 15:43:50.000599158 +0000 +++ 0005-kni-fix-not-contiguous-FIFO.patch=092020-02-19 15:43:49.718142256 = +0000 @@ -1 +1 @@ -From eab71b8463c9d3aeeb8c222ff6159b4125d23019 Mon Sep 17 00:00:00 2001 +From 0e793ac50f77634154dd9ebcb96d824b2a177684 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index e388751e33..bcf82cc2d5 100644 +index 941bec9682..b7bd8773bc 100644 @@ -28 +29 @@ -@@ -146,29 +146,36 @@ kni_reserve_mz(struct rte_kni *kni) +@@ -143,29 +143,36 @@ kni_reserve_mz(struct rte_kni *kni)