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 0EE59A051C; Mon, 10 Feb 2020 20:47:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E98BAAD5; Mon, 10 Feb 2020 20:47:17 +0100 (CET) Received: from public-exrelay-va-1-2.serverdata.net (public-exrelay-va-1-2.serverdata.net [64.78.26.133]) by dpdk.org (Postfix) with ESMTP id C28C0100C; Mon, 10 Feb 2020 20:47:15 +0100 (CET) Received: from build25 (50-203-66-100-static.hfc.comcastbusiness.net [50.203.66.100]) by exrelay-va-1-2 (Postfix) with SMTP id B6FAC1AB; Mon, 10 Feb 2020 11:47:13 -0800 (PST) Received: by build25 (sSMTP sendmail emulation); Mon, 10 Feb 2020 14:47:13 -0500 From: "Scott Wasson" To: ferruh.yigit@intel.com Cc: dev@dpdk.org, stable@dpdk.org, scott_wasson , iryzhov@nfware.com Date: Mon, 10 Feb 2020 14:47:00 -0500 Message-Id: <1581364020-4315-1-git-send-email-scott_wasson@affirmednetworks.com> X-Mailer: git-send-email 1.7.6.3 Subject: [dpdk-dev] [PATCH] kni: fix bug 389 - Crash in librte_kni driver due to noncontiguous pages 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" Fixes: edd2fafbc0b8 ("kni: allocate memory dynamically for each device") Cc: iryzhov@nfware.com Cc: stable@dpdk.org Signed-off-by: Scott Wasson --- lib/librte_kni/rte_kni.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index e388751..df4a021 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -145,31 +145,31 @@ enum kni_ops_status { 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; -- 1.7.6.3