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 BB5C043069; Tue, 15 Aug 2023 04:20:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46FC4427E9; Tue, 15 Aug 2023 04:20:45 +0200 (CEST) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 7C85541104 for ; Tue, 15 Aug 2023 04:20:43 +0200 (CEST) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-565331f1c9eso2842295a12.1 for ; Mon, 14 Aug 2023 19:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692066042; x=1692670842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/AoCtTBwaQ8UfnFs16PwP7HA1iYZjWYBvKHAlqw2RQw=; b=CEkW0LHmKimfcu/bp/mN6xNtzs5lIhWPFbH92aDKCDurctW5hXktWoOhqZgsH7ivBL O8l2WR2UzwJCYjHmZVbR3sUafHbfITlE5sqbgNxv1H5T6TkMBBQUyrGECawiMgUN/hnP HRaoo61jd6WqdjnJkhDqy5dwf7K2RVLflAREm/pEo0nceukSj62hXor9TbuBPVWT7M4R q3nzKKyQXnqPKK1LVdGQh3fad5w3KQ9ci9Kzz6XzKMVewrd43Gp3n43cfM0pOMYxH9gP Bkibo0IdTWxA1xpSdR0yLW8vU2AyzMyuRDH8D6P5O8/1zW4Sa2J18XTC8CJKqX4Xlfbl 79MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692066042; x=1692670842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/AoCtTBwaQ8UfnFs16PwP7HA1iYZjWYBvKHAlqw2RQw=; b=TKr+Z/2h1WPysMpx8fQ6xbtr5VpUGbMhdsCTB4ZotGf3HaIFUZtuqhzBAe1Zo1ILjT pDcX9tzEfLATcuyQPT1wSQCiN4GSt+b3F81Bua8aGQ6EGdbyWzZdH/fyquoHuwGxclL3 E1A/9Qb3elOAM2oCopguDZ3WST3tsQKegyDVbODCbSg3g1S3aSKjzqNpy5FIG4PxzQVi ERxMODJiea/owQQ6Vqoe05PNtaB/2/mbwO0mLkJyh5/NlCwYzlaHzRPCjEEup7GWnv76 ofjraoWTAuttiGL88VZNT/tsoCT/UTc4IwdD5X1W8yXEEK7KITjk0dkkTgKsXpOBVVke RnkQ== X-Gm-Message-State: AOJu0Yx7XqQ8LW/NNum3Q/21jWHubDRVn6Jk5b+y5IQcYWFhVYF76R9x 600JZH4NDnPtu7GLd87TkvNi0Q== X-Google-Smtp-Source: AGHT+IG8Djx4JuWJVyLLsX7GTZx/Z90GhcvS0/PHDUtbpa956vM7a80tabivENYoF3OufkxSEK/03g== X-Received: by 2002:a17:90b:388c:b0:268:afcf:3318 with SMTP id mu12-20020a17090b388c00b00268afcf3318mr8364453pjb.37.1692066042534; Mon, 14 Aug 2023 19:20:42 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id v20-20020a17090ac91400b0026b30377c14sm5883272pjt.6.2023.08.14.19.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 19:20:42 -0700 (PDT) Date: Mon, 14 Aug 2023 19:20:40 -0700 From: Stephen Hemminger To: okaya@kernel.org Cc: Harman Kalra , dev@dpdk.org Subject: Re: [PATCH v1 6/7] eal_interrupts: don't reinitialize threads Message-ID: <20230814192040.2b81965f@hermes.local> In-Reply-To: <20230815013826.1288972-7-okaya@kernel.org> References: <20230815013826.1288972-1-okaya@kernel.org> <20230815013826.1288972-7-okaya@kernel.org> 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 Mon, 14 Aug 2023 21:38:25 -0400 okaya@kernel.org wrote: > diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c > index d52ec8eb4c..aa296f153b 100644 > --- a/lib/eal/linux/eal_interrupts.c > +++ b/lib/eal/linux/eal_interrupts.c > @@ -1174,6 +1174,10 @@ int > rte_eal_intr_init(void) > { > int ret = 0; > + static int initialized = 0; > + > + if (initialized) > + return 0; > > /* init the global interrupt source head */ > TAILQ_INIT(&intr_sources); > @@ -1196,6 +1200,7 @@ rte_eal_intr_init(void) > "Failed to create thread for interrupt handling\n"); > } > > + initialized = true; If you want a bool, use a bool