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 2DF16A034E; Thu, 20 Jan 2022 16:46:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 810CD42706; Thu, 20 Jan 2022 16:46:49 +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 AD34542703 for ; Thu, 20 Jan 2022 16:46:47 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id my12-20020a17090b4c8c00b001b528ba1cd7so1134038pjb.1 for ; Thu, 20 Jan 2022 07:46:47 -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=z2fFAle09T0i4PHIesHXBiIfNvcoeDuIuAWuilEgS/A=; b=pXjjglxWsspYgscC6FEzb5m7X8OSmP9yKTy+6f4QqkEnZobNc3T6DwKNoqqOHX2wpS /FnrC9+NZ1SU9eI25RL9CsGuCzrjax1EKelokdDm507jzPWZFwDesWYmb5W71p3HMKB3 1WGaNVPqe3Xlt856zd4Ftep4xB5MktwtQP0nnRKe8nJbwf9hV1GPIsDjAoOv9TcWJS4K wCQRiNzlubv6AS6B8SMUeFLrwAwm075sbHvIWpQldj51ZUwJE+SDmn5D0j+GdYfXM/tF T9CZArONxS5Cw6nXc7uKOu9kqy1SVXN7jSLLMjKFyrMPCnqXibgUrqYwh3ZyHYPxzFRI 2D4A== 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=z2fFAle09T0i4PHIesHXBiIfNvcoeDuIuAWuilEgS/A=; b=GLvpBihXl3l1oJp8CfKUFLSJqKOLBvzEqwQbaHXzX8TEUTS98kh3JAqtv/iNXZOhEz zHvW+JKe9M9BXje7Ehmxc4yExJACCr/ocnare6gNg0BUtrBRVIklS3smiUFsUIAgHekG uK1qHQgqtjDj6T1sSf8Notfq5WaBhtDzzFKk8iy1TiryleeN6Bu+edkeKvHbpD0PyjiP 2jMH+kNOMOcZ7fVNde6CeJJMQ/LRFVcFKrClW2k9d68i8p1sa1H0nUFQ9EZeeytHzrej RFYp/KNrgHS4ogwag0ALFxradNRbWpWrIV0sFytpOcdJBVtcemqLpFrjEgkRHTztKO9P cloA== X-Gm-Message-State: AOAM533KVfZWC53tCvSAnuUmmEG6fySn/mtbek/osh0qCVVloiHfEzUT gTpBudf3Fgqk9ZV8V+B1nHVxPQ== X-Google-Smtp-Source: ABdhPJyhLODa/cXGfHfrsLeJmHx2a42tcbXANJN88rR/fww6hG6fZPt9Z0vGgS3qz0hZlLb4EZKb5Q== X-Received: by 2002:a17:90b:4c87:: with SMTP id my7mr11489632pjb.154.1642693606843; Thu, 20 Jan 2022 07:46:46 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id s13sm3963084pfu.0.2022.01.20.07.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:46:46 -0800 (PST) Date: Thu, 20 Jan 2022 07:46:43 -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 Subject: Re: [PATCH v3] raw/ifpga: fix pthread cannot join Message-ID: <20220120074643.10aa0926@hermes.local> In-Reply-To: <20220120055814.7244-1-wei.huang@intel.com> References: <20220120023535.6747-1-wei.huang@intel.com> <20220120055814.7244-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 00:58:14 -0500 Wei Huang wrote: > diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c > index 8d9db58..2bc569b 100644 > --- a/drivers/raw/ifpga/ifpga_rawdev.c > +++ b/drivers/raw/ifpga/ifpga_rawdev.c > @@ -497,7 +497,7 @@ static int set_surprise_link_check_aer( > int gsd_enable, ret; > #define MS 1000 > > - while (1) { > + while (ifpga_monitor_start) { This will work on x86 CPU but not on CPU's with weak memory ordering like ARM. You need to use atomic_builtin when accessing a flag shared between threads that is not being protected by a lock.