From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30083.outbound.protection.outlook.com [40.107.3.83]) by dpdk.org (Postfix) with ESMTP id E5D003238 for ; Thu, 26 Apr 2018 04:19:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KbEYNafOyl/8SWKDL/mDyRRwCVVs8pvvhMzOwtuZdXY=; b=Wp7CHWn54+431sCLMbuaeqk1QFGIf+akkK07FjMTSyzevpmDxNTAT0+KJEWtioxAk453Kahsu2GpcSBWgBmTnQTU5U+3FBJNlp+46caTrGOoHDAcP/r6LiLm8tl0vue02jAVTbIamsAu6bBMYy77IAogqpnEna5GK56JJBpSmD4= Received: from AM4PR08MB0913.eurprd08.prod.outlook.com (10.166.133.135) by AM4PR08MB2628.eurprd08.prod.outlook.com (10.171.190.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Thu, 26 Apr 2018 02:19:51 +0000 Received: from AM4PR08MB0913.eurprd08.prod.outlook.com ([fe80::5c6b:4c21:c94d:930]) by AM4PR08MB0913.eurprd08.prod.outlook.com ([fe80::5c6b:4c21:c94d:930%4]) with mapi id 15.20.0715.018; Thu, 26 Apr 2018 02:19:51 +0000 From: Phil Yang To: Thomas Monjalon CC: "dev@dpdk.org" , nd , "anatoly.burakov@intel.com" , Herbert Guan Thread-Topic: [dpdk-dev] [PATCH] test/eal_flags: Optimize memory flags test Thread-Index: AQHTnvFC2HgThSH/Hkq5ERRFELTwtqQSMeQAgACTtwA= Date: Thu, 26 Apr 2018 02:19:50 +0000 Message-ID: References: <1517883698-12921-1-git-send-email-phil.yang@arm.com> <2533962.DYNjplGVFj@xps> In-Reply-To: <2533962.DYNjplGVFj@xps> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR08MB2628; 7:cnWF86FFGVwEObDDm5/kGxaBh8Yw8S1hu7oH1GkMTxR5iMvuWR2fOzcjzkOCKG6/O+FLnsnZxoGo7g76yc2jTzDfPdUA6GhWiHJeLbpN8b6axFWV8lFk9LVt1ybW5ypG67khBQIcdRaE/UYd6LYaxsRRD5OTRmZj27XofEk4fj2s/4g89hKSUddrHfT05i55Qn3rhA3vuQESN6alpCmBcI/V8/kgmrREsfRFXEzAhAFtuHUwKmExp9GyxawA/Dul x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR08MB2628; x-ms-traffictypediagnostic: AM4PR08MB2628: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:AM4PR08MB2628; BCL:0; PCL:0; RULEID:; SRVR:AM4PR08MB2628; x-forefront-prvs: 0654257CF5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(396003)(39380400002)(39860400002)(13464003)(189003)(199004)(106356001)(6436002)(105586002)(7736002)(2900100001)(229853002)(33656002)(53936002)(55016002)(8936002)(6916009)(81166006)(3846002)(2906002)(9686003)(5660300001)(478600001)(74316002)(81156014)(8676002)(6246003)(3280700002)(66066001)(25786009)(14454004)(97736004)(68736007)(72206003)(476003)(5250100002)(305945005)(76176011)(53546011)(54906003)(99286004)(7696005)(26005)(11346002)(186003)(6506007)(316002)(102836004)(486006)(55236004)(86362001)(4326008)(6116002)(3660700001)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB2628; H:AM4PR08MB0913.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: UWbHDx0DM7Zpv49bsWmRhS45HcBWMePjbfPx4jdVuaFoyI5lWo6XW9uYPf68eyEEW6t+iRz9B2WaxvEX7xppZf0CIUjYt41h6aHcD5pGeyvz4K7CVrCBbEIbExGSTrAUHNMw52vtBLHo8CpoMUzzPVuX3KiVWilEDuPTtaJbQkSNw4GX+15bhQ/mrtUb4W1O spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: b765c90e-8af9-4356-3271-08d5ab1c30ed X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b765c90e-8af9-4356-3271-08d5ab1c30ed X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2018 02:19:51.0167 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2628 Subject: Re: [dpdk-dev] [PATCH] test/eal_flags: Optimize memory flags test 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, 26 Apr 2018 02:19:53 -0000 Hi Thomas, That change just want to make sure below two buffers have enough space when= configure RTE_MAX_NUMA_NODES=3D1. /* construct an invalid socket mask with 2 megs on each socket plus * extra 2 megs on socket that doesn't exist on current system */ char invalid_socket_mem[SOCKET_MEM_STRLEN]; char buf[SOCKET_MEM_STRLEN];> /* to avoid copying string onto itself */ Thanks, Phil Yang > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, April 26, 2018 1:07 AM > To: Phil Yang > Cc: dev@dpdk.org; nd ; anatoly.burakov@intel.com; Herbert > Guan > Subject: Re: [dpdk-dev] [PATCH] test/eal_flags: Optimize memory flags tes= t >=20 > Hi, >=20 > Your patch has been forgotten for months. > Do not hesitate to ping if no reply. >=20 > I have a question below. >=20 > 06/02/2018 03:21, Phil Yang: > > --- a/test/test/test_eal_flags.c > > +++ b/test/test/test_eal_flags.c > > -#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10) > > +#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 20) >=20 > Why the above change? >=20 > > @@ -1138,10 +1138,11 @@ test_memory_flags(void) > > - int i, num_sockets =3D get_number_of_sockets(); > > + int i, num_sockets =3D RTE_MIN(get_number_of_sockets(), > > + RTE_MAX_NUMA_NODES); > > #endif > > > > - if (num_sockets <=3D 0 || num_sockets > RTE_MAX_NUMA_NODES) { > > + if (num_sockets <=3D 0) { > > printf("Error - cannot get number of sockets!\n"); > > return -1; > > } > > >=20 >=20 >=20 >=20