From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by dpdk.org (Postfix) with ESMTP id 62A574CC0 for ; Thu, 8 Mar 2018 22:36:43 +0100 (CET) Received: by mail-lf0-f44.google.com with SMTP id y19-v6so10414515lfd.4 for ; Thu, 08 Mar 2018 13:36:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7smQJCrkbA0OEQ4K95DkPlhGCedRvEShd6zAhFlbGuc=; b=YVWqCZjwSCML+dbfNV1MMym41a5RN21qLfyu/Dh0kJx4sHkUVYLgFBPbJ/zcb6lMgK z/7IqBCMAZ7GNSurmWZw4Az5PCbyQXra7ODcn/m3QCnshc72L9IsMGQ/P7C/2P1LdElH E0k9MR4kAuu9NcxRKzvbdsobgpURcsRXkyUA+t+V0vGbHLzNgtwB2H00dPdF02U/zVH8 Di4/edS8o13qHHR6r5A//uKwqen4rfWMhht2PyMM3h/7zdaxXsH2oD801Iw5mUvlGPGt rUwtxk9paaZTyRWtelxInVtNx3ROouxqpmlWY7ee9fyHf2cVNm8mvzea9PAqmE8JbJG2 vjug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7smQJCrkbA0OEQ4K95DkPlhGCedRvEShd6zAhFlbGuc=; b=DyvVnkzV3B+HKHtRnwYFIEYDGh4EYJ5mXQ88sFZ2Bg5VHWN7ssFTS8B6NtxO9FNre1 IXhiYgkROmUVeh6pS6gSd+o5bVlKBqzRf6tMAsX1GxK5xXpuHcWeKVfWpG+YOB7Dny07 xXGqlegGALAb3BvScRrONcV9OpOw365BYpVc02hTzU/mIsXfv0kXz5J6ywyKEnfE7Iq/ GUktUYk4q23Cjr+s5R5Drc2MqSH+w5zHfnf6exjVoaKFvVC+NHyCOW91jMhhYNO+/H+Q PN+S3edFdxiZ6BNaYgRLwEyoOYP0oQnsz417Lsja73VMyCytuhkxm6qWd0WaXJntP1OY N9qA== X-Gm-Message-State: AElRT7Fcf6hzIKa8aaWmmeZRZpprpd5zd7MdQ3q9C7kVW1y/8SiYVrAt II4MHevhVS7oJ/oTrOjyzPmnUh+rNm5KWVNhOEc= X-Google-Smtp-Source: AG47ELtpogTVRXoqfZTLlh2GHeogGVERLi4QJ4FVMNB3U0M2zvIWvEgeWC3dYvJcDAF/QEl0PE9GzmVdULG+76josWQ= X-Received: by 10.46.117.12 with SMTP id q12mr20697269ljc.65.1520545002505; Thu, 08 Mar 2018 13:36:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.126.7 with HTTP; Thu, 8 Mar 2018 13:36:41 -0800 (PST) Received: by 10.46.126.7 with HTTP; Thu, 8 Mar 2018 13:36:41 -0800 (PST) From: Venumadhav Josyula Date: Fri, 9 Mar 2018 03:06:41 +0530 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" 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, 08 Mar 2018 21:36:43 -0000 Hi All, Like =E2=80=98rte_eal_get_physmem_size=E2=80=99 api to the total size of th= e physical memory. Is there an API to get to get total free memory physical memory available ? 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 SOCKET_ID_ANY && socket_id !=3D mcfg->free_memseg[i].socket_id) continue; total_len +=3D mcfg->free_memseg[i].len; } return total_len; } Thanks, Regards Venu