From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id CFE9491C0 for ; Mon, 23 Nov 2015 15:45:39 +0100 (CET) Received: by wmww144 with SMTP id w144so99337028wmw.1 for ; Mon, 23 Nov 2015 06:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=l4fj7wzEZcVC37I+ouCL0IwhenFdp9Xydw7JOVzzHAU=; b=vOk4xy47/G9r2WWXgPOnUfQTAj+kgDkG01FUVEVmKhih3KkBAUZh/NNdIyPqMiF7FX S9/jSaD+t6DA0WAyZkdbbfDdn1XLRW8LQ7BNvxVyFgyemIjE/yVXQM8ijaE8+358U/NN NLqmkDhlt1t/rB6yh4p1vdeEQXqS+0DBUru3EDb+4pBXhUKXd7qUAms6x+o3It5GPK3G 9OpndbZtilwrJCQYGtEv7I6FjPvGmBAPeiOS+8Lgrh5m3d9VG8+NfEfmRPsgZBUYk83b cTROZCh93KOIukf45wHLkK4u09igpA7H8MRCOjvpt5D8HrMv3U7Zs0dHnGx7fv6Y59AJ 3VZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=l4fj7wzEZcVC37I+ouCL0IwhenFdp9Xydw7JOVzzHAU=; b=R2gV7dUcpeXr4jWWpwAzSKaeY5EZyk50ShYcSroc9n840gnAzmXEgAUFXzwZJ3pR6l SNoIIRHKulkGCYs6vXmP+/ASXfodHwncozHW66xsC7/loA7qNC90G6J88cEoZW+p6BUJ 40u1yq1HXxVmnqUCvQgNyZq/aH4LDeoIUm6WnDh+wsb0EMNndRcARQ8PrCIx5yvWBCUg FDrpzRk+KRmEdZrdgQMZDA5qscRTuyw/EG9fVMvsLtrmtbxNopmzkdgY66KRwjmMlFbA 5XazY8yXGD6MZZ/kSRmdD9ZlWZu4/DtVubX4BlOGq9MkSGSpOEn5LkEjd+FvzorYnErZ T6Rw== X-Gm-Message-State: ALoCoQmAUy60T6cztONumjceU6h/kSfi/OQi6xqIja6h53EntUwwiPJt2Mp6Ov+y7pIRZiu43Oza X-Received: by 10.194.116.100 with SMTP id jv4mr29678834wjb.67.1448289939055; Mon, 23 Nov 2015 06:45:39 -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 w203sm13491178wmg.15.2015.11.23.06.45.38 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 06:45:38 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Mon, 23 Nov 2015 15:44:43 +0100 Message-Id: <1448289889-9590-9-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 08/14] mlx5: fix possible crash when clearing device statistics 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:40 -0000 A typo causes TX stats indices to be retrieved from RX queues. Fixes: 87011737b715 ("mlx5: add software counters") Reported-by: Nicolas Harnois Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index a51e945..6d1a600 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -133,7 +133,7 @@ mlx5_stats_reset(struct rte_eth_dev *dev) for (i = 0; (i != priv->txqs_n); ++i) { if ((*priv->txqs)[i] == NULL) continue; - idx = (*priv->rxqs)[i]->stats.idx; + idx = (*priv->txqs)[i]->stats.idx; (*priv->txqs)[i]->stats = (struct mlx5_txq_stats){ .idx = idx }; } -- 2.1.0