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 E8FA1A034C for ; Tue, 26 Apr 2022 11:51:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D998241141; Tue, 26 Apr 2022 11:51:05 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2054.outbound.protection.outlook.com [40.107.96.54]) by mails.dpdk.org (Postfix) with ESMTP id B31F640691; Tue, 26 Apr 2022 11:51:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I790/3xuZHkpYyfY+StiIELKt9Sd1XvsW69/1QrVuvk9wTPMp7AYLnHlxlyUebvFl+49JifWstAdioRDKl1kEAtsa5lfCsmi6IZdBhJCYlQkJFX5FzZAE6yJ3phYpyh25GG/7SWq/GI3ESWgjVrERL5GSmHcN9aFk0IfJOkW9rbDuoAJNxnTr0qqz15lUeVIxkNqWwpJHSHnISrhQCR633oMaVhcvosSchudpd/p2TL+nVXcIvgyFzkmWVcAksPBZ3qYYgfIOGu4UJeL9hS/kHtTf9HBgFE5KAONC4wNHT2Sm3qZSNjYikjDWGP0xNYCKBFerU/b0wXSKqzmMtgXAg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SgyMOwHsqMoJodMaeolzbKENjD95SKgerdOmOXMw0Po=; b=PDa2BAP2MhhMFDJOy/E/9EwQvQo+YKwmZuz92vz7sOOcdNj3BBUdkIfU9ChkCoruhLVOS1suCG4s3z9fBuurbM+PHLytdY5zSxAaii2rQDL63XTRlpoeEZE+du7kLhSueJLOdfjwLbOfpd65E3MZ1C6YHRvBYaiEkytFG+ZTmKttSBFC8/hAcKPAu1V//RXYyk4Iea8xXiTOvlzJQy5gOek1uvb56R1kA718yeKZ0/ogGyhNGNQFFQ61oA7IX5pMvQY5xMcHWJJafaV/L6BjRM53Me23t5hAsWaVPSyP7rx65xyoQV/zg0C7hFqSMMhcNmQeL8Wpu76E3EMhNQJskw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=SgyMOwHsqMoJodMaeolzbKENjD95SKgerdOmOXMw0Po=; b=iFdnNM1dpCHbZWz/hJMtcDE9WBgdNqM4UG57Z9TP77tU9BQVSdKLqC/NJaHPAvRuOIQEFGrPKED0+KS94SFX88IaO/pLNDt/YhZOhtV1nRJRJy5CrADWCisJOY5w5vjjUV0caNHsSIJ4cOzzqqctXoerZr9lBq8I5KL98winysOl2p8wVnPXK3pYoOsUBdAki5HIYPPKM1En84wJLoUv72KQdYL3pJjAFFNzrnpj4Q2UF/q5HSVs4KBO/s4pz3mACGw8YNImBAfRZ5wReSsdqAkG19hxqCeCQ97Jpf82297ADtoOlx1fBh0ha+B1QQMgR6e8d454zF1VQ0m1ivgVmQ== Received: from BYAPR12MB3078.namprd12.prod.outlook.com (2603:10b6:a03:a8::31) by DM6PR12MB3929.namprd12.prod.outlook.com (2603:10b6:5:148::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Tue, 26 Apr 2022 09:51:01 +0000 Received: from BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::10e3:9c31:2a8c:2679]) by BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::10e3:9c31:2a8c:2679%4]) with mapi id 15.20.5186.015; Tue, 26 Apr 2022 09:51:01 +0000 From: Raslan Darawsheh To: Raja Zidane , "dev@dpdk.org" CC: Matan Azrad , Slava Ovsiienko , "stable@dpdk.org" Subject: RE: [PATCH] net/mlx5: fix rxq/txq stats memory access sync Thread-Topic: [PATCH] net/mlx5: fix rxq/txq stats memory access sync Thread-Index: AQHYVMviZzKtESG36kWXWZ79sUeGm60B/JhQ Date: Tue, 26 Apr 2022 09:51:01 +0000 Message-ID: References: <20220420153217.10723-1-rzidane@nvidia.com> In-Reply-To: <20220420153217.10723-1-rzidane@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e63c127f-4a0b-408c-e06e-08da276a45d9 x-ms-traffictypediagnostic: DM6PR12MB3929:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0ygb4sQZCyPEa4GZbKDU61QDE8EwtAbalspaJHAvkFRGJmRot7OrxjypW9QbdXQuuqLEmDK9WVE9gaO8NzVV1xWgigt2GZz2bdzNeG8vbVE0QhZ5iDrfbF59WVoawP8cuNrEI9ffxBKUxDfGR+bB5Yt4SrkR8Wbip906FfMiyj7rT0HpSMBjkRQ44qEdLqbNglH9ObAgaSrvTOAMOKc3z4BTpGbVGKiJQSTHCu2WhAzOqSFkfUG7HLIkbzeknhLqOzp7u217fPzllXhDVinPdzo+P/8L1Dj8+dSSkbKNGcZZAJSYHtDOwBdgNZ+pOrd/hKbOeCQ9z66B67XV34O0MFKWF4WyC2+9VA0d3aQC3BPAxKPSNOc4Bl8klD1ix3sXoNJA/tUYwiVwqYdbtdVoeP0v3DDkyfQAwJhi6UOYU12BCTvPcPaCDlJQcxGOq8uRK9fMst7FJYwX6YR9szqCyhIG2EKRoGdTicOkXCQCwDO8ih+XKIzZmcyf7FRbId2r4vzSMGCG9N9E9zwd4paoRavspKSAJzMzC4CUn9ndK0A8bnEiZvAbQA5nEp0jwatZsRvBMiKl9Gh4chgrBw+CBDVY0yThYLh9ZxWe6Ktnlg9GcVv4ZiTtofu22xPtyWke5aRbnK+Eycso7WtqHnLw4rtxmxxh5U10T9F0/VcQ5f4t7vcyPc5F4QzH/8+pOivhfYAK0uFPGJ7SlJua3Zv85A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB3078.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(33656002)(38100700002)(66946007)(122000001)(38070700005)(71200400001)(53546011)(55016003)(2906002)(76116006)(450100002)(316002)(110136005)(508600001)(8676002)(86362001)(83380400001)(26005)(6506007)(7696005)(9686003)(8936002)(52536014)(4744005)(64756008)(66556008)(4326008)(66446008)(66476007)(186003)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EXK0HfPy6sUyoouRL/RytnOiokuWiisFTAs2XHlQk+S7D6AThp71RGy+Q+az?= =?us-ascii?Q?PjGV7JJiBXrBmIFRyMk9DQA2mAUi4olIPa2hpZPk4WoyigUJ7Fhf38rLsvVU?= =?us-ascii?Q?fbplmJf+0/2R8pdyWCpr7iegj0dKw77IF5T5vDibB5CNBgSHMaRsba1yvEhZ?= =?us-ascii?Q?Pt73asN0TSrqIA52zS8HSFH5QhfDCH07C84Kbe2O2Wok/MZWoUvnLfDmmS+p?= =?us-ascii?Q?aZ8jguxDUK3fKDSxpMMKVLsXtlTTuRzuY26D45RxjqXydC2xNsvPw1jxaTY0?= =?us-ascii?Q?qYnJNzcquRDov1hB09ncskZ5mIgU0PM1jVuBINWLEu0woGUdW6+My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zz8ZV+GYy55VfS1BzmkTYiAfEyvESm/0YWzHhSYLi?= =?us-ascii?Q?qsfT0x5LkpO1UXo5LDSqrX2yyeO8UpQ4QGrSfskMu+vxhyJ4ZCeI07VmLQyO?= =?us-ascii?Q?xp208diTvlsMhOqwUljjCqb27vyUFUnZgcLFwkLL5pM0zIIf3Yt+I+mT0CSl?= =?us-ascii?Q?vfNIUPe5xEaUOYkoke0avVCx24X8WiXklyM+pwYPhOHf7bYW0F5uCXndYb69?= =?us-ascii?Q?biBAxesDFEnb1aQ6SLb/jZkr8jLroTYXhTYDUegrryubJwLVeTn5854DaZgn?= =?us-ascii?Q?wapAJJBIEN/DQZY6CPE/m5DmP6MtilxGGzb82+L0ynkdnWRdXA0L43pIT0K1?= =?us-ascii?Q?ONDbFiggXRixJUxNY8St8mjPrK5Vc0aR1c7o3Yr5Bzc5BSP78ay1JMYVKB35?= =?us-ascii?Q?b7o4teIom8bi+3yORtOjnJbWUigprbR9FKbELl9dbGnmy9OICzLRHRWbOPlT?= =?us-ascii?Q?8gWRuY6ZPu0/MNpDl3JB45CydhtdtplO/u1RjlRNCR9E1pI3zODkD7LJe0or?= =?us-ascii?Q?n2U+ZhGkTA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3078.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e63c127f-4a0b-408c-e06e-08da276a45d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2022 09:51:01.8113 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3FiFwfIhZdzTXZVLABvEBUzyNjhZFgCod3DFlLk1kXBeTIVxyrxxUR/4bjUQO1cOIvE6HbAwefomiFKRwjQRPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3929 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 Hi, > -----Original Message----- > From: Raja Zidane > Sent: Wednesday, April 20, 2022 6:32 PM > To: dev@dpdk.org > Cc: Matan Azrad ; Slava Ovsiienko > ; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix rxq/txq stats memory access sync >=20 > Queue statistics are being continuously updated in Rx/Tx burst > routines while handling traffic. In addition to that, statistics > can be reset (written with zeroes) on statistics reset in other > threads, causing a race condition, which in turn could result in > wrong stats. >=20 > The patch provides an approach with reference values, allowing > the actual counters to be writable within Rx/Tx burst threads > only, and updating reference values on stats reset. >=20 > Fixes: 87011737b715 ("mlx5: add software counters") > Cc: stable@dpdk.org >=20 > Signed-off-by: Raja Zidane > Acked-by: Slava Ovsiienko > --- Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh