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 D91ECA0529 for ; Wed, 8 Jul 2020 19:10:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 982D91D930; Wed, 8 Jul 2020 19:10:30 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 0A3481D930 for ; Wed, 8 Jul 2020 19:10:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594228228; 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=BWXJOIvfsrJ0LVmiL+5St+bLCSMjX9dLuMBqXMVGcic=; b=DhkMZDbXI27txNf952NDt9k4POSOJyJV8HwGq9PmjzmATHWTNxSckZ2cnk8qgM1zOitLeu swTwrUqIZu5nTQ2Pzv4dec8EdG8yRLlEA2qMlXi2eMzckUfwETrNsyEE4EVtmdvHgRYrWe K0RVS1vezHsVhXFROpWsuJ1dYgXy9zc= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-Gp2nVijgPNmzw0uFqG41vg-1; Wed, 08 Jul 2020 13:10:27 -0400 X-MC-Unique: Gp2nVijgPNmzw0uFqG41vg-1 Received: by mail-ua1-f70.google.com with SMTP id 64so5741558uaz.3 for ; Wed, 08 Jul 2020 10:10:26 -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=BWXJOIvfsrJ0LVmiL+5St+bLCSMjX9dLuMBqXMVGcic=; b=AJ46tiN8m4nvPBt7MoPGRs3HkSgGNCntevXvwIKCaYdbESXkrBiHPAl6KE/pKlb74N AFckZJ6/E4Y/UPbYrcJa5xblDLkxnCvcdydwaRkf2E5LS1KnBM73CMCWpV136T2ow/df lqYxpAcmRu2GENJlwp0Fw+JTkyZ4wiruI+l/YbCwuziF/L0Oj4qClY9xhKGchDddSNsA lmB2jDqwaaW3KRsaNOHkNRTULAjPmaI1Z6LXCi/nLEOFtwW1OSYyCYWtHrxlXTwnDhcn MJ35k+zX1ZTipORHjElcnRpLK9kLhTflGINJ1I18WCpVG9CdDSTPopczM53SCRb+TSpt fgag== X-Gm-Message-State: AOAM5309+/vBZp9Ha12rUg3CdW4vejZ/LOCn48VP8Rt/ld0zr/1MaTWJ yg6oeptl4bVwtPy5i40BuVgGkQkF9RUFx7BmcvmnYP+rOYmh/pQiu1qtHjaz6RfAkB8Dlvv+2Yh OH2JakpEZuHLGJiB+48tI/AY= X-Received: by 2002:a67:c58c:: with SMTP id h12mr37563932vsk.141.1594228226539; Wed, 08 Jul 2020 10:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+UYzYzefsHvJQhZdOHBcUPKQ939ao60tpYPF7Sr2Rk60e2FGcfe3VO4zrqaMaaPWVla7hY8oEwoRdPCFX+68= X-Received: by 2002:a67:c58c:: with SMTP id h12mr37563912vsk.141.1594228226256; Wed, 08 Jul 2020 10:10:26 -0700 (PDT) MIME-Version: 1.0 References: <20200428012139.32196-1-l.wojciechow@partner.samsung.com> <20200708133733.29468-1-l.wojciechow@partner.samsung.com> In-Reply-To: From: David Marchand Date: Wed, 8 Jul 2020 19:10:14 +0200 Message-ID: To: Lukasz Wojciechowski Cc: Jerin Jacob Kollanukkaran , "dev@dpdk.org" , "stable@dpdk.org" , "Van Haaren, Harry" 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-stable] [PATCH v2] eal: fix lcore state bug X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Jul 8, 2020 at 4:52 PM Van Haaren, Harry wrote: > > The rte_service_lcore_reset_all function stops execution of services > > on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE. > > However the thread loop for slave lcores (eal_thread_loop) distincts these > > roles to set lcore state after processing delegated function. > > It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE. > > So changing the role to RTE before stopping work in slave lcores > > causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait > > must be run after rte_service_lcore_reset_all to bring back lcores to > > launchable (WAIT) state. > > This has been fixed in test app and clarified in API documentation. > > > > Setting the state to WAIT in rte_service_runner_func is premature > > as the rte_service_runner_func function is still a part of the lcore > > function delegated to slave lcore. The state is overwritten anyway in > > slave lcore thread loop. This premature setting state to WAIT might > > however cause rte_eal_lcore_wait, that was called by the application, > > to return before slave lcore thread set the FINISHED state. That's > > why it is removed from librte_eal rte_service_runner_func function. Thanks for the explanation and fix. > > > > Bugzilla ID: 464 > > Fixes: 21698354c832 ("service: introduce service cores concept") > > Fixes: f038a81e1c56 ("service: add unit tests") > > Cc: stable@dpdk.org > > Reported-by: Sarosh Arif > > Signed-off-by: Lukasz Wojciechowski > Acked-by: Harry van Haaren Applied, thanks Lukasz. -- David Marchand