From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-120.mimecast.com (us-smtp-delivery-120.mimecast.com [216.205.24.120]) by dpdk.org (Postfix) with ESMTP id E7A3B2B9E for ; Thu, 5 Oct 2017 07:56:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parallelwirelessnh.onmicrosoft.com; s=selector1-parallelwireless-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1QV8W+nkIHYSdjIWA4IJ4JcXdHCBJveKSOUeSl6BdJQ=; b=Irkb7YEKwEAm41jvC/x8dPagMyfFDQ2MibibLEpfnRWmidQPIjvKiCzWPrMzwLXHdBSgPiqqBCmGAlhReKQYzFswguj6Q6txk3dAtarCXtgkuhSJGVgDtNKOsj2CW64xGbs12eD5MrX+0ve5XnWpQhvKu7KJBvXDXInxrVKyLjk= Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03lp0021.outbound.protection.outlook.com [207.46.163.21]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-41-3V9rjnweMS64CT0FH-rTuQ-1; Thu, 05 Oct 2017 01:56:47 -0400 Received: from DM5PR19MB0939.namprd19.prod.outlook.com (10.168.119.141) by DM5PR19MB0940.namprd19.prod.outlook.com (10.168.119.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 05:56:45 +0000 Received: from DM5PR19MB0939.namprd19.prod.outlook.com ([10.168.119.141]) by DM5PR19MB0939.namprd19.prod.outlook.com ([10.168.119.141]) with mapi id 15.20.0077.018; Thu, 5 Oct 2017 05:56:45 +0000 From: Venumadhav Josyula To: "dev@dpdk.org" CC: Venumadhav Josyula Thread-Topic: API in dpdk to get total free physical memory Thread-Index: AdM9nqZ0k+dT6QH/RH6KIolrLmZ8sw== Date: Thu, 5 Oct 2017 05:56:44 +0000 Message-ID: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.141.235.254] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR19MB0940; 6:lfX0DeJDDMnn6jqjrllubygXhBWlfUYCmQ0AhNnYQrVD0/HI/5ir4IKtofyvJx2lmOYvuvbm8nkFBNEpTCjkYQQUqw/fXrz2h1x2hJWo4cc32vn5nhfU9X+07RSh2ky9GkcT7yT4qJtwbX/pJUFlynfFzRRirhwYobJqzmdv3kJZISccBkjkNIn1QqxRv+zDM4hGSVyByPgwoCzvmvoYJfPaTYPEBTcu9AmvICKjokeW/5jozUPE9pTvIdU9WEJZNxAYbETyCx3OHQwMod5hgdeC2IH+Kp6dE1/3w1FNIQQeVZ41Lh9/oqKhIKDuM4AmjBmKo/s9kVLrzBNcHWNb0g==; 5:zJSxvWOqmxxgKj+iYMkwSAD8jNdXeV+0zi0Rkzj04QV6KfLjoDEVWMo3+VKA0A2Hrb2xqkzut8dYrBByX3Yj7CxUyReZDnHWPZkwsMQDZmUT72WdeoE4l8EiqUcJGVkmewC3fBrMjts/tSvaKX4Tbg==; 24:uN6uDNYAswdB2a6AvBD6dxKnSk46ZsIB/sQY+HMerBJV5/+jUSA2NtIWylXMhNK9+kahSPq4gZ5HZiyf1QIYpkMyxbFDsJ+WzW6oWtCPWqo=; 7:m9X3nF6Pq+bqUv9J3LUUngein+ZL88C878Xr8+qbD3vhjrOWONoqCcFUtCHK8GQTDMjpyTgCxHrCTqMgVGbOf2uppumCDw1pPxPjXPH5gu2Q0/o4qqvG5ZyJQR+GkQtRx69QGwMWgiDQPIqXqO/+C1QXWSFRXJ9HknRavUXVlGvGFg7CY2Z9ePQD2TyyzkKYgo7FlRUJmLbsX/WqlxoeOpgpmKTOnj5TjzQQsdVsdMo= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39830400002)(53754006)(189002)(199003)(9686003)(189998001)(6116002)(54896002)(6306002)(25786009)(2900100001)(74316002)(55016002)(99286003)(2351001)(4326008)(316002)(53936002)(6506006)(86362001)(6916009)(5630700001)(97736004)(107886003)(3846002)(7736002)(9326002)(7696004)(54356999)(50986999)(14454004)(68736007)(6436002)(102836003)(2501003)(790700001)(106356001)(81156014)(5660300001)(33656002)(8936002)(478600001)(8676002)(1730700003)(77096006)(105586002)(81166006)(3660700001)(5640700003)(3280700002)(66066001)(101416001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR19MB0940; H:DM5PR19MB0939.namprd19.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 8cbaa62a-2866-4c69-d653-08d50bb5dbf8 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR19MB0940; x-ms-traffictypediagnostic: DM5PR19MB0940: x-exchange-antispam-report-test: UriScan:(21748063052155); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR19MB0940; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR19MB0940; x-forefront-prvs: 04519BA941 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: parallelwireless.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2017 05:56:44.9203 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 991bd471-bf03-47c4-af97-0c3362264c70 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR19MB0940 X-MC-Unique: 3V9rjnweMS64CT0FH-rTuQ-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] API in dpdk to get total free physical memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 05:56:50 -0000 Hi All, Like 'rte_eal_get_physmem_size' api to the total size of the physical memor= y. Is there an API to get to get total free memory physical memory availabl= e ? We want such API we are planning to implement such API for the same /* get the total size of memory */ uint64_t rte_eal_get_physmem_free(int socket_id) { const struct rte_mem_config *mcfg; unsigned i =3D 0; uint64_t total_len =3D 0; /* get pointer to global configuration */ mcfg =3D rte_eal_get_configuration()->mem_config; for (i=3D0; ifree_memseg[i].addr =3D=3D NULL) break; if (mcfg->free_memseg[i].len =3D=3D 0) continue; /* bad socket ID */ if (socket_id !=3D SOCKET_ID_ANY && mcfg->free_memseg[i].socket_id !=3D SOC= KET_ID_ANY && socket_id !=3D mcfg->free_memseg[i].soc= ket_id) continue; total_len +=3D mcfg->free_memseg[i].len; } return total_len; } Thanks, Regards Venu