From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0048.outbound.protection.outlook.com [104.47.41.48]) by dpdk.org (Postfix) with ESMTP id DCC061E20 for ; Wed, 5 Apr 2017 09:14:45 +0200 (CEST) Received: from DM5PR03CA0040.namprd03.prod.outlook.com (10.174.189.157) by BL2PR03MB385.namprd03.prod.outlook.com (10.141.91.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Wed, 5 Apr 2017 07:14:42 +0000 Received: from BN1BFFO11FD006.protection.gbl (2a01:111:f400:7c10::1:195) by DM5PR03CA0040.outlook.office365.com (2603:10b6:4:3b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10 via Frontend Transport; Wed, 5 Apr 2017 07:14:42 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none; caviumnetworks.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD006.mail.protection.outlook.com (10.58.144.69) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1005.5 via Frontend Transport; Wed, 5 Apr 2017 07:14:41 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v357EcZF003968; Wed, 5 Apr 2017 00:14:39 -0700 To: santosh References: <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> <1491285429-1114-1-git-send-email-hemant.agrawal@nxp.com> <1491285429-1114-2-git-send-email-hemant.agrawal@nxp.com> CC: Hemant Agrawal , , From: Shreyansh Jain Message-ID: Date: Wed, 5 Apr 2017 12:51:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131358500818420965; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(377454003)(24454002)(9170700003)(6916009)(2950100002)(50466002)(6666003)(93886004)(4001350100001)(110136004)(54906002)(8656002)(65956001)(47776003)(64126003)(65806001)(229853002)(83506001)(230700001)(189998001)(23746002)(106466001)(36756003)(85426001)(105606002)(104016004)(31686004)(8676002)(65826007)(8936002)(305945005)(76176999)(356003)(81166006)(54356999)(50986999)(38730400002)(2906002)(4326008)(86362001)(5660300001)(77096006)(33646002)(31696002)(53936002)(6246003)(575784001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB385; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD006; 1:izIUfwE2R8lBOAcW7mT18yiOLd6plFXwD6yA0XZVkaAoYytVqq/OOWyMgW8yk7hNZyXKTGX2dSR/64iPJJKtzCefNp2Y3vFDEpSo6kIPUHrh11mRsWagV8Xt/qF5PUmiH7JFudgyTBW7uUVQzDplKk4jPuyXiJPoSVaF1Zhv1dCu+ZVQ3pHrYGfuI6ZeHEKClKUffBVTd/uc9N08lyMipYZtqaP9CYit83JqAXKyrhdq5FCBYV5b5+DG8CiNvj4yMzAhrJeCeLFhZkv3Ftm32GGTsTDEiaNs5DIVM7dY95tMkQXx8pALMxg4/C3jnO7a+ZniJamjhg7snQ5A0s57hlKV1sUBBHXpi+akG01qbC1kOpgwRiPVLYMQFWWSjvC01XmLMs/SGHBReZ0LDwiArav2JI0t9UoOmLiLPaMYIZ8KqyEDb3l0WNiivI/mPvuEzt46rUzSJkrXUWO12l9hP3kwrzH/jSfd7Fuk/OVAHpkBKAe1VOfgLu8GXobyPH5VE0MCG7GxEj1nHCcgVaKFQwQxypfaAE5HnWFOkZapQ+oMAGHB/QmK4HSygnD+ryaF0aSeByms5T6J9nFGZcnYfge9CRQnosF/aa2LR/ZKWPA= X-MS-Office365-Filtering-Correlation-Id: d6cb6ab2-d1cd-4abc-79ed-08d47bf36de6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BL2PR03MB385; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB385; 3:RgHs58NOF7onTRrLe6BnUr3cPBErkXbFTbPNirBL6qJuA5x7fk0yXeMBufoyuuJGEezmAwcnKsvN6/o4J87w/6mZTFZFP0AAp+ixO2DE79y4EWlpHp8RIFKAprGimkXjOX4RgKiqAuRm7a6qTkj49eVVG7EEmWHlX4+Gs75keMOS4CawID9jc03xkiZFJXQviDJRmggTpWLaBr4UfAwWsDFN6hg+dPHAVVvV3GYC0T8X805GIRqMPops/7e/jNCGJ7BTD5Lp4rrfOOM7kuDWlarptR0bhdl3nOnu6L2o6OTHRu8yfCSJ308Z9vmf3Et210/v/JOltR70jDVSD8t1GhTdy4aU9EvihHq2sXe9vsRWNj6EKXl65p1+VHipXLGc9rHWseqwEw038JwNKqjTcYymL1vJZ5B3mjaTryWAAhqF/6LU2aFI9F+izgLOiGDh; 25:lg0UTBqs2DZ9WPHcFQWptLjBXz8WD09UEIjvuo8/XZtgdfUlqdzRYTp3zIfZxagFKMk2+fDg7+HH+QuqP104H0Videi7HDUBZFkAA1aHtR04E9W7SWDMW58Nv+ibq7gkGz/ssZ3gzFo091bfOG7frOJ7gBIQ8JlpJzIpmX2zkTBp0gkY/AtZDn3XwiDgFctqTFwGu32mr0NnyQIQlD/ykL6Vz7cf55ysbnpp3MCF3+uxs+kM+2bFLHXWAVOWBQScm+7iFwMXzP07P9P26Cw0gV42hKyooqNrP9nMLoB29Rbd9U72SUDTwf1K23eZX1C/v5PYGykxCLLNOB7pTvcPtcjSE/1lJhFyY5EnY7J0nwgGWCvj/C0sUdGE8UYi6QeeQqL6mNBk6wrxgi6hsivjVNIXjmv4mRXBnyRJTNffwZnZ7vFceHveyPcvq6CJghiDFgwBPSTHMpwjhmb8eV0LPA== X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB385; 31:bsEZHsh7M2Bja508wtmcLXhe1nwo8lbwDntF/cqsw76y9hDw0yA24DMiNIF9PppEN3C9pfLtDWDAjnn4DxksyOrSldeN5IGjyCWcP/Jpz8+0L94+Bofjtj6TS86pU0qex4vlanrdKkDUxsy3B4cIMld1ukORRCZYfJagUiEn7WsJUVkadH/okNWqAb1HrmB8ZT5IoCqIlKdJfDqkICaBo0dXymiLgskIcoyeiBJrcYYEScFFZ2ANr1kbV5FwbpeZAkXzZQqNh8XEgnN5WwlUCg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(13017025)(5005006)(8121501046)(13024025)(13018025)(13023025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123563025)(20161123556025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259075)(20161123565025); SRVR:BL2PR03MB385; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB385; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB385; 4:edY1ozlKB1aifxHIa5aKsufNZhBfKTii5YxYKtWCWxc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uc?= =?Windows-1252?Q?0yjHR35lg6IwRikAqh2ZFnZocoy+AL586O3dIqjyCBmnWA95BEy2YzOg?= =?Windows-1252?Q?wTeL283um91Omwpwf4xw+/MK8Rn2EGIxXltUItv4oBx3hg1ziJIcdQYs?= =?Windows-1252?Q?aLOMdODqWZYZrw/9ntDchqidLL0vylcnNl4LI/T4A4K5af9IGhkUEKki?= =?Windows-1252?Q?uhk779aRyC+C0SkTx3ECpZLWnXoxlIPRUTPt+8TAR5QsznqdSOLHl64Z?= =?Windows-1252?Q?1tpN5crGaqcucSUZ0W4kX1K2AxJ8LobFYfHfkkV+UXNZeXVHSi4STJ18?= =?Windows-1252?Q?jDv19bxQiiVci6vbBIHvSvbGY0A7RG/f3Qs+D+KfXtHMLWzJlxm2YzT3?= =?Windows-1252?Q?/1i4PpvLoZdLFv6xRBeODlkmp0sBoP8fq47QgmMhURFuTy/lE1QteCx/?= =?Windows-1252?Q?vfGXS4BroPgh+JI9mJG+piSjdyb9+dBQfjzana7JpKIaiIxuW79a8slZ?= =?Windows-1252?Q?ScQMj/GLddF5d5eYs50wd/j9GT5WcpNa6MZIY1RWaVbEQ6NtG8k9X+8g?= =?Windows-1252?Q?9GoAa6MPstfzsnkzMUjKYpz0nUo50hT7slxRggZUzHR1pv4jiSMUvn67?= =?Windows-1252?Q?PT9FHl0uyJRQgyl/UD01Tiurs0gX15Frm/0cnhcKkfUDbO3l94U2EjTL?= =?Windows-1252?Q?fvqcOD60FB6IsDmKy4mDmbRdohLVdRAPP0QhRJrrWgnTlF3e37BsM8Vy?= =?Windows-1252?Q?s3sNXAQZS1IrxKgFerMWZ/uXVfblTxPVAH4fiOFgcIw8Rn9MzkA+0XJJ?= =?Windows-1252?Q?uNElA9At/E1y8STfqathfrdxpJoC13xUY2bqYjo6c08WSCCHXc0Cq4c6?= =?Windows-1252?Q?O38GT9LzEXGRNJnx0Q+yIXPQ/9LLgtoQMjepTHZXR8P3agz30/z9Hw0D?= =?Windows-1252?Q?UBqm+dlHIZe5LEunXr1rMiWMQFQHRnFA2IXpdWRNa4V9wygvR9HRTLBf?= =?Windows-1252?Q?FHhIa79ZfU3s+g+UmFoDvMVvi2pH+inhb3E4xCLu/TdNuAVZOMbV+KFY?= =?Windows-1252?Q?7F8ZqNuU13uX43DwhOQONBQ/lFBp6OjIxrO9c2whsUa3hKH6KdiEwOTz?= =?Windows-1252?Q?BlhKVrejx6B1ZkHFutc3PgSwa3TbYMhLPd7DxusOYBoahOGgUiyFqGvH?= =?Windows-1252?Q?o0hSozVKN68gzJlacmliNUHj1wBIPee5/HjdVQmR9leEL1+UUCol0oCM?= =?Windows-1252?Q?1hMuNOsEgg7IQg1AYCJN4oHwGsyjBRem32lIQxRLNW4v5Mo2UKw9Z5L5?= =?Windows-1252?Q?i7IOtVEwNkSJOjLp1J58rtAxqEOGnEXnsKnKCBnQ0CyJoCcanZGjgfhU?= =?Windows-1252?Q?9Te6e1V5J6ujqWawlw4sDxP7VRAOiB5+HekkKmdIYU2CoHn8EuKp9Gkf?= =?Windows-1252?Q?g9DsGsz4UQvCM6nmMs4kMXzZF9JfNUKYgH9n1/cfJjaHm1EUf0XsOLnE?= =?Windows-1252?Q?IGh3s2O9r0phRswiSq5A00KzAkCbysLlX62Fo62w6ahW8koldeFMrcNq?= =?Windows-1252?Q?q9AUWfSwiG/nn4xrGM/5g=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB385; 6:sMfm9Oih5WZUbbYK/9svyyR3HetBY23RuQ3AcZHP69m5ZidmePTTIREHW/ol2jj9hC9NbATXshTD4gTt1mPmfotrna8orDxFgoHm6iSu2lY1Q/Qnw+tBnXtqLt9srsdl1j0nASyQO7lSCRg7MocnUL1rWnKVe4+Ffc8reuvEWhyqr6HRvq3rVTsdsl0slZIgKrH92vscO61NdItn/tSPJh/lLZWyXLUsAi/43LchkqJC5M3gU+FEZNssCN4+roQE3xXY6tkGb4oyICF752D0tj9cpcmnSAySgN2ZL4jgvQS9pjDFdW3cYKILyzg90SjP4QqfdX/Ti5i0OnMUXDBnKn7hYNSoVsmEybS6XdexBP2vN+/j/EL8idPBDj0M1rS0niAseaePc8dtj6goMJ6wPQ==; 5:kjNtYvdHCAR98C8mayzvUcy4xGaBjiQsnjgo7ClQmuP5+KZWSRaNbOZPV7dn5CJz3d8aySZ8iiIzovCODRBPbezFzhgX95x0D2Zf4ET1m29FrMZjwqglfmJhHR8EuZssfrW8D4SodtsAherKy6AZTrMuNU7XG463ODnGXqMHqrNXGTfzBhWmckOq+Y139ben; 24:3rp5NP3ko8YpFYJSNN2VWTOi+d6+5yy9U5bcAeIssfHFX7rNjLLUmevYRIFpXKIlrleHMPHjck9BbLMEovsgh5RJCx3y/CPV6olFiLhGRls= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB385; 7:uWyEN9QjW+uPYMZrCyvksmnFD1a4CKF49V4PX2zzb0hxt7xutNZvQwhzjak/HD4P/KDENXRrfzE0RYEFwC2DY2bqw3hBYDTgSKyaoju/YoeKlO7QmoONy6bfAKxId4x8eSxJc3BayUv5lv0u44f3ogCbBLwfDjQGSRBdq4yK4Ej4p5+NMKaG7V2X1BpguSzjVb1rK69SxSSD45nUOxhmejjN6PRWTfuKAVCRbihpPASt5QVE9ZNFlhihBGuodVsrlV2il5D6woUvKGGQ+5vQOYWPNlECX3XaVYZoKExXcF1D7wYT7YEBmpQAZch07gFpbYo6lkaqRkdGf8mPAfWj4w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 07:14:41.4988 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB385 Subject: Re: [dpdk-dev] [PATCH v3 2/2] test/test: support default mempool autotest 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: Wed, 05 Apr 2017 07:14:46 -0000 Hi Santosh, On Wednesday 05 April 2017 12:32 PM, santosh wrote: > On Tuesday 04 April 2017 11:27 AM, Hemant Agrawal wrote: > >> From: Shreyansh Jain >> >> Mempool test currently supports: >> * ring_mp_mc >> * stack >> >> Adding a new default pool options. So, ring* + stack + default >> (which can be 'stack' or 'ring') >> * This way, whatever the value of RTE_MBUF_DEFAULT_MEMPOOL_OPS is set, >> it would be verified. >> * even if that means duplicating some test (for example when "stack" is >> set as default and it already part of standard test) >> >> Signed-off-by: Shreyansh Jain >> --- >> v3: fix the incorrect split >> v2: split the fix from change >> >> test/test/test_mempool.c | 30 ++++++++++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) >> >> diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c >> index 715b250..6f0ca84 100644 >> --- a/test/test/test_mempool.c >> +++ b/test/test/test_mempool.c >> @@ -513,6 +513,7 @@ static int test_mempool_single_consumer(void) >> struct rte_mempool *mp_cache = NULL; >> struct rte_mempool *mp_nocache = NULL; >> struct rte_mempool *mp_stack = NULL; >> + struct rte_mempool *default_pool = NULL; >> >> rte_atomic32_init(&synchro); >> >> @@ -562,6 +563,30 @@ static int test_mempool_single_consumer(void) >> } >> rte_mempool_obj_iter(mp_stack, my_obj_init, NULL); >> >> + /* Create a mempool based on Default handler, if not "stack" */ >> + printf("Testing %s mempool handler\n", >> + RTE_MBUF_DEFAULT_MEMPOOL_OPS); >> + default_pool = rte_mempool_create_empty("default_pool", >> + MEMPOOL_SIZE, >> + MEMPOOL_ELT_SIZE, >> + RTE_MEMPOOL_CACHE_MAX_SIZE, 0, >> + SOCKET_ID_ANY, 0); >> + >> + if (default_pool == NULL) { >> + printf("cannot allocate default mempool\n"); >> + goto err; >> + } >> + if (rte_mempool_set_ops_byname(default_pool, >> + RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) { >> + printf("cannot set default handler\n"); > > Few nits: > > printf("cannot allocate %s mempool\n", > RTE_MBUF_DEFAULT_MEMPOOL_OPS) Ok. I will change this. > >> + goto err; >> + } >> + if (rte_mempool_populate_default(default_pool) < 0) { >> + printf("cannot populate default mempool\n"); > > ditto.. ok > >> + goto err; >> + } >> + rte_mempool_obj_iter(default_pool, my_obj_init, NULL); >> + >> /* retrieve the mempool from its name */ >> if (rte_mempool_lookup("test_nocache") != mp_nocache) { >> printf("Cannot lookup mempool from its name\n"); >> @@ -606,6 +631,9 @@ static int test_mempool_single_consumer(void) >> if (test_mempool_basic(mp_stack, 1) < 0) >> goto err; >> >> + if (test_mempool_basic(default_pool, 1) < 0) >> + goto err; >> + >> rte_mempool_list_dump(stdout); >> >> ret = 0; >> @@ -614,6 +642,8 @@ static int test_mempool_single_consumer(void) >> rte_mempool_free(mp_nocache); >> rte_mempool_free(mp_cache); >> rte_mempool_free(mp_stack); >> + rte_mempool_free(default_pool); >> + > > Rest looks okay to me: > Reviewed-by: Santosh Shukla Thanks. I will send v4 of this. > >> return ret; >> } >> > >