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 64838A00C4; Wed, 9 Nov 2022 11:11:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11AC540143; Wed, 9 Nov 2022 11:11:59 +0100 (CET) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2067.outbound.protection.outlook.com [40.107.103.67]) by mails.dpdk.org (Postfix) with ESMTP id B0762400EF for ; Wed, 9 Nov 2022 11:11:57 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=B2A7N22ZhrTLnZF5ADtyatvlI8NgAlxM+iXXbSg9LvdDQ2lxUxuMdHOUpkmvpBCdP9D6ISIN5qvhKJ22x3h3pSB4zzGcWUlRiOFMKWyfgZScd+RX5FXbeDLPMr7Yv8bVVuO8UrMxMPAmo/kP4gt+0cz5UqpMjhgahdrbFt3psEwqG8Hc8xhzO2klyDJBskvwDGa5dc9lDjA/r6Awabpakk8lR8FrLyY6ypZ6d4UYvKC24/An1qqXCT0WAcB59rTmEcDJigWEvl17TlYRLDt3LRcqH6PQi11kRVTCWCbnEZpDRHzSW63eaOSvgQUIAzOcHFyvP/pvcQqYePBrb54tCg== ARC-Message-Signature: i=2; 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=hTU0MeIngnmMtHKiU/CX8mjbj2GjoXIkGrUcY+bPFqE=; b=GegYnfMrdabxSel6yWbjQwbIuiGjtg5sbzXIfApe8hLL7dLQpyhtMXykjqhnJfESH90uMBU6BKOKD+J4zSyYT0/+EKnCSzcm/j3sZObs3d5PKvG3izhuz0D0zM3aiMSsGgpfR08BbTHHtHGX3F9g2yLb1uBeivMB81qF4trfSvI3A4p6OxgEDrQBFUT5vGOw8XQDNd+x4FjmqDJBUGPA1WbaP7CPhNIBG7gl9J/52VVini/3s+M861NRKetJtJc3APqTmrvYassMWzb4Du4fpGPalfi9x+5sTX4Vd8Ed0haHX6Zkqvux+fz7iUnKa3UV0qgMxC3wvYhr3Zcqbi8KRw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hTU0MeIngnmMtHKiU/CX8mjbj2GjoXIkGrUcY+bPFqE=; b=ddECJlkxnOkpXW9BNic88/iFd05TzzIXnyK+tdjjYC0yIwaErMEW58+kESDZ2oHDJGuA9N+XJQK3wUVAy2aHVsxBRdrP/0Rj7fb4oNTh4yk1IbbMGpgYmNoWnuQ5UA119m+G68KxsemQ3aC3NMWAPlr83SISEL+ZkOhDwZOKrWc= Received: from DUZPR01CA0048.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::17) by DB9PR08MB6475.eurprd08.prod.outlook.com (2603:10a6:10:253::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12; Wed, 9 Nov 2022 10:11:52 +0000 Received: from DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:469:cafe::92) by DUZPR01CA0048.outlook.office365.com (2603:10a6:10:469::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27 via Frontend Transport; Wed, 9 Nov 2022 10:11:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT023.mail.protection.outlook.com (100.127.142.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Wed, 9 Nov 2022 10:11:51 +0000 Received: ("Tessian outbound 0800d254cb3b:v130"); Wed, 09 Nov 2022 10:11:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 333f56bab0e4ef5c X-CR-MTA-TID: 64aa7808 Received: from c65ee9a9a74d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 35E400F6-49FC-43D9-A12B-D14A60945F40.1; Wed, 09 Nov 2022 10:11:47 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c65ee9a9a74d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Nov 2022 10:11:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WEY1XxmbA+DXK7thVowz3oqLHU5x7+YfisV3LJxwR5Mv2cFAjk3hnZ+JSUBh/p2G8vd80+hQFPnHQX43zE8I7dbdhxHXBnXejogkQOGFVP1h+/j/119I16ipR2WCrmhCcw4PkASAriN8X1hIx1IpweAp6lIdYhq8NptMqpL/tJ116fUEoIoBL8ecF6JT4Lp+J4sIibJ+2Q7tCKCh6JHWJ6CicRpMAbZLeFD5WjFMpilMtf6VbhnGipS42SdhmkGMYEDAfe4rdxvG6Q+pqn8eZj0SdDW3eGXSee16DYom6V2T3eJZBS3cGeGE2ibsJvzMYu2wxENjB8th4Tgsdb3+2w== 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=hTU0MeIngnmMtHKiU/CX8mjbj2GjoXIkGrUcY+bPFqE=; b=hF30YTMNvDJmsDOZr/jGVnOotHu5dUZp4uBpRsfPAuQWQBScWUbg6+5/s4X0XipZK2HX5QZLSeB1v1nl0B+RhBxciqcIH12QisgCNGKzZXBKNqBqjuJsmuP4e7N49/c0kM5DaT5CgVxJrvG7JG5BmfOjUiwc4bYn4830kM/GG0Fpw4fVWlJ1AArnYYIHhp0DNdy0WXPNASDVQpuB4xu4QO9TPdwUNZBpezNlmlWkpVAT89S0DQEW5XWAXPC81AHJIXKuJcWadsdugiIx9gnei/FO/f3Yw4EqsVa1G8FuOyOI/f4EaukdxgceSM6Toi5EY2jL8gmboUcaIAHgDvDGEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hTU0MeIngnmMtHKiU/CX8mjbj2GjoXIkGrUcY+bPFqE=; b=ddECJlkxnOkpXW9BNic88/iFd05TzzIXnyK+tdjjYC0yIwaErMEW58+kESDZ2oHDJGuA9N+XJQK3wUVAy2aHVsxBRdrP/0Rj7fb4oNTh4yk1IbbMGpgYmNoWnuQ5UA119m+G68KxsemQ3aC3NMWAPlr83SISEL+ZkOhDwZOKrWc= Received: from AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) by DB4PR08MB9190.eurprd08.prod.outlook.com (2603:10a6:10:3fd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.11; Wed, 9 Nov 2022 10:11:40 +0000 Received: from AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::2ae1:1bf5:429d:4820]) by AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::2ae1:1bf5:429d:4820%7]) with mapi id 15.20.5813.012; Wed, 9 Nov 2022 10:11:40 +0000 From: Ruifeng Wang To: Stephen Hemminger , "dev@dpdk.org" CC: Phil Yang , nd Subject: RE: [PATCH v2] testpmd: make f_quit flag volatile Thread-Topic: [PATCH v2] testpmd: make f_quit flag volatile Thread-Index: AQHY850NzTzNn9qPxEC7VyqNQIvD3a42X6OQ Date: Wed, 9 Nov 2022 10:11:39 +0000 Message-ID: References: <20221014172328.185219-1-stephen@networkplumber.org> <20221108180743.20390-1-stephen@networkplumber.org> In-Reply-To: <20221108180743.20390-1-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: A5145F4C69FEF54C87A24AAFE1797375.0 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AS8PR08MB7080:EE_|DB4PR08MB9190:EE_|DBAEUR03FT023:EE_|DB9PR08MB6475:EE_ X-MS-Office365-Filtering-Correlation-Id: d7c8277d-916a-431d-4907-08dac23ad24e x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: gboB+84eOfnH4X+/CJsVwcQ2fxnqznVX2MMC/5MujHbxq6sgxK0xpXAwY2wlw4CcA/dZ2nn6Yom7o9TSHhqQGgHQf/Ig6RyuRrFGJhvn4JPVcum0Wy55MJjnLosN4/K2UYDnbzS5kUULSRZVs2h8G3TGVVWul+kG9FpZV26rZGfDNIHxACU7fZBItGPfWExUoBCJJyUQ4YSvahyguLi5XZwSYZrqJVnWnzynmIhYVJf+I4Ek5T3nCxPyIhJLCiZlJFDgGLR3RExPt8jkvU0dpPhhIutO1KChwYQHgD8KVzBmZIPiF/3aGQP2lY1O3tia9fOf8/mk8bzSWJ2X96J6rQaetZStbKUq6bZlqjLjF3bVm7A+ylXZDIfoBNJez47GQf0Tvfw07k9I+P0uwWjSizTdOdji8SPk9En1R1EsDfkeOYK/S2IR7aAK0con2ivZWbjjgykQixMTeJKsTD//xOH6pv9ZwzV3rsrx+bi6+z3g8vOCjSFSK5AnqS/ZTmqvhOebnc1xgUF+DcNUAwibL9HVepgBEVxvkJtRzyycYx/aMT0PfH0KpkNB/DIZ687O1u44UcIAnisRg0hymJ0r1z12oMVcSjSJ8o90dr51UCwNzsjdSEwF+Dk6o0yeGySioBCA8b9p8D7On8P12kx7hG7RyJMcAz45kedg88qdExBJtana4d023RolP7R1kPR/4EklaM+YOiG5EBPOoqUgHaLdw+V3k8YPd6mU5e+ldeJFL/ANqXF7soLnuCFmrwVtKHHf7ngb06nski8zYOPMNQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7080.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(346002)(366004)(376002)(39860400002)(136003)(451199015)(186003)(54906003)(5660300002)(83380400001)(38070700005)(122000001)(38100700002)(2906002)(52536014)(8936002)(55016003)(478600001)(41300700001)(71200400001)(9686003)(53546011)(6506007)(26005)(76116006)(4326008)(64756008)(66946007)(66556008)(8676002)(316002)(66476007)(66446008)(110136005)(7696005)(86362001)(33656002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB9190 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 57917ad8-2354-407f-67b5-08dac23acb42 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WKyqUQphU1HuMQvUU6s4XgozmDp8YHu22JaSmi4NlHzbGGe3W0hiljmmWCU6aVvB/dPwF1WuWKqc8p+lmTI2hdeSMWm0vlSj4Y8iWqlxoPVyGEvdsvQ5KbgvltAarSG9KUE1GV/DrbbGT9YF/D+XikhgFGjZIKOUwh5j8+Ypl0JYIOkFkBA8lvE+Kj6+KRvCM5Map+VURyHsU1lFnDYhWKrkAJle3B/mvT4pYSYbwCQuEeeJcWwSS9w9xmdTeh5+OjySlqB6w8gEdYHNoYpmflhP5AoGb69KHr1x/z+bDnr1n+I4CRiFnQ8zgtrLc4TnH3IsLRMpz9jkNIFaBy4RGVipUvTwRR8KSm7zjgXlFwgbmRyquzKMEQvmEcGpl9nWPtcI3+KlDjQtZjUbG958woshkhGgSfoPCazyaELlC5c1Bb3EwJOlunRczPBBuL3wzdTgonTLq6RTyS8wqVTbidt88OdNuFBPIZKAbrnqZBXs82mJFvEaYuVu7sLSToEVlQ7Crpy2n8RX9yUTHo+gtRZ9p3KCpuhmRoAd98t73CGymHvfYHwnoCBT4VQuw3yq+T9tyPlFLp5CpwMu6wn+oYmQ9T+HnLvrwMG+Da9heSTEGIA8Uy8b+MbsZZdFo+gxzk+QqAe53HFm979eOZ1Ax9251rQJHElH+k4UwQAJRTNdBGs/WWLsQ3d7qwBSIXKINRfvt8EQGW0fktJzpEO51KVmGolfwplFktNu8gln8ipG68aPjBn0LQw6ePSXfCbUJh9LDuP0ornMREpqJCMtmA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199015)(36840700001)(46966006)(40470700004)(33656002)(478600001)(82310400005)(81166007)(356005)(54906003)(110136005)(83380400001)(2906002)(47076005)(40460700003)(53546011)(5660300002)(316002)(7696005)(6506007)(186003)(52536014)(26005)(4326008)(8676002)(8936002)(70206006)(70586007)(40480700001)(55016003)(86362001)(9686003)(36860700001)(336012)(82740400003)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2022 10:11:51.8427 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7c8277d-916a-431d-4907-08dac23ad24e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6475 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, November 9, 2022 2:08 AM > To: dev@dpdk.org > Cc: Phil Yang ; Stephen Hemminger > Subject: [PATCH v2] testpmd: make f_quit flag volatile >=20 > Since f_quit is set in a signal handler it needs to be marked volatile. = Otherwise, > compiler is allowed to optimize the loop because it can assume the value = never changes. > The flag can also be made local to the file it is used in. >=20 > Fixes: d9a191a00e81 ("app/testpmd: fix quitting in container") > Signed-off-by: Stephen Hemminger > --- > v2 - not RFC and add fixes line >=20 > app/test-pmd/testpmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > aa7ea29f15ba..cf5942d0c422 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -231,7 +231,7 @@ unsigned int xstats_display_num; /**< Size of extende= d statistics to > show */ > * In container, it cannot terminate the process which running with 'sta= ts-period' > * option. Set flag to exit stats period loop after received SIGINT/SIGT= ERM. > */ > -uint8_t f_quit; > +static volatile uint8_t f_quit; > uint8_t cl_quit; /* Quit testpmd from cmdline. */ >=20 > /* > -- > 2.35.1 Thanks for the change. Reviewed-by: Ruifeng Wang