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 AC4DFA00C2; Fri, 14 Oct 2022 19:23:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2260740A81; Fri, 14 Oct 2022 19:23:34 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 958F04021E for ; Fri, 14 Oct 2022 19:23:31 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so5314995pjl.3 for ; Fri, 14 Oct 2022 10:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dACfn4HkMEJf0s2Dfm8oVLiKpKo2v5L9TSvCvYRJYjI=; b=BBsoxFdJWm7OGUZ2Yvs66UJwc6l1sAOVy4DxIExeFPIYoE+MyeUnKRUSVhuk7A6eia Lcf3To00pAooqBehBla6BrpAM2mRYZqsyBgetk83YrXzOWkfOnDTf2e40ayOrx7a9lxP 6tbbKnHYp7BTzhmAYIbP6Xe0BSw0Ky6tMgpEeFlIipVAjQEETA8+DCNAGC8wvMHBpv6B cwZFtGkBADuELr6pKZlyq0hssMCS/HKlz9U1Or+VWGzFEUd4EweSA2/e6dBq8Sk/5qvY lwC0g1z0E/auIVwTCmQ1TZRZLw8RAtFCJCTdxWi7AtryhgbZG4o6h1nVVno2Pc+XhDmZ AUpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dACfn4HkMEJf0s2Dfm8oVLiKpKo2v5L9TSvCvYRJYjI=; b=mlFVUj37JWCJwgoo0hYkXgXVHQNoP68nuk0k6ptvu+0xNRFth6y+HDMKBVyRisidIt QcTW/B4m+c09K6F/tOLNYUJYadstqMU+IROYPd5NrBJnFyNvBnM6iLm+BQRp0I1ehcth +541Ap93hXhWl9tNovfhDMv08bCohVlCH8olmoskcZbPA44k/6PWnBkHUE5oF2rYqvBV TttwibJh3oWMX7frB5hwBixgrleoK7BYhqdCYJHKyDy2EsXQFaNIdT9gws4RUZSbup5l XYxv0KuMPVfsLVkl3ClzuMzXQeMX6kIc7prkP3kWX1IVha4ISGMg/PkJdmyU9T7Navh8 8uEg== X-Gm-Message-State: ACrzQf309ht4Q6BjXr3DScvaFPslLJP0GWxU7hVkwX4aZH6wY4sSE04l WIIYasPQ3fC7uSNPIgblSHggBcoTl6Ay4A== X-Google-Smtp-Source: AMsMyM45TISLRz5yhmkl+JBhxzbFmGrO7gREtbgTZfoHSxaa7zz53UE4HvTEoaRaJLYK4fp6MjaeQg== X-Received: by 2002:a17:902:968f:b0:180:a7ff:78ba with SMTP id n15-20020a170902968f00b00180a7ff78bamr6487441plp.87.1665768210473; Fri, 14 Oct 2022 10:23:30 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id g20-20020aa796b4000000b00561beff1e09sm1986520pfk.164.2022.10.14.10.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 10:23:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [RFC 1/2] testpmd: make f_quit flag volatile Date: Fri, 14 Oct 2022 10:23:27 -0700 Message-Id: <20221014172328.185219-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Since f_quit is set in a signal handler it needs to be marked as volatile. Otherwise, compler is allowed to optimize away access to it. Signed-off-by: Stephen Hemminger --- app/test-pmd/testpmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 5b0f0838dcc8..815dd6dab4e3 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -231,7 +231,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */ * In container, it cannot terminate the process which running with 'stats-period' * option. Set flag to exit stats period loop after received SIGINT/SIGTERM. */ -uint8_t f_quit; +static volatile uint8_t f_quit; uint8_t cl_quit; /* Quit testpmd from cmdline. */ /* -- 2.35.1