From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id DA60F8EA0 for ; Mon, 23 Nov 2015 15:45:54 +0100 (CET) Received: by wmuu63 with SMTP id u63so57137053wmu.0 for ; Mon, 23 Nov 2015 06:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fi+/76DL/KSLck0P0CIOrhxTLUNfaeynErkL0x8Llwo=; b=kA98NZhtp6Ve6QFhKnrHzYJAxPzfUclGStR27Nb26/jHYqwzXkiv/Bpykj0rV0+wvI GFlZFJsL5HhDYofc1OHaeNc3wAy8uSFfBFAuv8CS7d1BpK6ec8uwQTUXQ4pmxSKkNDXK bJ2o0XHiws+JY6cIMFFGPecB7IW9daejJsZW82Lm9CTKS3FwcwbTDl2N9R/yBLwXn2/U F1v4B1jQ8fdCWQjQghb5gxUBzt7bvUWzNT3tBKt7Vh5ov9R44FOabEB37v2tdNUmKdnE KNyMRimXX3NQbU9rpO2xk47gVXTgGax3daUPAwaYUqmVINMUwU4wKLfX7PQjTuEVcMMn BnzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fi+/76DL/KSLck0P0CIOrhxTLUNfaeynErkL0x8Llwo=; b=XUISIGiH2xc5CUPJUCDTESJor3AjH+ToqiUTAqL+DELM41yyMxyBdcrek9sKRiCWFg LlCWcBk+frsUmMLflWMsJkzY3VxZrOhfjlyI/zC9WGxYJkmunLpOgXfc5tHoc8ZLIS0P VXlvOkh5sdM3N5leShd4RHe5YExhV7pjGL3cmEcODms/+0iovWjOfgOJ4DHF6nwRERRD /M3fB0yTMmt9T6XAnDh9r1nqLxzMHdb2AXbvzpZgzj5kHhOgLjnT+RQPhdjneQmbqvUn Z8KLRZXemYZfQzvhP6ywiJqaP30Zgrjnai50MlorNIFZvMYjQ14nQfJ+gJpSaprClnI/ NX2A== X-Gm-Message-State: ALoCoQnK9JmdqqYw+31sgYdlbOG+fn7BwG2D4/jI4kpWQmysc7+ae2sFi61C2u9IwFpTRkc94tmc X-Received: by 10.194.90.50 with SMTP id bt18mr30740789wjb.118.1448289954213; Mon, 23 Nov 2015 06:45:54 -0800 (PST) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id c4sm13605987wjs.36.2015.11.23.06.45.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 06:45:53 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Mon, 23 Nov 2015 15:44:47 +0100 Message-Id: <1448289889-9590-13-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1448289889-9590-1-git-send-email-adrien.mazarguil@6wind.com> References: <1448289889-9590-1-git-send-email-adrien.mazarguil@6wind.com> Subject: [dpdk-dev] [PATCH 12/14] mlx5: fix local protection error when TX MP to MR cache is full X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 14:45:55 -0000 From: Olga Shern When MP to MR cache is full, the last (newest) MR is freed instead of the first (oldest) one, causing local protection errors during TX. Fixes: 2e22920b85d9 ("mlx5: support non-scattered Tx and Rx") Signed-off-by: Olga Shern Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index c6c167c..eb6c9f7 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -179,7 +179,7 @@ txq_mp2mr(struct txq *txq, const struct rte_mempool *mp) DEBUG("%p: MR <-> MP table full, dropping oldest entry.", (void *)txq); --i; - claim_zero(ibv_dereg_mr(txq->mp2mr[i].mr)); + claim_zero(ibv_dereg_mr(txq->mp2mr[0].mr)); memmove(&txq->mp2mr[0], &txq->mp2mr[1], (sizeof(txq->mp2mr) - sizeof(txq->mp2mr[0]))); } -- 2.1.0