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 3413845C57; Mon, 4 Nov 2024 04:13:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B40D3402AF; Mon, 4 Nov 2024 04:13:10 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2059.outbound.protection.outlook.com [40.107.93.59]) by mails.dpdk.org (Postfix) with ESMTP id 3E19E4021F for ; Mon, 4 Nov 2024 04:13:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tHh9rBlKEg3VCc4uP1y+Y5mr7csDQdwghdysvvjWLHX3z/YY3efq5YvuchesTP7sd5Z5GDBsncK4SdBIx4L9gahOgA6G4cN3B5gssaee7CjCSvftiz03OUzRQgfuokCAgPrQIjTfXVA+RsMeQE/YEGch7yrU8tnfEequ2w2euh0sAgku13CkHcIEiMaw31Nz3DkAxBln7aBlaZNthyYtMOt5tEHMewMOmjBZiY2DyJZ18dbqGdw/dMZfz2RPUT6DRkhzBql1SkPfeRn1v34SPlvzsbXFfMw8FMh7RTiVYwjuiEalhjIMLKHoYPaLPozJz5KDLHfGCCIhXgwvStsM+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=96VXXYB5j7Nr2DAcemHKUsFpcN6LkFMlUH/5Nr6AflA=; b=lYhz9nO4ibpvxVS+FJzaZpmQykyucbSvhUdpoS4qfmLVaipggP5DPr2g/54/zE8sttxVCLOUDltOcTSvERj61wGZVdSgiM2z2qjITVFFOtwFRDPE8/c32CFnnM078ajrKsrF/h97xp9UFF111KYct5CwuQCn9NWTXKNyACBwZWS4Xqxate9uOZKT7BskcH/d+qL8KVKvlAPKc3NyzANMFmIN1JDFwRh2WaJDYia0QL354K1us/g6lJVViNAmBEF+d/kZKr6IAsISgPcYkD6XaBBhQFP4ivp8OJlNl29UxiYr8MPy5D0fRuNPEHYx+ZJuCtjutfQLvcGPMlpqHi8iog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=96VXXYB5j7Nr2DAcemHKUsFpcN6LkFMlUH/5Nr6AflA=; b=FGOlQNS7DtdvOSW+MWgrjOHDO14RAiiNJe7m9QOGyfAc770buOzGi0IqI4d6Hr7OEt6WznkPOnuA6UvJ/FDz+ZA81wHAgbfMoqGS2u3+93bs9OlODjydMyaCzzoa5prvm5IplMpZtAD5FiWi2Ynpb4aDL8U9UwISRCdULb72BN0= Received: from PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) by SJ2PR12MB9192.namprd12.prod.outlook.com (2603:10b6:a03:55d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:13:05 +0000 Received: from PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069]) by PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069%6]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:13:05 +0000 From: "Varghese, Vipin" To: Stephen Hemminger CC: "dev@dpdk.org" , "roretzla@linux.microsoft.com" , "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , "dmitry.kozliuk@gmail.com" , "jerinj@marvell.com" , "ruifeng.wang@arm.com" , "mattias.ronnblom@ericsson.com" , "anatoly.burakov@intel.com" , "Yigit, Ferruh" , "honnappa.nagarahalli@arm.com" , "wathsala.vithanage@arm.com" , "konstantin.ananyev@huawei.com" Subject: RE: [RFC v3 1/3] eal/lcore: add topology based functions Thread-Topic: [RFC v3 1/3] eal/lcore: add topology based functions Thread-Index: AQHbKo7TkSe1qp6krEGG1fG5vPPPL7KfcCKAgAcIxJA= Date: Mon, 4 Nov 2024 03:13:04 +0000 Message-ID: References: <20241030054133.520-1-vipin.varghese@amd.com> <20241030054133.520-2-vipin.varghese@amd.com> <20241030084437.24fe8265@hermes.local> In-Reply-To: <20241030084437.24fe8265@hermes.local> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_ActionId=22465f71-315d-417d-ae2e-85ee765351ec; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_ContentBits=0; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_Enabled=true; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_Method=Privileged; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_Name=Third Party_New; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_SetDate=2024-11-04T03:10:02Z; MSIP_Label_7ab537de-9a15-4e91-8150-78a9f873b18c_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR12MB8596:EE_|SJ2PR12MB9192:EE_ x-ms-office365-filtering-correlation-id: 8d218044-67ea-4a27-4155-08dcfc7e9971 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|7416014|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?3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aLYV7DHDbIFhtqjIr?= =?us-ascii?Q?IATc/+UEWZM4koS8wLHrxdwNoNtjnm6aFjchsqcDmj2PgMNNo61YbZc+NjmN?= =?us-ascii?Q?8FcfKAmhA1wHDwzZiNHO2pG+Dk1qLvwllLHGMDh9+W/SSLXS7CTjrfwnPjr9?= =?us-ascii?Q?FvwK/aywCxksTuVlwcFLiIFjb4DH4F4bXhTWUoScwUUxltSysko4i86fQKsu?= =?us-ascii?Q?AXqiX0OCxFayHU2mWl0A9DOlATv8RrWp70LOLE0lFoVyFygiwZoyOZ4bDCvJ?= =?us-ascii?Q?v6s9ScrXe7DZU+Q3tap+j4Ge27iK5pPPvKxBYM5wd6UOv/KnjUs5aLnFjuic?= =?us-ascii?Q?/GBa5DvHEiT2JfgMq2NnRlsoX/vh4gjugqW++mSJB/UdZiRtq6fdMSHnHLc9?= =?us-ascii?Q?eN+QWU+eAoSwNvOFgfJ8m43OtmZtMjjC3ZDXxY4z5rcgwKm+Kv/x8ta+RKYQ?= =?us-ascii?Q?nTE8mgOxCTxSYN1BTTEIFn5L6OBGaF9xJGXCqZCTNBLCK7CYvffkEoqoBtuq?= =?us-ascii?Q?QK0s05k=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR12MB8596.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(7416014)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3j95c5f+CnlrVNldHJ40QeYUsDACVNtvCeKHJDCbbWKeDyyY9ZhCyO33msO3?= =?us-ascii?Q?RTPApHN/E5v5yK16QbXXhcN5pmLSCoFort8L/H18IujSyfbXnEpALZAuhh2B?= =?us-ascii?Q?VX24LjEHSMtYcOIOYmRnmkV8Qoj0urL+sJ+rF6pnf1ZTCfUpzWLF10Z/5k3n?= =?us-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7PfNVSxoMi1U99?= =?us-ascii?Q?CIzlu2beZUA4NueyY6hwdK2aFvwARTrcAS6iMP8nK7DHnDkAMe5ARBglh9/U?= =?us-ascii?Q?wil003ZbZFHbKEl5L76afNBF1eg8Xjq4WqUtMTKTf+CvQCdanE0Mm9Gjpgo0?= =?us-ascii?Q?HbmZgE4Cvv3GUestjo85AhvWKdAjll9OKYKmAvrnEnepGSjsAQLxfequzeH0?= =?us-ascii?Q?CU5cjMjMOJc8Rrj1r4Kde9jbnThc5k5Q0H8hANrGJ8DCOad1K3cGCGj5m8Iu?= =?us-ascii?Q?fx/PqythmdOae8DE6SbW2Zo4N9wi/0ey2jaS+QMBuGHEl/XPPF7Sb/szhfl7?= =?us-ascii?Q?O3p3hTf/rKs+04vXMt0B6IU5XoPr9PsEJE5uqvi+4Unb+/pvN00Tsv5qrY8k?= =?us-ascii?Q?sEZBopT9vQ8UZfLu8lwNVV+SiI3pPcICXQSiLBX2vOD109QOa/Imao2a98Q0?= =?us-ascii?Q?2detFXOzpe9hDFh270VOpoi48N2EeGaAxH/Pn1gNsGA95U1M9I/9eawQp9ay?= =?us-ascii?Q?D+5MS94ht3r9XnnwgHg=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB8596.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d218044-67ea-4a27-4155-08dcfc7e9971 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2024 03:13:04.9931 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Px9ToctadMYTzhbBoT/3NSI3kQ0n/HkixONY0D2JWBoWY0lsNEorY62VNI97VUQaTnXxf4rgdPBrJxI5vl0kug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9192 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 Snipped >=20 > On Wed, 30 Oct 2024 11:11:31 +0530 > Vipin Varghese wrote: >=20 > > + if (topo_cnfg.io) { > > + free(topo_cnfg.io); > > + topo_cnfg.io =3D NULL; > > + } >=20 > No need to check for NULL before calling free. Thank you Stepehen on this, the reason why we specifically added to address= 2 scenarios 1. as pointed out by Wathsala where System Level Cache will be disabled; w= here L3 will be not available at all 2. for version where hwloc does not detect the specific cache level. By checking the NULL we can avoid such cases. Note: I will recheck and add|remove this in v4