From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id A2CA68E8B for ; Mon, 23 Nov 2015 15:45:28 +0100 (CET) Received: by wmvv187 with SMTP id v187so164309321wmv.1 for ; Mon, 23 Nov 2015 06:45:28 -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=BRe6E01/RhNHRAlSur2kn3Cqo5r2Hrvk+Jcp65KD9qo=; b=f05KWr2dhq8FyqWvvQzNPwJ/tJ3zJJqhenurfjYNVd+oO7YoZw/yMSM1tPWSe2YqDw wB2q8ZNRC0xdc/b9Y4X8RXd/kTRofJNMRluLLIccGn5kMwsQFZb76pW+UqN5TmzfBIAG jufZWgrzN5Bltl/0fFgDXlIZ53kGjru4yYZUmuJM2dWnYI+MnPQ1XP37LO6vkP6XWKSM 7SCqZmZMHp/x+QHRY8OkiH9sRQFY+4HOzFmfZstFwf3NV/B59Aub8RmnYShsgN6gO2Fd RKZTEAcUskaD9oPJxaAA2VLaUfK0XfapUnpRtklwhE2wFZXlimATZpmorI1Dmy7pGwi7 dtcw== 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=BRe6E01/RhNHRAlSur2kn3Cqo5r2Hrvk+Jcp65KD9qo=; b=BC8IGUcvn6+B5BR3ElElBiLak9RUZJgbHFSN+CYivzuVIPHfNHbJ7MYXVd900bPcYf i3CGBfu9YdVfa7H7CPTaEpMEXXA/4WQbpxUQLWxKS92Mv2f8YjPP24sWeTNWBL4upSrF CzNOA8YxMghQhTMjKAOJX+IKBiYHzY6Fqnxk9F3uKvYo07qf1GLxW4P9rIPJzTorX7F1 nt4SHUF1wbLjl+JrZTbUBI7lBG4Rxwfk3ZwlcfLHURELQ4/QMDrk0yR8d/YGTMavrcSI YOzxNDKM7m7GkqFstN+T8qc6+WHCdEr2Qx8MLVfS12krv2McToC0T4YPE7PEXWzIbV5L O6pQ== X-Gm-Message-State: ALoCoQlnrq7txgjuRBK5LKSgUfUip0/aTDiHjI9Ok38bZu5rbJI/lvCdaBuEISFKQVw1wI3A3fWl X-Received: by 10.28.32.65 with SMTP id g62mr16201135wmg.81.1448289928491; Mon, 23 Nov 2015 06:45:28 -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 z66sm13706722wmz.7.2015.11.23.06.45.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 06:45:27 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Mon, 23 Nov 2015 15:44:40 +0100 Message-Id: <1448289889-9590-6-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 05/14] mlx4: 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:28 -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: 7fae69eeff13 ("mlx4: new poll mode driver") Signed-off-by: Olga Shern Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 4bd0ecd..3e05373 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1049,7 +1049,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