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 23231A034E; Fri, 21 Jan 2022 17:20:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E9E942775; Fri, 21 Jan 2022 17:20:02 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 8F23D40040 for ; Fri, 21 Jan 2022 17:20:00 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso9563371pjm.4 for ; Fri, 21 Jan 2022 08:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V+IHdBFiOT21bHkLZTl+mv6olaiAoXC30XmgmGw0+K4=; b=3HHkFEp+it9lyGiXm8yOnX3S+9myFSXX7vfEpBQXByvdbjD+qsHf629244DPBhCcnI KewN7mUnRJjeGro54fTJyHbJsyI5SHd7etFI5dmu90IS+PpzPrMV/FhdNo+2XKVazMot A2xfTP+yZ61ky/68R5STvWXCbepujfWwxWtb1W0TsNdh1fVNhBOhk79CIbAOpJ9LHPqD UIk/AAX1k8JWSWqncyKkf5eLX/boyQfNEa/5hwdjKdiaVHM/oTjohHDVvxYxMcfyU+td jNQbvnK4Mmlp2xNK+8qRmQd8uAIFKw3TofT3ZSBN1veU20LsFNYq9sWu/lEqcRJzhYhL xhmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V+IHdBFiOT21bHkLZTl+mv6olaiAoXC30XmgmGw0+K4=; b=ZRfhqiS8VWtYWpuSmmL2Hizq/24dgHxEiXSHP+V15Kg8MajKJhjpqf/tlDtzhilZ0C DGZwmd72yeh8NoCALea2zls5gETMbUV8zFlwEiXPxtZnjYy+Lt+DYWv21b1C+1X2qW8W SewKLLBe08dOG8GEjztaNSv98DtwXtGA8jHUd3f6IiUv1yWJEqUpR9qBcfe8T+HlJO/T lyxoMlI0mezDUSr997XuT2eNvxuU8kuBfKGzMy65tY30t6Kw6f/CX3dG4qxs2E6/WJ2e qE49NP+qqPk91S3tOHUDf1gBCLW6HWllffxFXY3TEtID94Xb/FQltcsoBfAsKrsSpg2m Cbdg== X-Gm-Message-State: AOAM531JbX720sRDszAU7GlTp/o+zak/y07KkFDpi0VmRTjTLlrQdgHl 950sTjJHK/b2raGszRPPtnFAiw== X-Google-Smtp-Source: ABdhPJwizKga//aQWbJSbKOV+q/uyHNYZ1DfIeOXNHRnCTpByGbJXryYAcMpJqWJfZTG7bKlyBFlBg== X-Received: by 2002:a17:90b:391:: with SMTP id ga17mr1523716pjb.78.1642781999650; Fri, 21 Jan 2022 08:19:59 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q25sm6873406pfh.167.2022.01.21.08.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:19:59 -0800 (PST) Date: Fri, 21 Jan 2022 08:19:56 -0800 From: Stephen Hemminger To: Wei Huang Cc: dev@dpdk.org, rosen.xu@intel.com, qi.z.zhang@intel.com, stable@dpdk.org, tianfei.zhang@intel.com, ferruh.yigit@intel.com, david.marchand@redhat.com Subject: Re: [PATCH v5] raw/ifpga: fix pthread cannot join Message-ID: <20220121081956.4837e66a@hermes.local> In-Reply-To: <20220121033246.10339-1-wei.huang@intel.com> References: <20220121012932.9827-1-wei.huang> <20220121033246.10339-1-wei.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 20 Jan 2022 22:32:46 -0500 Wei Huang wrote: > @@ -497,7 +497,7 @@ static int set_surprise_link_check_aer( > int gsd_enable, ret; > #define MS 1000 > > - while (1) { > + while (rte_atomic32_read(&ifpga_monitor_start)) { Better, but rte_atomic is deprecated in favor of using __atomic builtin instead. This is because there are more options possible with __atomic_load_n than rte_atomic32_read. rte_atomic32_read has to assume worst case memory ordering, and your example relaxed memory ordering is what you need.