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 D168CA0A0E for ; Mon, 10 May 2021 18:04:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C41D34003E; Mon, 10 May 2021 18:04:34 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2066.outbound.protection.outlook.com [40.107.236.66]) by mails.dpdk.org (Postfix) with ESMTP id CD029410FF for ; Mon, 10 May 2021 18:04:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Utx699GavuUmG/vAeOrRxSb+MaaIHRqWTD0KZLkOlz/Equpww20MWX/5kApabZ7oQSDK7fkhiVxFcB4Otpa4ZE3INMA8Jvwg4Dwz5m7L7zNw6+bhR1nPqpJf9P7uQ0ZJI5LVM5drFCcchqwG9ryhLeuXVRMEyiXSkwQTAuXLvwDnEcJUTBT49uRzYt0eJ1z4Q3VbLwc2tovkhByrNSrlMBxxbNcvefRkT+lk7lqDCVWZ5U/IaULl66jRQg7qJJjrtICZMomMOlB8FPyxdT2/Fe5FoHSNFK5Z/1qYW/Kv+CHaob5/sG3hTDe1W7UkiJqIYLEpCXtsfO9TS+GzgDNOeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4jOl/7vtw1rNlZ+smvBFMPpjS1UDH5ls+3a9hk4X6LA=; b=D3Z18apSDosWM+MTyR859/hYuUbzxxTr+8Rnghl7oORv99xgWHNcfgsDI6OIkCyhOStOOjNrCz7EWCSd00xJtHQuOSb/A1xwjxWGs/zkBYsiIV1gTBJ+Vifez0zbbFemAoZ8SXOnldHcsngo7OsisN16kx/mqCh/4dxfna++1ElLT1totOV86jMfz6HHA7gtnHLB5udGmM1hsiP4v2U4Nq6kpTZE6zpYqxHaTmYCVDoWaaCHxWtZvjPw3ZM9kb99cVqLP7wJEAc5Qhg075MIq22MP8qUmfBy2ye9CIjktIjrN38swO5RTzevB/sjdskXIUyu1DAoWOteHlT4EYCjtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=nxp.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4jOl/7vtw1rNlZ+smvBFMPpjS1UDH5ls+3a9hk4X6LA=; b=l0U96ecJ3JnuFjjuqKpMk8tD7Mue5hl1kkkbx7nYzijrby8XbV11LiRqBw0FLbTEvYYF/OueadpY6aT4AkM1M+EfaDBfHB0nxHUqGlzmYb1AFvz8/F345gil/MuwSfMXZe+koBUmpBvPIJDQvhtYnBGftbkmFMQOpDBMhCZlgyTOLMZIQDaQtpSY0oYTALRjIaVMg21vSksu9Y4Z+QEZVpc3MEBEI773/brbculE8jRDjLhTwS/d9sCSCwZhXaLBVmjym08+wAPYgeuAhLG592doI/1JHzUAOj9nSeBicwROmEXr5DyusKeHh5OVlmSmlYCsmULDL8oFrWQWvgyE9Q== Received: from BN8PR07CA0025.namprd07.prod.outlook.com (2603:10b6:408:ac::38) by BN8PR12MB3460.namprd12.prod.outlook.com (2603:10b6:408:48::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24; Mon, 10 May 2021 16:04:31 +0000 Received: from BN8NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::6) by BN8PR07CA0025.outlook.office365.com (2603:10b6:408:ac::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:04:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT064.mail.protection.outlook.com (10.13.176.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:04:31 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:04:28 +0000 From: Xueming Li To: Nipun Gupta CC: Luca Boccassi , Hemant Agrawal , dpdk stable Date: Mon, 10 May 2021 23:59:21 +0800 Message-ID: <20210510160258.30982-12-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8eeb95a4-216b-4444-12e0-08d913cd4c0e X-MS-TrafficTypeDiagnostic: BN8PR12MB3460: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qbiKuRL9HCHStF9N1KNe5rpw6ftlRFcAHdsx/VOV5GQEeB7CZ/OsWm8F/+VH0PpYH+MlTwPoUTYLIH3f7QnqttBNFMJkdehnGASR4KC78T3K74aW2X4pV603WG+MjuWVwBYOw1NAPMGrz9qR3PVI+tqvJ0OH8AZkq56/g9i1qSeAc+1aPti46XpJEL73WXd1wnFpGbAt7OUmcUQCVSeR8KBoWiLDEXS/yDppoixgIP1UNT3q09uXzzC0WrY7m4ejur8qT3pPhFRDRf529j3DDCj3VU0ZgN3AW28Ga/bafUlBgrDn+qjuFK9pFZZAWviBX2jhBL3v5dgguoftmTLkKRUgQh4bV2N6FiAoLFFkEaG8jBOksT1zEKL/Lfv9kkV4XNxe9qDAu5fZFIxRH49K6O3eLnw8CfIUdYAx3xJL27fBPWobFTbeI4yeak0+nnenC+nEsmD6OElvYOUQ4NG77DAadprYGF2UTVV5LjcdK+dxX+BK37edCjlKdOoB8q+EypLXl9HXpugec8dAREI7dFt/RzGU5ruGZ2OFhl6kx3RPN85vvSQ1sIarQu/K9+8hsOYrjE7eJjKVXy4ii8W5QZ+HmY8/5UisPoI3vSLC1cSVC083n+U8WtJvfuxCi7D6thwbPOp33+sNDZop3V3L3xgfMECGug7Cpb2YAwCiI/sMi9INSb8LmgwBFojNVk58kFw6EIb0lfzezawPZ0zOefrFOwZ2u45CM3DigudHTbA= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(39860400002)(376002)(46966006)(36840700001)(7696005)(55016002)(36906005)(83380400001)(2906002)(7636003)(478600001)(8676002)(26005)(316002)(6666004)(36860700001)(16526019)(6916009)(36756003)(966005)(86362001)(356005)(186003)(54906003)(426003)(53546011)(2616005)(336012)(70586007)(82740400003)(8936002)(4326008)(5660300002)(82310400003)(47076005)(1076003)(70206006)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:04:31.3111 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8eeb95a4-216b-4444-12e0-08d913cd4c0e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3460 Subject: [dpdk-stable] patch 'bus/dpaa: fix statistics reading' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. 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. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/e518710835e10174e0dfe74ebcce73507046a0c6 Thanks. Xueming Li --- >From e518710835e10174e0dfe74ebcce73507046a0c6 Mon Sep 17 00:00:00 2001 From: Nipun Gupta Date: Wed, 24 Feb 2021 18:12:50 +0530 Subject: [PATCH] bus/dpaa: fix statistics reading Cc: Luca Boccassi [ upstream commit e62a3f4183f14a91f0dd63e9ea39e749406b5653 ] Reading of word un-aligned values after reading word aligned values lead to corruption of memory. This patch make changes such that word aligned access is made, before making an un-aligned access Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations") Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman_hw.c | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c index 4ab49f7853..af9bac76c2 100644 --- a/drivers/bus/dpaa/base/fman/fman_hw.c +++ b/drivers/bus/dpaa/base/fman/fman_hw.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright 2017 NXP + * Copyright 2017,2020 NXP * */ @@ -219,20 +219,20 @@ fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats) struct memac_regs *regs = m->ccsr_map; /* read recved packet count */ - stats->ipackets = ((u64)in_be32(®s->rfrm_u)) << 32 | - in_be32(®s->rfrm_l); - stats->ibytes = ((u64)in_be32(®s->roct_u)) << 32 | - in_be32(®s->roct_l); - stats->ierrors = ((u64)in_be32(®s->rerr_u)) << 32 | - in_be32(®s->rerr_l); + stats->ipackets = (u64)in_be32(®s->rfrm_l) | + ((u64)in_be32(®s->rfrm_u)) << 32; + stats->ibytes = (u64)in_be32(®s->roct_l) | + ((u64)in_be32(®s->roct_u)) << 32; + stats->ierrors = (u64)in_be32(®s->rerr_l) | + ((u64)in_be32(®s->rerr_u)) << 32; /* read xmited packet count */ - stats->opackets = ((u64)in_be32(®s->tfrm_u)) << 32 | - in_be32(®s->tfrm_l); - stats->obytes = ((u64)in_be32(®s->toct_u)) << 32 | - in_be32(®s->toct_l); - stats->oerrors = ((u64)in_be32(®s->terr_u)) << 32 | - in_be32(®s->terr_l); + stats->opackets = (u64)in_be32(®s->tfrm_l) | + ((u64)in_be32(®s->tfrm_u)) << 32; + stats->obytes = (u64)in_be32(®s->toct_l) | + ((u64)in_be32(®s->toct_u)) << 32; + stats->oerrors = (u64)in_be32(®s->terr_l) | + ((u64)in_be32(®s->terr_u)) << 32; } void @@ -244,10 +244,9 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n) uint64_t base_offset = offsetof(struct memac_regs, reoct_l); for (i = 0; i < n; i++) - value[i] = ((u64)in_be32((char *)regs - + base_offset + 8 * i + 4)) << 32 | - ((u64)in_be32((char *)regs - + base_offset + 8 * i)); + value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) | + (u64)in_be32((char *)regs + base_offset + + 8 * i + 4)) << 32); } void -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.037765100 +0800 +++ 0013-bus-dpaa-fix-statistics-reading.patch 2021-05-10 23:59:26.330000000 +0800 @@ -1 +1 @@ -From e62a3f4183f14a91f0dd63e9ea39e749406b5653 Mon Sep 17 00:00:00 2001 +From e518710835e10174e0dfe74ebcce73507046a0c6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit e62a3f4183f14a91f0dd63e9ea39e749406b5653 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org