From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72D0BA0032; Tue, 28 Sep 2021 13:30:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3EB44111A; Tue, 28 Sep 2021 13:29:44 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id A3CF54111A; Tue, 28 Sep 2021 13:29:43 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 5E1C27F6D5; Tue, 28 Sep 2021 14:29:43 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 96C807F6D7; Tue, 28 Sep 2021 14:29:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 96C807F6D7 Authentication-Results: shelob.oktetlabs.ru/96C807F6D7; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Ivan Ilchenko , stable@dpdk.org Date: Tue, 28 Sep 2021 14:29:06 +0300 Message-Id: <20210928112912.785412-6-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru> References: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ivan Ilchenko Description is a global variable shared by all adapters and must not be modified. Fixes: fdd7719eb3c ("net/sfc: add xstats for Rx/Tx doorbells") Cc: stable@dpdk.org Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_sw_stats.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c index c297bb8294..de99e1cfaf 100644 --- a/drivers/net/sfc/sfc_sw_stats.c +++ b/drivers/net/sfc/sfc_sw_stats.c @@ -49,7 +49,7 @@ sfc_get_sw_stat_val_tx_dbells(struct sfc_adapter *sa, uint16_t qid) return 0; } -struct sfc_sw_stat_descr sfc_sw_stats_descr[] = { +const struct sfc_sw_stat_descr sfc_sw_stats_descr[] = { { .name = "dbells", .type = SFC_SW_STATS_RX, @@ -452,7 +452,8 @@ sfc_sw_xstats_get_names_by_id(struct sfc_adapter *sa, } static void -sfc_sw_xstat_reset(struct sfc_adapter *sa, struct sfc_sw_stat_descr *sw_stat, +sfc_sw_xstat_reset(struct sfc_adapter *sa, + const struct sfc_sw_stat_descr *sw_stat, uint64_t *reset_vals) { unsigned int nb_queues; @@ -483,7 +484,7 @@ void sfc_sw_xstats_reset(struct sfc_adapter *sa) { uint64_t *reset_vals = sa->sw_stats.reset_vals; - struct sfc_sw_stat_descr *sw_stat; + const struct sfc_sw_stat_descr *sw_stat; unsigned int i; SFC_ASSERT(sfc_adapter_is_locked(sa)); -- 2.30.2