From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 74C8D1B1BC for ; Wed, 24 Jan 2018 16:40:37 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 27D5522707; Wed, 24 Jan 2018 10:40:37 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:40:37 -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=fm1; bh=di0RdxV26+Hl6eKII juEnFhMcD4fy5e/iWQdUb/+uXI=; b=R8rO2Rpul0M3ifoQGgL09fIQxQnYCxotB mpTo/uN+f/2KyNholucQdt5KSQQCHSjVvVs28e2q5ug+T8aSP/zYeqTLs+Is319B txekcBeJb6MtLlJTXaj+3/W7DuOhsrOE4kjVxlDKzvrhUyQyUrI67fXn5A6vdjZZ w0jcBgIlUibDCfWRNNSLMjSiiFaSTI9C7OM81jAYQDvglhEAvJUxNypjIZajxqHO ZqmpPnI77X6NQvLsMrdZCksr9IJlGj7puGRbLEQWAZ7TWYO2gdcunh2SKQ44nxmc KY7eULHeLQHaneql6yhTjhjHNCb89xRg0GBiNZpKZamh/lS7nbEQg== 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=di0RdxV26+Hl6eKIIjuEnFhMcD4fy5e/iWQdUb/+uXI=; b=dDsfaiEH ADFiXztpBJXSF/quaOrN8AvfA1n1VD8M29WELrZfFICHWSiFsVG3ApgiCHnGEe78 WJ+DftmzCwVvtyNjNGP1ARYCthirTL5cgLwjnhtnJkHVCy4BdvcU1L63nD3NC7sP OOPussn0fTZr64KinkdQfWgQwYOv06hAvet4Uu6YNvnBG1JWpJPWvQdhyfeE3yHx nr8SEmqoAkq0Qs07G/2IGmvMph3R7cHdnbTu5QtcxwkQC07wGUxIvqguiVJ1r8Ga sFiJIdoEFokXrwtxGOliWbJLYtvgMv7cfBj8xqTzXc13XZpDTBzFfqctT8Ag6Hmo mShaE7BbuwPlAQ== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 9FA8C7E1BE; Wed, 24 Jan 2018 10:40:34 -0500 (EST) From: Yuanhan Liu To: David Harton Cc: Harry van Haaren , Wei Zhao , dpdk stable Date: Wed, 24 Jan 2018 23:32:54 +0800 Message-Id: <1516808026-25523-106-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' 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: Wed, 24 Jan 2018 15:40:37 -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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 64e3e5117e4e4465e0fca7bba214a660fd66e8d7 Mon Sep 17 00:00:00 2001 From: David Harton Date: Thu, 11 Jan 2018 10:13:58 -0500 Subject: [PATCH] net/i40e: fix VF reset stats crash [ upstream commit cde1f0252811e81a3c485ca1932cc655736f1e49 ] Calling i40evf_dev_xstats_reset can sometimes crash. Fixed issue by checking return code before using pstats. Fixes: 8210e9e0d805 ("net/i40e: fix clear xstats bug in VF") Signed-off-by: David Harton Acked-by: Harry van Haaren Acked-by: Wei Zhao --- drivers/net/i40e/i40e_ethdev_vf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 922306f..6160e2f 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -945,14 +945,16 @@ i40evf_update_stats(struct i40e_vsi *vsi, static void i40evf_dev_xstats_reset(struct rte_eth_dev *dev) { + int ret; struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct i40e_eth_stats *pstats = NULL; /* read stat values to clear hardware registers */ - i40evf_query_stats(dev, &pstats); + ret = i40evf_query_stats(dev, &pstats); /* set stats offset base on current values */ - vf->vsi.eth_stats_offset = *pstats; + if (ret == 0) + vf->vsi.eth_stats_offset = *pstats; } static int i40evf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, -- 2.7.4