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 5414943A72; Mon, 5 Feb 2024 14:33:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7432040DF6; Mon, 5 Feb 2024 14:33:15 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2059.outbound.protection.outlook.com [40.107.244.59]) by mails.dpdk.org (Postfix) with ESMTP id E954F402A2; Mon, 5 Feb 2024 14:33:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ExhyEqO0ok/28PTez9VQ6QWFKKmSYS/51pmqOdRsPFsBY/sXo+dQf4uOUc7LbSW2JBz+JaZQ8EddazyCxPdGFgLUjhD037DJyHkqTsiEypC0Re4hLeNPMMumW0zZ77XFz/HLNh9w+yylbcOeb2cGUWluGW4oPldwkwD/gGuAGSJOvBUeDCHig7a/TOQzG5kAYtPv6cQTTduq8LQtQEfwpa2mPsd1lOaQhVRiRcUN/PH6rUhWDomn18gZCGy2XEWmf283+o+IWaqPgnu0ER30GQN47+ViPi00hrinCMAhQDE+2p4kIQcWIYoyMGUfPLOhXuTYpfjzEFvm84Ioi3p9Ng== 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=XOqcMapMzjCMMtTE7LeCn5MAk3V2ensmZdv+6y9gQ9M=; b=m6r+lDT0K7Uf57GTGhz2mwSoOuD988FzXDlHmJVylG8wz4Gh8Wt1AfAKJ25BUfJmMAB55KpI/PhCJwyIpVMmAq3b7DdqpGAwj3/ug2hXwI+WJWrq5YHByDLzyj+3xzwBg1pR5xVJdEL38qqltFoEeJk9C105Fh+dlbqbgHAwnMBUWnlwNJGxb7Q+Cn4YNPOyo2maJSELfjDm2ndIRaoCRex7CGkpypm0ioh9H69yrp6NP9iGFS0VmOaZzGFTcB6xSRWPQJDa2a9yrOncBR5ocRZVeKT+IdknOzYYIAxu+o8RUdrIgGHPLVftixYfTZPw47uiE7A+IX+VxKKlTc8zsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XOqcMapMzjCMMtTE7LeCn5MAk3V2ensmZdv+6y9gQ9M=; b=GHHWwWxlng00Ig3dowf1amrJSHxvFgMHSjxkC4BmyhvmkkCYwHbP4KjLdSwEQ1s0MtQvuQwOO7YoBQSfz3TQBo8ceDWpLTG89sAT9usKhpS3/ljEejQFT9aP0D8QjuFheOX5wfAuNBtfgXgVqrO7WGGLBAbuMxrl2P1bewoOy04= Received: from MW6PR12MB8999.namprd12.prod.outlook.com (2603:10b6:303:247::8) by LV2PR12MB5918.namprd12.prod.outlook.com (2603:10b6:408:174::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Mon, 5 Feb 2024 13:33:11 +0000 Received: from MW6PR12MB8999.namprd12.prod.outlook.com ([fe80::b2d3:710f:1b2e:81ef]) by MW6PR12MB8999.namprd12.prod.outlook.com ([fe80::b2d3:710f:1b2e:81ef%4]) with mapi id 15.20.7270.012; Mon, 5 Feb 2024 13:33:11 +0000 From: "Boyer, Andrew" To: Stephen Hemminger CC: "Boyer, Andrew" , "dev@dpdk.org" , "Patel, Neel" , "stable@dpdk.org" Subject: Re: [PATCH 04/13] net/ionic: fix missing volatile type for cqe pointers Thread-Topic: [PATCH 04/13] net/ionic: fix missing volatile type for cqe pointers Thread-Index: AQHaVg6sxEkbhOyxa0qCHcOWhnGDtLD4BjsAgAO9UoA= Date: Mon, 5 Feb 2024 13:33:11 +0000 Message-ID: <0D66E753-A5A3-4F4A-A532-1BE2FD55493D@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240202193238.62669-5-andrew.boyer@amd.com> <20240202202636.450b1b38@hermes.local> In-Reply-To: <20240202202636.450b1b38@hermes.local> 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=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW6PR12MB8999:EE_|LV2PR12MB5918:EE_ x-ms-office365-filtering-correlation-id: f4d2025f-6ac1-4a58-b3c2-08dc264eff52 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 82X6VXAOyhCXG3Y/0FIx5/1DVXkZHRufZ4sOvoy87jnnN/lTEALCReu6uHpRjLYsKH86S8xLZVdJHSu+5bctxjZHgAj0C15/NuLHUb0mbAJhnjLeXscYEYMHYDPahpvtj5PPBcw4thLvNLtJkkuT934lmCNkHdQjk/kGSiC+TmmeHZTduaaFZp44e59K8gk0jKW/T1jKJ+ssnEq+osm5Wvm9HNQtNudqVvs8S50yTMp4qTWyBco/Z93AjV8KxzalpFVO4fp/4rMWgE7EOFmt647U2nF3YvZga6bMnFnrMBiQ36RzvLZGO0ExQh7Q1cAHaVN6Qdve7/rOa/2cw4DXfg4i+O3abTN4Tj6gWhNSFZgxuBnTEMnenJ4Vj65Ay5FHbbYPXBuTl8wkmEJiu9A3Px3GBqFU0Ne/yuP7SYkZZDk2M5YVctlnioX5341gkvXEqT4eP5lMqZi3KY4dD6SnZtUYFUueoZh6JerxilU7XDOstZlIWbwLCV8w9eKLZDB1nuEubxMkxr1lVLXTw2HvbAP7ai5lK7qZu2FZsX161i3bIPkbXkrGYnPWC+IU1QBgoKOvtuu3s0xrDy2m9au/g+i3VcK+b0U5gILekT2jEgIcAB13v1/Qi8yhwtPat34ZhFVmz8tLBEWLxLwDpnT73g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW6PR12MB8999.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(396003)(366004)(346002)(376002)(39860400002)(230922051799003)(230273577357003)(186009)(1800799012)(451199024)(64100799003)(41300700001)(26005)(53546011)(6512007)(6506007)(2616005)(5660300002)(66476007)(66946007)(66446008)(8676002)(4326008)(66556008)(64756008)(8936002)(2906002)(478600001)(33656002)(86362001)(76116006)(966005)(6486002)(54906003)(6916009)(316002)(83380400001)(38100700002)(122000001)(71200400001)(36756003)(38070700009)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?w8dFyZ80h/3ME1ntot1z0HPn7TLpRhFikhqoEHcUaIwEVM1Yx4yzoh7H3k2G?= =?us-ascii?Q?A43+QgvVpPU2PDrh5cd/N44a1IrpJV0O3XEWpW8iJHLJIsviwiwFkxPGSz6T?= =?us-ascii?Q?ArSRDRxOWbsjOsmOm81IbQzFcx7+x/K3boLoeXbxHFVhkVgurrz0jMXs/zEB?= =?us-ascii?Q?Lern1VDtWyL8S+KHd6KvncXnzg5pK7/r2lbbjXbkzPtgS02lVqOZjeGO7kva?= =?us-ascii?Q?JB7GwYioyR6XxF9yurQ5uuoxhHMYWXCjE7YFORDx5vNrPp4oq1Gah9Scrgpx?= =?us-ascii?Q?rphL/96qz1pqZ9Ayv3JMEwG0tb7gopDlEo3uV4BGXl41FU2uNupp7SnBO07B?= =?us-ascii?Q?I3TBg2JHe5GNLrRyYto0ZgLii88vJr66Ol+MRIlMUHfFZKC478vbPf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rfydtidqK9rDuKysivF3gywIIdDDJpMPlWqJIOWW?= =?us-ascii?Q?n/455yso5FKElp2WDfV95r5Wdhe4sgo3eOe05x1VkSh6eDzGc/954OUefOPC?= =?us-ascii?Q?FJScdyKHrCWBEkMXYXpag0aYdIsRHKtH2l8Bc1/uHHhD7THVRbhP+wHdgdlb?= =?us-ascii?Q?CVaCujemfezdrZOHlfj2nTpoGvaz26jBUtED2UD2MzudP0/0rbKOuIcalhOE?= =?us-ascii?Q?9bs2yNk7uD+uLT7SxFQryJMi7gNgTyZWgHqadNZiowTh+2+zwaSp22fEfJWZ?= =?us-ascii?Q?gJyn9n/Mvvu4gTSdD0JGMOgEt00ikd5Io4DVD/fE?= Content-Type: text/plain; charset="us-ascii" Content-ID: <0DFC73EAEC8CDD4990E3280B74B94907@namprd12.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW6PR12MB8999.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4d2025f-6ac1-4a58-b3c2-08dc264eff52 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2024 13:33:11.2556 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MG62WWiYZktGTGbgGqnEjoanl2W2hVoSgNKdb5s9Qr4ub8dS10oC44ujAPceUbcS X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5918 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 > On Feb 2, 2024, at 11:26 PM, Stephen Hemminger wrote: >=20 > Caution: This message originated from an External Source. Use proper caut= ion when opening attachments, clicking links, or responding. >=20 >=20 > On Fri, 2 Feb 2024 11:32:29 -0800 > Andrew Boyer wrote: >=20 >> From: Neel Patel >>=20 >> This memory may be changed by the hardware, so the volatile >> keyword is required for correctness. >>=20 >> Fixes: e86a6fcc7cf3 ("net/ionic: add optimized non-scattered Rx/Tx") >> cc: stable@dpdk.org >>=20 >> Signed-off-by: Andrew Boyer >> Signed-off-by: Neel Patel >=20 > In general barriers are better than volatile. > Volatile is a compiler not hardware construct really. >=20 > https://www.kernel.org/doc/html/latest/process/volatile-considered-harmfu= l.html Thanks for looking. The goal here is to prevent inappropriate compiler opti= mization. >From the link you posted: > Pointers to data structures in coherent memory which might be modified by= I/O devices can, sometimes, legitimately be volatile. A ring buffer used b= y a network adapter, where that adapter changes pointers to indicate which = descriptors have been processed, is an example of this type of situation. Doesn't that sound like what we are doing? Thanks, Andrew