From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D74AA051C for ; Tue, 11 Feb 2020 12:41:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 436AF1BFF3; Tue, 11 Feb 2020 12:41:13 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 03F9A1C00E for ; Tue, 11 Feb 2020 12:41:12 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id p17so3145490wma.1 for ; Tue, 11 Feb 2020 03:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VKdemIc6U0/LZ2MNkULFLbf+Z8EG4LSkTEgWskdnVXc=; b=pSiHOhz31tj5oRz4T77hXUciP2Kenn6uEE1xQQfhWpmjfr8M93PbjPnvtfcJ1eQqYV l/lWFlMioLi0mvn2KvGZwyydLipHn2kqbw/PhmwVIHWpQSSbyKa6FoDh9gO3ZVJM0d8c W8YTFrRqmuTQGPk3k2x4HUkISBsF67PBIR84nJsoiLfB2HXQ0VCBdTDIUtOuGQOv0aa1 O41bkmv0n9jqG6R3SOkjVe+NaBe4tNBUjPuDsfmo4SSQNNQ4FmpujlRW6LCVUgS3pdWH 1wgcHuXORVCs5Rs988iQ59lDXlP4KaxYCXm3VBGVKSdxM3qOuRZgpmvgiAbrWNz7jJGy 2Z1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VKdemIc6U0/LZ2MNkULFLbf+Z8EG4LSkTEgWskdnVXc=; b=d0xuzR7bfSAQw2MaM3E4xPdBfefE4sZo80ecYVQ1rQ1Qc+qCDm1MYQIRu1fFhQGNNy aMAe7bmgEPy+j3y33JmW8+hBwNaVeH5UDqaqBMb1HUXkK6ieiA50TkIPHks0AlU2Xo5z YGKqW/Ra4tSbqLQFE50LjYe7VYJJFiZ4RkXUsYEKqRM5OljgvlTU8Ds40TNqtNGf/wAr TaEcvmdgyuEHdMrTJ0nzojZ2BeSxqtGLWqlcqw0EG6bI/1JAvXyUoomVfBNkW9cp2G7r 1n+utDO+SkWcphVqbiFCUx7ZxV6lZ09NgBQwmRDzFLP2aqk8xjhB+yyBeV57No4QvbNK qNPg== X-Gm-Message-State: APjAAAWIxg/pTmklNQ00GvMpNGnVYcc6nTps2syC/hINhdP8H5/fi848 7vM2SGavtwuwvB5Wcu4dGKI= X-Google-Smtp-Source: APXvYqw48ys529GfFq8HJL5lPY3URdNigmZfxS2YGfMSDfwalM3lW5CE9BM9urmwTsmIKedvPQioqw== X-Received: by 2002:a7b:ce84:: with SMTP id q4mr5004300wmj.57.1581421271664; Tue, 11 Feb 2020 03:41:11 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g79sm3272358wme.17.2020.02.11.03.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:41:11 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Santoshkumar Karanappa Rastapur , Ajit Khaparde , Somnath Kotur , dpdk stable Date: Tue, 11 Feb 2020 11:21:49 +0000 Message-Id: <20200211112216.3929-163-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: remove redundant macro' has been queued to stable release 19.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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From ecfe7d061464cacff50951437dc09704ccfb52ea Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 28 Jan 2020 12:59:19 +0530 Subject: [PATCH] net/bnxt: remove redundant macro [ upstream commit 925e3cbda68bf05274bbb428d871ce5ac1fb4957 ] Use "dev->data->dev_started" state, instead of local BNXT_FLAG_INIT_DONE to check whether device has been initialised or not. Fixes: ed2ced6fe927 ("net/bnxt: check initialization before accessing stats") Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Ajit Khaparde Signed-off-by: Somnath Kotur Signed-off-by: Kalesh AP --- drivers/net/bnxt/bnxt.h | 1 - drivers/net/bnxt/bnxt_ethdev.c | 2 -- drivers/net/bnxt/bnxt_stats.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 46600e163a..265c63a3e7 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -523,7 +523,6 @@ struct bnxt { #define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21) #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22) #define BNXT_FLAG_NEW_RM BIT(23) -#define BNXT_FLAG_INIT_DONE BIT(24) #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25) #define BNXT_FLAG_ADV_FLOW_MGMT BIT(26) #define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 543ab2c7d4..c5fc43b918 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -872,7 +872,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev); eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev); - bp->flags |= BNXT_FLAG_INIT_DONE; eth_dev->data->dev_started = 1; bp->dev_stopped = 0; pthread_mutex_lock(&bp->def_cp_lock); @@ -932,7 +931,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) bnxt_cancel_fw_health_check(bp); - bp->flags &= ~BNXT_FLAG_INIT_DONE; bnxt_dev_set_link_down_op(eth_dev); /* Wait for link to be reset and the async notification to process. diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index 743f2ce94e..be5b514f49 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -389,7 +389,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, if (rc) return rc; - if (!(bp->flags & BNXT_FLAG_INIT_DONE)) + if (!eth_dev->data->dev_started) return -EIO; num_q_stats = RTE_MIN(bp->rx_cp_nr_rings, @@ -434,7 +434,7 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) if (ret) return ret; - if (!(bp->flags & BNXT_FLAG_INIT_DONE)) { + if (!eth_dev->data->dev_started) { PMD_DRV_LOG(ERR, "Device Initialization not complete!\n"); return -EINVAL; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:44.281099237 +0000 +++ 0163-net-bnxt-remove-redundant-macro.patch 2020-02-11 11:17:38.776008378 +0000 @@ -1,13 +1,14 @@ -From 925e3cbda68bf05274bbb428d871ce5ac1fb4957 Mon Sep 17 00:00:00 2001 +From ecfe7d061464cacff50951437dc09704ccfb52ea Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 28 Jan 2020 12:59:19 +0530 Subject: [PATCH] net/bnxt: remove redundant macro +[ upstream commit 925e3cbda68bf05274bbb428d871ce5ac1fb4957 ] + Use "dev->data->dev_started" state, instead of local BNXT_FLAG_INIT_DONE to check whether device has been initialised or not. Fixes: ed2ced6fe927 ("net/bnxt: check initialization before accessing stats") -Cc: stable@dpdk.org Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Ajit Khaparde @@ -20,30 +21,30 @@ 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h -index bca9ad418b..95f1f1a20e 100644 +index 46600e163a..265c63a3e7 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h -@@ -520,7 +520,6 @@ struct bnxt { - #define BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED BIT(18) - #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(19) - #define BNXT_FLAG_NEW_RM BIT(20) --#define BNXT_FLAG_INIT_DONE BIT(21) - #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(22) - #define BNXT_FLAG_ADV_FLOW_MGMT BIT(23) - #define BNXT_FLAG_RX_VECTOR_PKT_MODE BIT(24) +@@ -523,7 +523,6 @@ struct bnxt { + #define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21) + #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22) + #define BNXT_FLAG_NEW_RM BIT(23) +-#define BNXT_FLAG_INIT_DONE BIT(24) + #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25) + #define BNXT_FLAG_ADV_FLOW_MGMT BIT(26) + #define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c -index 267a36148c..b04685cea6 100644 +index 543ab2c7d4..c5fc43b918 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c -@@ -887,7 +887,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) +@@ -872,7 +872,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev); eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev); - bp->flags |= BNXT_FLAG_INIT_DONE; eth_dev->data->dev_started = 1; + bp->dev_stopped = 0; pthread_mutex_lock(&bp->def_cp_lock); - bnxt_schedule_fw_health_check(bp); -@@ -947,7 +946,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) +@@ -932,7 +931,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) bnxt_cancel_fw_health_check(bp); @@ -52,7 +53,7 @@ /* Wait for link to be reset and the async notification to process. diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c -index 32f112b5ba..466862995b 100644 +index 743f2ce94e..be5b514f49 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -389,7 +389,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,