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 0395EA0C40; Wed, 4 Aug 2021 22:40:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DC4A4014F; Wed, 4 Aug 2021 22:40:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 6649340143; Wed, 4 Aug 2021 22:40:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10066"; a="275060195" X-IronPort-AV: E=Sophos;i="5.84,295,1620716400"; d="scan'208";a="275060195" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 13:40:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,295,1620716400"; d="scan'208";a="441893114" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga007.fm.intel.com with ESMTP; 04 Aug 2021 13:40:28 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 4 Aug 2021 13:40:28 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 4 Aug 2021 13:40:27 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 4 Aug 2021 13:40:27 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 4 Aug 2021 13:40:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AY3zfGxGodJ81fDDr9Tiu9/L+q63RRXj5ZxcSLWk+3vvKgtyge5Y+7EGnTb43v5icYoVWxPC6aaPN/60xo8Wf+mcA+VRLTPPrE0E4AIhCRe04E3/MJqegfEoqfJ3Q29sX8Zul2ScupigFdmEUxlv6wDvtodW9F4tQeReU5M0sC0qJkbVXAxj8MjXOX1TVqUHr0nHjNy7HJb6d/dosd98V+alZlqCC1b1JDy+yf5wunzAPDuqEjwLgbX0vwb0Ux8EicqBJHsRaSHU628+CfJUTLLM535H0FyfX9thUafaKob2erovgbnTJGzTq6BEooubKg9Ot9yIxxerRhXbRAsNDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gz3fPj7L4nhHP6SkoCETTQF4xPl6T4pikXoaG933Nxw=; b=ErGy51quZs1LJeRiDvy/koFE4yyKmP/ZgJ2CSuNGAh8Z070NDMSOwPpyBUnnmFwsTQvhWJPMTgYbaIE0wBCmOcVDDhZItfCadIh6jIT4RFg/uLalbAcuiLog1bLHB2YEr/bp6K3FrRkZlDQEX4dS8+Q5+l0yz7U8+gPaiZUNlTZZZJhmCWeZeRuTZ/gXEncofaSO8TTRLxm/nu2KSYzDOyAlQvsdETGH6ZonrU8t7q2xGvYzCZa1at8380EG9QbIsFOYo0ZjIJU6TNPdMFxF1PSMMDy6tDuiGngutDc0K29hDKhQdAVCJMdED0kTcgOq4fmbP03f6pQu8rUo3VH/AA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gz3fPj7L4nhHP6SkoCETTQF4xPl6T4pikXoaG933Nxw=; b=zGeubSzIiQwKobVKiPw28wZfKfbb0qbUPS7/3TuozdQs4PwM0Gn9ZrVEDc24E/16lr4o90jrxRmNktkBZLIuE+k50GogGnVUKXjAUAeuBJ6lzGdeCpfPzLXgh0W1ifBhmJk6CPLJGWre7CQcLkclSr+wLUojnkMtwE5QaDIzV3w= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB4957.namprd11.prod.outlook.com (2603:10b6:a03:2df::21) by BYAPR11MB2869.namprd11.prod.outlook.com (2603:10b6:a02:c0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.23; Wed, 4 Aug 2021 20:40:27 +0000 Received: from SJ0PR11MB4957.namprd11.prod.outlook.com ([fe80::9c17:f616:cb42:b06d]) by SJ0PR11MB4957.namprd11.prod.outlook.com ([fe80::9c17:f616:cb42:b06d%6]) with mapi id 15.20.4308.027; Wed, 4 Aug 2021 20:40:27 +0000 To: Narcisa Ana Maria Vasile , , , , , , CC: Narcisa Vasile , References: <1624580843-4521-1-git-send-email-navasile@linux.microsoft.com> <1625018165-27103-1-git-send-email-navasile@linux.microsoft.com> From: "Kadam, Pallavi" Message-ID: <23dda118-b9ab-ccb1-7693-dd27e3b1b9c4@intel.com> Date: Wed, 4 Aug 2021 13:40:24 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 In-Reply-To: <1625018165-27103-1-git-send-email-navasile@linux.microsoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: MWHPR03CA0016.namprd03.prod.outlook.com (2603:10b6:300:117::26) To SJ0PR11MB4957.namprd11.prod.outlook.com (2603:10b6:a03:2df::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.12] (71.236.160.7) by MWHPR03CA0016.namprd03.prod.outlook.com (2603:10b6:300:117::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Wed, 4 Aug 2021 20:40:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2dfad519-6d26-4049-90ff-08d95788175d X-MS-TrafficTypeDiagnostic: BYAPR11MB2869: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0KVGl86KzV9BYJuy6c1H6oku7HqICSjhc5we9V8tD5Dbef//GRNUYexelUKZ9k6MW5tMY8gxSj+j66AI/rCjgB3T8FOrFndySUQlWtQMchV0mAbRyNwU8j2C0iaWvyEKIQdIkgjD9gh3d0INeiLn9TPzd3Y18Mfm28rWjVIR5QuKqc23LoUQYJrAFpSt8S5VaqDbmMGfNznLD21D/jQvA7koPqTwuKykuD2/qrGRZubf1jYfn/WHanQHtSVCndoEeEnLt5+tmUIu1KU/Kk0QdU60//H5+AAjZJYMxS1ZDH+/Lcp8NIwGyKkJeRDL7qEJJ2bT17QIgM1Bd1/NB7S9a1YM+uHIKUPx+KIlFKVaqZcyuIWIKR75L61OFEaGwOYviMAUNoXvFUoS7YPsUpjVKW1ztBRwLEeo2aAC04FVkU1+k0N10BGNnpOGrb5b5c4im0zMZIvqE/P5D/IT1nVpNd7aUIWyyAp47V2qcq3rTvhHnAltkRNY3kHnYhdXEPm3QUQkpeqRAjUY1FRKkPytoqJHrOuGE031mVaM8K5d9re26aKor7+Ns6be9rGjn1egwEf9Ky30xOozCtYjEILgRsj6oPFRzFoOLfce76nPz5P9EWCH9VyVE5BoICMSJgbHt8TULjDFxULWnoUq2f1CsSQVDXgPy8+1GGkIWerQI8jbJIMTR7htyPGz3IBB/RFOrDM7JqNPHcLx+FOngF6fdFsr50eh3uAlSxMb208QMx0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4957.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(396003)(346002)(39860400002)(366004)(316002)(2906002)(45080400002)(66556008)(26005)(6486002)(8936002)(8676002)(66476007)(16576012)(956004)(66946007)(2616005)(5660300002)(31686004)(31696002)(4326008)(86362001)(186003)(53546011)(38100700002)(36756003)(478600001)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q3gySkxLekJOZWIxL0E4Z0lQNTIvK0V5TmR5M3QydnhvNFVqVGxFZEQ5aEJM?= =?utf-8?B?Mk5OMDUyMkFYaW9oc1JhdGpZZy9YZ0FrNFBxMDFEdXFTTGxwaURzdzlJN1Fk?= =?utf-8?B?Wno3c202ZEFUdEs0U3lCV2hwOTZOaHlGU2NtREl4cjMycVpqOEpLdXhRWGhz?= =?utf-8?B?VEh6UXdlVlZtbkptbFNHOVovSkdrWTNsUmR1Um1MMW1VamJ3dGpFUm1FY3dx?= =?utf-8?B?K2ROMXN0WWlxa3h2cTVtdlJzeDRCUWJkQkQwUGFTdm9Fc1lWWEphenlqUzhD?= =?utf-8?B?V282cXFWb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3FF?= =?utf-8?B?ZURyRFZWcXp3U2MwbnlSaTJrK09qOXBXTHhyR3pnb1FmUU1PdWd6SXNnTy85?= =?utf-8?B?aTdLSzJpUnFtMlVzallzTjNTQkF1TTVKdHcyZ2RwNFZQL3lyVVplUmcwd240?= =?utf-8?B?bzgyK3dFL1RWMXlzTVlQcktXcGVvQkdCR3FlWnRXTWJnMW1qU0Y5RUs5dmZQ?= =?utf-8?B?d0hDeEo0ZnFpVlBUTGpTWGdMcFZCSFkxWGluWEpkTVNkOHoraTFFN3Y2UWU4?= =?utf-8?B?Ym9URU93UEJJUTl5RGFEMWJWbjFhbXA4eVdGZEd5QlZvYjhnTjZORFNQNG5i?= =?utf-8?B?UE9uNkRlT0E3Uk0vTW9mTEpnNWorU2JydklLMWFlVlN1eWJXbjJXRXJnR0NS?= =?utf-8?B?cXJTYnpNTmhsZWV1TkpjTUk0OFY0QlMzc01xTVc5RThZN3pQcGZrbktBOVFB?= =?utf-8?B?L25Bd1N0SXhmczJ6dHN5N25DaEhJU3ZQYkZNQ2RTQlZXN1h6ckJ0S0t6WExQ?= =?utf-8?B?d0NYZmw2Y043bWNaRkhOdVlKc2pEM3d1Mk4xTjk3UmpoT1p5WGF5VThobWxE?= =?utf-8?Q?kUJ8ojjlmdYSiDoeQ+286814qDXlrA/+0QKE25v?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2dfad519-6d26-4049-90ff-08d95788175d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4957.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2021 20:40:27.0385 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2Egqprv0XMZ6wPzjEFsbkM9ndJyzNBf1bprVUHH3NjWz8jKy3XfD9hnxkqt/ldq+941jnQ8RmTu3d49kGY665Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2869 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] eal/windows: ensure all enabled CPUs are counted 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 Sender: "dev" On 6/29/2021 6:56 PM, Narcisa Ana Maria Vasile wrote: > From: Narcisa Vasile > > rte_cpuset_t describes a set of CPUs by using an array of masks > named '_bits'. Each element in the '_bits' array represents > a bit mask, with each bit corresponding to a CPU. > The maximum number of CPUs is given by 'CPU_SETSIZE'. > The number of bit masks is computed using '_NUM_SETS(CPU_SETSIZE)'. > > count_cpu() should count the number of CPUs enabled in the set 's'. > Currently, it iterates through the number of masks in the > set 's', instead of iterating through all the bits in all the masks. > For example, if '_NUM_SETS(CPU_SETSIZE)' returns 2, > which means there are 2 bit masks: _bits[0] and _bits[1], > count_cpu() would only check if CPUs '0' and '1' are enabled. > The correct behavior is to iterate through all the CPUs in the set and > count the ones that are enabled. > > This patch fixes count_cpu() to ensure all the bits in all the masks > are checked to compute the correct number of CPUs enabled in 's'. > > Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") > Cc: pallavi.kadam@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Narcisa Vasile > --- Acked-by: Pallavi Kadam