From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0041.outbound.protection.outlook.com [104.47.34.41]) by dpdk.org (Postfix) with ESMTP id 201082FDD for ; Wed, 5 Apr 2017 11:29:33 +0200 (CEST) Received: from BN3PR03CA0086.namprd03.prod.outlook.com (10.167.1.174) by BLUPR03MB277.namprd03.prod.outlook.com (10.255.213.15) 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 09:29:32 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::114) by BN3PR03CA0086.outlook.office365.com (2a01:111:e400:7a4d::46) 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 09:29:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) 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 09:29:30 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v359TN1K028918; Wed, 5 Apr 2017 02:29:28 -0700 From: Shreyansh Jain To: CC: , , , Shreyansh Jain Date: Wed, 5 Apr 2017 15:05:34 +0530 Message-ID: <1491384934-5379-2-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491384934-5379-1-git-send-email-shreyansh.jain@nxp.com> References: <1491285429-1114-1-git-send-email-hemant.agrawal@nxp.com> <1491384934-5379-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131358581706332951; (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)(39450400003)(39410400002)(39400400002)(39860400002)(39850400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(76176999)(2950100002)(50986999)(86362001)(105606002)(2906002)(6666003)(77096006)(305945005)(106466001)(5003940100001)(104016004)(4326008)(5660300001)(50466002)(8936002)(36756003)(8676002)(54906002)(81166006)(110136004)(50226002)(189998001)(38730400002)(53936002)(33646002)(2351001)(8656002)(6916009)(356003)(47776003)(85426001)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB277; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD017; 1:nBiGTrEBk5+h28dAlfXDX1pZvb4Ea+R3FSJ+MUb5aZXT4dyJQXRvX1MRZd8XoOJMuzCgMXprPC/VT3wMvB7Nyk7ng3pC13QB1IXMMiOP+anooyZgTe9/Kc1siXjnORnf+AKz4NDMQelmFYwE3A4+wDlzKphwYGEIWAKq6PiXzGN47EVputJjIWgh6gbaz29bN47VOuR10W7GIQcCwlCx/aZpx6yCE3b9QeJI9EolOSeXl+yxOgtTY1/szl9El/n9xDTgcWzLTbW/CklSllAHJQMJSGJpSmRVe2xO0I61TaWCv4VYteR6kRXDZ1v6XAY/u2AvXrmD50UYL0OUQEzZYsCdhcIrwVU4g4L34L4fPa6Z3409ccPYkFSsFu9HQ7rlkTy1ZGXFGwX5Zt4ThxWV4OA3TTvIt8b/l515jjaTbv3NHULWWZPdhlAxYMuR+PpPGWQaNbNLHhXMhpfVbX/W487KXVtdMVPdHtkYlX4E3s7xY64/Qx1mnrL9j4+ZOdnEFVYP9YgzdvBUYtMTt4HAHAG/QmyyOxiEaJ7XjIiW1EuWEJgEHe55smRQyxQAP7/4V8HdNTta0KJOYdm6Q1s3VEhmyVPTwgw9f2grpox81Y1MYWNOVPhJ4aItezFGnokKil2RImeTJZqF0tAtP3f/fP0Q7wEYjLwxGzWyVsQ3OCXyf3Gczm53cKb3rZFDak43FtsMpCd34z1LxH7e2X0edqQqZWVKTuhf52aO6Ofed8lGbJGOJD/0g0Yf29TluqHJ MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 9b83cff4-a08c-4e26-b9b7-08d47c064342 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 3:a5lhvlzUpIvXPqxsOCDv50NTbOs/6iXYWDkP8hXaeuhxzY21BRbr9PJtii7YL0citRqgOcvMpP8d5kd0a8XRuyWRAirXalSNR3sitTBngeImu1tkmb0Pg4BhRRb+H/uxAJGY8rrTgADlYDqPH61roK4aG4MhBPTE2dRbjK8EWczOadCuiNVmIUNefzbrqD3FLWjfiTeW8IyjK3YRa9yo8SmpaLHQ7nFIGe1nc88n/0Fk1AhnWLG7sj4h375rl0apmv1X1Zg2v5qqgPgpB07tQRy8fHI8FakmmOzL75aYwdsgjz6OfFV2IkDXLhxhtGduI+WroaABJ6v0WAxy2D8pYIqxzGi3Ia8W7lj4m3yN+yUDe3GJtjxyVxccKLnuDHriqazAqBqs/PWdDXsLmn+/3p+VB6j7a36uPuSMy5EMjpJPuf4Uei0qDlHJbKka0nki; 25:4cTCf8BOntExQKttTeASp2bYogKj8DA80gsO6msGmk3Ty2qoomz/qlBpreaO7cs1WIETYGe11T0dLabuUx966SofUyv8jP3I4EgUV0y+feAeycz8+EtITzNS4Gdq5VSEcMumqhFVQgWTSuAzw1xTCgaI7w9UhQmHzrB+3+GnmDR/cJYfYc1Vo6hqegaSB0eYZ79SzKUXeF3kCS/6oSwXxXgK5NKKo08pbLK5OaxgpfQ5Njch+sU027iMRI+AVxNdIzJHgb/SoKNZgIDd//PRdydfmZWlsMS5AZGh1esWbl6g/4oqoYTo/aycuCk2ZWjjxzetE38jArwlbxSnUy8zg0uUyTAPZ6/KIsTvARDaZau27VZKaY1eJlRGWZ8DYDB64bHtFcHYyHQquQR4puuH/oyO7qIYQgfepsvqHTVwZWlIEdn/YP3t0uS0ZuRZegwLgiLezrq8YT3zsSY4J3A3CA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 31:CUkAbGW1bJX66euBMfir+Cqr4ntDN3D+BxqmB10tX6xNhMpcTotOLghRezysq0g9NkkDtEwfsNd9ZzB3hKDjiYbcDEoOCrehQcJ/kw+ECUcPAliX74l3+yQ/fzv7WyE6B9S4EyiUXicouzhGMVENAjail9p3McNyUL+tkEfAaD1WcKmOgHb5h8QKIiaSZ4zgYYtb0XqS3/QSKc/BDQ7oAjjmERO6VQdcQJIAP0T4jv3ysVuKzvYh3pr2UlRmEVVIyIS7icK4JFpKQyQD09sK9w== 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)(13024025)(13023025)(13018025)(8121501046)(5005006)(13015025)(13017025)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259075)(20161123565025)(20161123556025)(20161123563025); SRVR:BLUPR03MB277; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 4:/Q02XQU7LTvL6f2W9oBVz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7/LlfRmNcmNAui8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 7:tZQwFgBb0psXcXLLgkIP3jhTZtCoF1BRs+ltRS33RapXziKLBiF6ATFmogM8BL6aEtw7Mn9QxEoLhTUbSqncKxUBWBwcgGVQ5fs1duFTJDjmLrIxlJMqrsbikfcduw7pvZKg5UGFCIGKkTWawYQ4wfFHcREMiXaxWEqIOkALP+RXKq3WeRdhq5VzNyGc38n7MebUbMJRdTFOVLQXO3YABCvHTBifJDKi+jSXNkdc52NF5tyGM/AbIln/P0maxo2Y1ly7F1sXgQVFfh8ENqUZkIwi9r+NVQXU9NT4JB+WSXGN4xNdriBPvxR+mSIhUaPr4kUpjjbpYcO8HyFFrsci6g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 09:29:30.4304 (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: BLUPR03MB277 Subject: [dpdk-dev] [PATCH v4 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 09:29:33 -0000 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 Reviewed-by: Santosh Shukla --- v4: rebased over 27c270bc pool name as variable in print message v3: fix the incorrect split v2: split the fix from change test/test/test_mempool.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c index 715b250..0a44239 100644 --- a/test/test/test_mempool.c +++ b/test/test/test_mempool.c @@ -513,6 +513,7 @@ test_mempool(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,32 @@ test_mempool(void) } rte_mempool_obj_iter(mp_stack, my_obj_init, NULL); + /* Create a mempool based on Default handler */ + 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 %s handler\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + goto err; + } + if (rte_mempool_populate_default(default_pool) < 0) { + printf("cannot populate %s mempool\n", + RTE_MBUF_DEFAULT_MEMPOOL_OPS); + 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 +633,9 @@ test_mempool(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 +644,8 @@ test_mempool(void) rte_mempool_free(mp_nocache); rte_mempool_free(mp_cache); rte_mempool_free(mp_stack); + rte_mempool_free(default_pool); + return ret; } -- 2.7.4