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 4861DA0553 for ; Mon, 17 Feb 2020 18:46:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CE5E1DAB4; Mon, 17 Feb 2020 18:46:06 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 4575B1DAB4 for ; Mon, 17 Feb 2020 18:46:05 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id z3so20839550wru.3 for ; Mon, 17 Feb 2020 09:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jz7hQP7BVNSJ32CZrv2yez4WbwfZo1rSoVZ0mdywolI=; b=AvssvvFm6Y03/LjUEKNJmmyWfhiBkNHc1zOe+CWNxkdCNVDTCzxzPk6vyTvdVmwV4Q iNMrGfTgQHugMN74nzQcBHiOIFn1/7HeHB6vIgWSyM6Sbbjv8+8zGnbCxvaWveXpcNQt i5BWa5mAFdKp/4DyBQJw4svvXwUQZ+WgBhQLx9XwFpUeLBhA2pB/5OwiGNYoL931wVU+ lYrY1czKdYfHUgOSVMhg7MOviMolek31FQreAcXzcehg44rPpYJ8gHz84zj5ntaOB/JH JIfo2dl7a9kJyk72j043FkbJ9t/TooJ9p174hJXby8+tb8y/roKuSglsuGJUYMbcVOdG tWqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jz7hQP7BVNSJ32CZrv2yez4WbwfZo1rSoVZ0mdywolI=; b=OCxITRpILN63hI9VcIquPV7tTv0f1BmjD8eTyIfMXLIcDKb7F2wAz3M7yiqNHHRIeH 6AKsT7x8J1/ZY2n6Q/oyYbhfDQWAUH3LpDB3id7/j58rsg/avBwiJWfJLmlWDTuYPSB8 CGpdwitmcRfeauhTSvf9qBJNSA+JgZxZ9+3eR/0AgUnIMwXPIuZk5F2lTawbsoiN8bgW OSi4yz6oM7RcthKZvpMMGoX1tKBAN3XLnvorrd6U8GmyxuEB5SvCvejDaAnnqNKDBBg0 +Zw7Yjmm6GL4GmzKQ+8iz1cy1KtXV5XoADLgf3veH4h/Z3wW+oFgwwADorXt/zZwGJMp oN2Q== X-Gm-Message-State: APjAAAXgOj+ROm90MBh4XzIvxnlrR/0SXgZQ25BJY5SsSLlP9IT7i7dv E8s3/SlWFgPaviKvG4S23sE= X-Google-Smtp-Source: APXvYqyQfC5N+SYc/QKs1ROvR+h4FGidcuI4PJkNEu3DIQzifIsgmDrTeW8XoyigwOcZsAgUx0vokA== X-Received: by 2002:a05:6000:367:: with SMTP id f7mr22925599wrf.174.1581961565054; Mon, 17 Feb 2020 09:46:05 -0800 (PST) Received: from localhost (userh634.uk.uudial.com. [194.69.103.7]) by smtp.gmail.com with ESMTPSA id a9sm201872wmm.15.2020.02.17.09.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:46:04 -0800 (PST) From: luca.boccassi@gmail.com To: Scott Wasson Cc: Ferruh Yigit , dpdk stable Date: Mon, 17 Feb 2020 17:45:01 +0000 Message-Id: <20200217174546.25334-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200217174546.25334-1-luca.boccassi@gmail.com> References: <20200211112216.3929-190-luca.boccassi@gmail.com> <20200217174546.25334-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix not contiguous FIFO' has been queued to stable release 19.11.1 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 stable release 19.11.1 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/19/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From a0de960f735231c702bfe6d8ff3d1f8f4dbd9c16 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 e388751e33..bcf82cc2d5 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -145,31 +145,38 @@ kni_reserve_mz(struct rte_kni *kni) char mz_name[RTE_MEMZONE_NAMESIZE]; snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_TX_Q_MZ_NAME_FMT, kni->name); - kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_tx_q == NULL, tx_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RX_Q_MZ_NAME_FMT, kni->name); - kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_rx_q == NULL, rx_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_ALLOC_Q_MZ_NAME_FMT, kni->name); - kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_alloc_q == NULL, alloc_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_FREE_Q_MZ_NAME_FMT, kni->name); - kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_free_q == NULL, free_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_REQ_Q_MZ_NAME_FMT, kni->name); - kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_req_q == NULL, req_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RESP_Q_MZ_NAME_FMT, kni->name); - kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_resp_q == NULL, resp_q_fail); snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_SYNC_ADDR_MZ_NAME_FMT, kni->name); - kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0); + kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, + RTE_MEMZONE_IOVA_CONTIG); KNI_MEM_CHECK(kni->m_sync_addr == NULL, sync_addr_fail); return 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-17 17:00:15.602617383 +0000 +++ 0009-kni-fix-not-contiguous-FIFO.patch 2020-02-17 17:00:15.275950002 +0000 @@ -1,8 +1,10 @@ -From eab71b8463c9d3aeeb8c222ff6159b4125d23019 Mon Sep 17 00:00:00 2001 +From a0de960f735231c702bfe6d8ff3d1f8f4dbd9c16 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 @@ -13,7 +15,6 @@ Bugzilla ID: 389 Fixes: 23fa86e529e4 ("memzone: enable IOVA-contiguous reserving") -Cc: stable@dpdk.org Signed-off-by: Scott Wasson Acked-by: Ferruh Yigit