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 89390456A2; Wed, 24 Jul 2024 16:39:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CE554346F; Wed, 24 Jul 2024 16:39:40 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 720A143465 for ; Wed, 24 Jul 2024 16:39:35 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fc692abba4so17502315ad.2 for ; Wed, 24 Jul 2024 07:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1721831974; x=1722436774; darn=dpdk.org; 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=84L5Z7AZwKpfn3Gv5XTybKlXTH5vqjB/CZBmK+9syas=; b=ihAilgOZUUIPKKl2JCrQVjYUUHl8+jY3QZhp76/AE+UJ0xCU2ln9wYKHi9diYoDhQb 4/TYjscfMF8RrxNlaKglSjnRYNMfeNDFEMZvGkpkoorbUsRsCASmoNLi9AZchgB/TyjI uiV3NzWbbB0Av5ibcyzxMqEVyKhwW1RIFFlXaWWkAzAtzn8T3t6tQIqgZBhrM7ekERZV NOpoKCUDtmZF/CWi86GEdYzzhe6aWj1K6okrJGcreh1fPwis7nv0bZ/em8Ggn5ZpefFp JKPym+pLP0j+oLUswmWm8fMxaJ7JiNBJRVQ2MbK4eI/n3846KH0n4ZK6njVutO6cHkSn HyZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721831974; x=1722436774; 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=84L5Z7AZwKpfn3Gv5XTybKlXTH5vqjB/CZBmK+9syas=; b=DACV45OvDzlewc2Mv7w5GeM09g0+yCVSky29EauUBezSR4LYaYsN2Luki7sFRxA/h9 UwPU5ngBajnBqmnEGM5enX6kI5BLWyfI7rQA/W/LarK6lQJfESsxJ3pO4jXtBy3Iwc1p 7p7oLlwM91f8zmCkRhz8D4F+t5kSIuGlNs6C32EYgn5NrhHZzgGqdgKugNocmSpC+dcO 80Ym+51gPNEtP709CEv8PWyDW3Zl0wh7VT1A1Q1D4xBezLeRwVJH/QISILbe4rLHpWV4 juALUZI9WvBZjCH5PnPZv4Nr4D/UqDDq0TrO693NUM4/h8nCj8lOudPtxgYFxlM1Bcra 9Q9A== X-Forwarded-Encrypted: i=1; AJvYcCWLVW2taUBBfms4yUBpOYmxC7GKT6F+44NUDeOVdJEEyfHzVLHtF2t7Vax4JbmjOKl4Zi/8sSy6wX6dLsA= X-Gm-Message-State: AOJu0YyjLzllzlmVns7K9KMdh4SdQ+fQMeh1w4FriFjK6yZFKh7USF/c F2dbzZESfSUrmG+AuYQ7nlSpe6Uk1OglZMs9tylmeJJZtUA535lREdYR4G6/+lg= X-Google-Smtp-Source: AGHT+IGNv+ug8yoINYE54QVUASBkMjA9YK8z/trqcHVbApYg2zEppbQgO/OnJQEERomwqqHzrK9faw== X-Received: by 2002:a17:902:f707:b0:1fb:484a:d0 with SMTP id d9443c01a7336-1fdd558f9c6mr29014535ad.54.1721831974540; Wed, 24 Jul 2024 07:39:34 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f28ce51sm95491545ad.87.2024.07.24.07.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 07:39:34 -0700 (PDT) Date: Wed, 24 Jul 2024 07:39:32 -0700 From: Stephen Hemminger To: Sivaprasad Tummala Cc: , , , , , Subject: Re: [RFC PATCH 1/2] power: fix power library with --lcores Message-ID: <20240724073932.5395f8aa@hermes.local> In-Reply-To: <20240724130336.1076462-1-sivaprasad.tummala@amd.com> References: <20240724130336.1076462-1-sivaprasad.tummala@amd.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 Wed, 24 Jul 2024 13:03:35 +0000 Sivaprasad Tummala wrote: > + lcore_cpus = rte_lcore_cpuset(lcore_id); > + if (CPU_COUNT(&lcore_cpus) != 1) { > + POWER_LOG(ERR, "Power library doesn't support lcore %u mapping " > + "to %u cpus", lcore_id, CPU_COUNT(&lcore_cpus)); > + return -1; > + } > + for (cpu = 0; cpu < CPU_SETSIZE; cpu++) { > + if (CPU_ISSET(cpu, &lcore_cpus)) > + break; > + } You are copy and pasting the same code into multiple places which indicates it should be an API function.