From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6A7B6A04D6; Mon, 21 Sep 2020 16:51:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 414FD1DA86; Mon, 21 Sep 2020 16:51:34 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 9152B1DA81 for ; Mon, 21 Sep 2020 16:51:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600699892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NIpgKicZl6jGyloOEkDTO5D8kzjlv0d9WlTGjG6qJGw=; b=hp+Vc9eT4dBJWiJmB07kiD6Zew+UrLhrkk+UxZet2BXBq7Z59VF76kWlnuZS5AjF9hIIbu /fCTq+AaV0riOU8fMEuMYBXgQCQW/A4v42xgf376y3QMezJPM/sThR4wNGqztTLG1j4jJL wlAy+A/bA7jr1BTc1Y8K+TxX65DHOVs= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-80-6VFOdQ4eM9C4V-B7T7lpOQ-1; Mon, 21 Sep 2020 10:51:30 -0400 X-MC-Unique: 6VFOdQ4eM9C4V-B7T7lpOQ-1 Received: by mail-vs1-f70.google.com with SMTP id k190so4047718vsk.17 for ; Mon, 21 Sep 2020 07:51:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NIpgKicZl6jGyloOEkDTO5D8kzjlv0d9WlTGjG6qJGw=; b=HX+n8J25YtB6/vwF/vsp8LLiCFL/CdKgtRFo9Le5rUwuAPx0iJjduQUi+OWj0C89/2 PJvlrYO7eeSujXG25Y3Xe2yI4DZG7IfYnEWdlFdKdRl7ra3y2UJw3EOQUDkHPYs2luY4 6OKYsODl7a1o3mL5GWFHH/dQ09lGBhtY0BxEjErtzq/6MKE2/9vxjYlx2YkaKfQQJyCk /T0qFimKTUJMV8Jq6RvaGW3pjnd1yjrLB13BH9Z7u3S6pUZBcB+W009hlC4He9W5VC06 7QrP988XwOJCyKMxbGYNWp7ScsZURmBufNVWBGu5rh0M4AN/Ue7lOb/+zR8imYVdbcVG bs0g== X-Gm-Message-State: AOAM531sTmdQ9WLxoCh16lUlQsHEsgb4EYsJfQnksrMbW4DvxQLlbNd2 CX8f4dAgAsRFoDsHCmybQnFJb5oGID5Qlsk1iwa7aMm72qYG8fjCRnQQdkV71DWAeZnU1ijEQOX tyXV0oSQavMjNpjyBtvI= X-Received: by 2002:a1f:6e07:: with SMTP id j7mr395230vkc.18.1600699889864; Mon, 21 Sep 2020 07:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuOs57r4IdJWPb6ViWbYqLxv7UP2mTTN66m6vaUKPd5Gna4naqcqxF2yTSorp27zfEeP+Ls90eh4lrCcSqYXY= X-Received: by 2002:a1f:6e07:: with SMTP id j7mr395215vkc.18.1600699889681; Mon, 21 Sep 2020 07:51:29 -0700 (PDT) MIME-Version: 1.0 References: <20200724134506.11959-1-harry.van.haaren@intel.com> <20200914143118.84791-1-harry.van.haaren@intel.com> <20200914143118.84791-2-harry.van.haaren@intel.com> In-Reply-To: <20200914143118.84791-2-harry.van.haaren@intel.com> From: David Marchand Date: Mon, 21 Sep 2020 16:51:18 +0200 Message-ID: To: Harry van Haaren Cc: dev , Lukasz Wojciechowski , Honnappa Nagarahalli , Phil Yang , Aaron Conole Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v6 2/2] test/service: fix race condition on stopping lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Sep 14, 2020 at 4:30 PM Harry van Haaren wrote: > > This commit fixes a potential race condition in the tests > where the lcore running a service would increment a counter > that was already reset by the test-suite thread. The resulting > race-condition incremented value could cause CI failures, as > indicated by DPDK's CI. > > This patch fixes the race-condition by making use of the > added rte_service_lcore_active() API, which indicates when > a service-core is no longer in the service-core polling loop. > > The unit test makes use of the above function to detect when > all statistics increments are done in the service-core thread, > and then the unit test continues finalizing and checking state. > > Fixes: f28f3594ded2 ("service: add attribute API") > > Reported-by: David Marchand > Signed-off-by: Harry van Haaren > Reviewed-by: Phil Yang > Reviewed-by: Honnappa Nagarahalli Series applied, thanks. -- David Marchand