From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 55CB8727A for ; Thu, 1 Feb 2018 10:48:54 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0DB3D2082E; Thu, 1 Feb 2018 04:48:54 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 01 Feb 2018 04:48:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6XzGkkTVEuidm84oz mUs3k1569lUpVAI4kIDp6IEwfc=; b=iawVNmwj0ZGbtMUXPkVIcS0UQdO5E8dRz Ol1znlXg7WlZ7bqAgl51SeUMQ+vke3rWFFD45AE1GsW5Wao2RYUPdPM5vw9lxCBG yU6gMqZFO869zH6+DBLvqunJpf+O1gfCyVVit+38BW7vH+/OyF0z/1dsrun6RxTU ZnMCyEyDu66QkdZciejJdFpjUinwZWc3nIlyqMTHFOxbjMnc42UNdbxPmEqaMiYG IyVmu/9qYnoHEeWWbcrPGiJnBlou+ckkLUUMSysiQ1D8va7Xzxj6Ydac664ffIrk dyqeq1FKmIKPW0z4IAmV5z9J+PfSRj7xcFinxMcs7HTuFRStBPczg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=6XzGkkTVEuidm84ozmUs3k1569lUpVAI4kIDp6IEwfc=; b=DQcLOR4d q2sahhLI1u+X3i+Vu3OYoBfCQA/JDQVx2doagWsRVdk8fqn4xvFDjvKSOaMRwBSQ UfuHtatKI+8XviTlK5pwdQAoIuIkeSBdXqW2Yw/GV7ZgJuz9XUGyDcwbUYDjMV4h 1F2CLSEyvS2w1bVG01M+9SZDm9oJsY3gdda3olf7X5nmd05dQm/TqZ+V5ma+7j1g Zx4vlW4VpbGMAhFPlc0daw+gbBHuKxaWc4KZsBFd1P5Z2XcdlwadGrW/xUZ69R3F KRJY/nHXZkZvvY7daeO3QOuvFqiFdyS1kC2oeAifc9Es/cdsE3sOkLn0hBoWUQHG +WtKeCQD+P39dg== X-ME-Sender: Received: from yliu-mob.mtl.com (unknown [115.150.27.200]) by mail.messagingengine.com (Postfix) with ESMTPA id D3809240B6; Thu, 1 Feb 2018 04:48:51 -0500 (EST) From: Yuanhan Liu To: Shahaf Shuler Cc: Xueming Li , Nelio Laranjeiro , dpdk stable Date: Thu, 1 Feb 2018 17:47:33 +0800 Message-Id: <1517478479-12417-19-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> References: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/mlx5: fix memory region cache lookup' has been queued to LTS release 17.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: , X-List-Received-Date: Thu, 01 Feb 2018 09:48:54 -0000 Hi, FYI, your patch has been queued to LTS release 17.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/03/18. So please shout if anyone has objections. Thanks. --yliu --- >>From d4192ea73b94736c8095e6b7b7a7a1bf4fc58eaf Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Thu, 25 Jan 2018 18:17:58 +0200 Subject: [PATCH] net/mlx5: fix memory region cache lookup [ upstream commit 95086c654322861a10f9835233a333d7c2188df3 ] The Memory Region (MR) cache contains pointers to mlx5_mr. The MR cache indexes are filled when a new MR is created. As it is possible for MR to be created on the flight, an extra validation must be added to avoid segmentation fault. Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search") Signed-off-by: Xueming Li Signed-off-by: Shahaf Shuler Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_rxtx.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 05aec29..ab71a68 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -550,7 +550,8 @@ mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb) if (likely(txq->mp2mr[i]->start <= addr && txq->mp2mr[i]->end >= addr)) return txq->mp2mr[i]->lkey; for (i = 0; (i != RTE_DIM(txq->mp2mr)); ++i) { - if (unlikely(txq->mp2mr[i]->mr == NULL)) { + if (unlikely(txq->mp2mr[i] == NULL || + txq->mp2mr[i]->mr == NULL)) { /* Unknown MP, add a new MR for it. */ break; } -- 2.7.4