From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0066.outbound.protection.outlook.com [104.47.40.66]) by dpdk.org (Postfix) with ESMTP id E97E3DE5 for ; Mon, 3 Apr 2017 11:00:16 +0200 (CEST) Received: from BN6PR03CA0065.namprd03.prod.outlook.com (10.173.137.27) 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; Mon, 3 Apr 2017 09:00:15 +0000 Received: from BY2FFO11OLC002.protection.gbl (2a01:111:f400:7c0c::198) by BN6PR03CA0065.outlook.office365.com (2603:10b6:404:4c::27) 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; Mon, 3 Apr 2017 09:00:14 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11OLC002.mail.protection.outlook.com (10.1.15.178) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1005.5 via Frontend Transport; Mon, 3 Apr 2017 09:00:14 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v33908Zh009566; Mon, 3 Apr 2017 02:00:12 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 3 Apr 2017 14:30:02 +0530 Message-ID: <1491210002-9519-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> References: <1490955469-16216-1-git-send-email-shreyansh.jain@nxp.com> <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131356836146105332; (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)(39410400002)(39860400002)(39400400002)(39840400002)(39450400003)(39850400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(2351001)(105606002)(50466002)(110136004)(38730400002)(48376002)(104016004)(76176999)(189998001)(4326008)(50986999)(5003940100001)(36756003)(106466001)(85426001)(2906002)(6666003)(305945005)(50226002)(8656002)(77096006)(6916009)(2950100002)(53936002)(86362001)(356003)(33646002)(81166006)(8676002)(8936002)(54906002)(47776003)(5660300001); 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; BY2FFO11OLC002; 1:uWJInO3mly13HMoayUvH3weLl18TPhm0LiukzhX0uPje8gEsyl1sE6q1EGdVpstB5nz5UMKh3xo/icgY9VdECeFe4DanZPfrCAUblpeh0hWtJ8HfLubG/ifJg7talFrxdf/1N4g9zRDE1EvCbMS2uFaoQrl6jVGJgIZiAMcv2K23k3bBLWquJyVo4gNCqaiHeOI1QvlZ1HkAZKqRP8ngfyME8bdUtj/hGICqvOAOQAmK2nq4US2QGzeqhb2VakmXCRvJ+tqqMCD7sXSpo5PkGhchvgEhN+Zd8qzoqn04cn/uAMG15TzBebjZRbWLnQ/1KKFqDi3emyhPhG1W/7jZPuRrHZzJxVBXVF7h983FuEVTNYmgGUklbtsW6NQQ8oU4zmhRINzJKpF0jNYb946tI97a0BNr1pnU68Rp1+PdDO+x43cjA0S/YxeKn07Dj4t9ervlPNPZFZbD4fIcqWIPYolE29EW8u3QfFnztDH7xmhbTLzh7hNUSfysjaXicOXOBeaEwLHNh0Lk8Ttwov+y/4rUh94njuNzgGkPHeiEQUS25L6vt1Q4e0H9hfyAUbU+BftgY1lcv52kORjbGARuiHP37dZpSBuqLxGmvxt+Xh26cUCYCu2kT9/TCcZdhILWaFn8MOQZK3HpLQUKt5LzwA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 27229a65-030c-4629-cbf4-08d47a6fd7c5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030255075)(201703131430075)(201703131517081); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 3:66GJOtppEjVePtroTh6MoSwrLreNw/GNLXYK9RwxWMEk1Wul5SMu/ImaQZRzewa0pM9AtiACtnsCKDqRaqP3whoDEKzSmZauUlJKGSukB//wSZq7j6oLgXpkhdJprEuzaqPMrlN6h4UeUlrrFV+I0e9xdEgWsM0wZw7HVzw+zkEngHAz5JYd8pKwAg/xtVHvhhiwX3Heaa6D8PQMJ7uasFhryXH1gnwC02Cseno7bT3A+URxla4RgS14me5WOS0Qq0Ro/NCHYfzNCWNY55FowVLk2iW3fJ9z5Fk55wiZW9THIZrySgzg+ub9iaSHgzK+jR32VVBHeWbkvlcTw3ukdDn/Es2vxGQTbEEPs9zWmFsWU5XN1eKFplUFnUtxKgjnG87II+1bOmY9Jz3L+0211d/+LXHhLOrbBbyd6dwm2sUttTDOt5xxeDy8p+FsgcD/WEDv/oDk1p/Od26W2208AA==; 25:2MnTy2dicBddBcy4GsRgcr1CAwWp95FHYdjwbxwfwyH+Kp55Fh+xnlQC3Y+oGSXtQ68BJtvIplxSdGZXrRftye9rHQjqknqRbtP4Vs2sRKBxHFl26IX9ieUuwDcxipEUxw7M6kAfLsndmgnaL8CagLOvFskwJKFIDmGJWK0c2m2oMm23hMrP/K1G81j1RryKIhjFw6kqOaK2JY77Z7o+W1izpXYAAjDR0mQsIoOVJwu+DG5KK4nIxn3Yn6AwXHWqcglUWLwzS7y20IjSLAl3dswvv2uQKfIcppat8ORgZrZPH/Qw0c2uCZedi/Y0uFbnzrzg5dpSjMSQxG1ILFDhXD4jVZgVbP1vh5+t4GyEWPk3JMr09GFDWdtsA+ee+/wM362Pa7chZYLyVse9qsapvKeuo5A0P4LQfvJZ9XguDNDfjsNIUU9vM1DsYdTNKIUwwpY4wrxV4oUXaFxGaRazlw== X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 31:xb1oSccm4AWYxVFk9/RzerocxsjMCEzitn94l0to5TbBRky/Yi7deckEdq4gafz8y9GDzG+5N38O4CPotFab2fmz8eOVLnxrszUnKPvfTJGh+bD8YfcK/qxABIdfIjXhia/mEvK5XbJOXpPjcJqPcVUH6LRUCDxLRJilKcegBkDviM+k00455WWehEg3W3wjXZUm8SX7kfeOYgVZF4FH4KQX8c6t118+q0xWXYN+A1TiiRNNx0Bvfwlvu3dxwmt2ghsLhq28V8t21wrdvtzmnQ== 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)(8121501046)(13015025)(13017025)(5005006)(13018025)(13024025)(13023025)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259075); SRVR:BLUPR03MB277; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB277; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 4:Ah4a8PPG8JXdDZEF5kTrDdCZjyPl81Av/RirPac4kOkxEBa6gxHIkgLR5F3V/eCE4XFum8+zoYuFXQlc4F421QCQqSu4fFjispr16WaQsQ5BdQ/1qYK/anIH4au5DBdYTE31Z1B2jGKzwXIENz8GPOHCIKDGxdZerv26iQnCAMBqOZ4wczkMy0Lc499ZdWEra2CR5higOsjlLpFGIvbDhVUUdOahfFxtQVxKKfo4osD2vf4g7A7MWb+4AK9YNyAkGevGwfjZEt/6tEDxZZAsBL3CCQ0dKW6PpobX+omH0OrVsk5DaYqxTrXaGo+OixS7izKwBagU9fESsGXrEfKIg+NTsr2aBWDhTtPft/QBDqwZjmnCwxYo7D0sOJuC0ED64fQylJE1ewwtGfEjocj1rvtkAxMn4Mg7uApCLyHmHRtGNPCg/jT/YR/rw6H87bQ1bLEsA2GFV+uWewK6EfcpfvFLRLjwtnW1lv1wI1c3jShgBZK4EXWGfD/4zWD3Aq6KMGCpaSwXIR49ME302x4kT+joURZfX3+hnyGoVRPn/x7fT9Isr81UvmqMxyzAUR1fgAhbR+U7PUna9hFLGI0/jEpp1TfyxOGgyn70j3A378Iu64H5lsRilswxSd0lR1btKfVOgesH4W10TVoQibgkIGoCBmK6k7MpYRHbMffgv90te6o1YWlyFZckQXGBzakmxq6xpk5gFTy1Rw7Fde+0uQqZjpUAC+p7Mp9g4Aeya5ErDAeZ1pelOseIZZPpqu4qDdePuRRhdCQE7eu436DvTadB8SFxkLlIFimh6YccNgiVkCNkGePunZu08ZVImzjEnMDrkfR18NUmV9ctT41GrtcZbCsOtoFxCws5hVprKi0oE3Hc1fSWu1hnICFr/Lo4f/Gu8A/Lcg/cKs0B8kvumw== X-Forefront-PRVS: 0266491E90 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB277; 23:xgDvRh/1iNMvF+PqNVIxB36gXe2XqGY/42aIrB2ODN?= =?us-ascii?Q?Ty1RDSQY6kpPsQ7aGHMk0y/QR/SQtHHNubXcCpeltks3RG0P15pCEWZISWvd?= =?us-ascii?Q?goQOXUlZlzjEfmkSgyzKCkw4nZhEruhAkDQLERNRy2YenqbyTCZyAiZ9QLf0?= =?us-ascii?Q?NBs69V3saxRlQXkext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M0Pbu?= =?us-ascii?Q?w993zyEPF6hDFKjZDMzrioEqoUTvURTamYIfUZuUPGmM++wHE+5B9PLbtb4G?= =?us-ascii?Q?4egv0n1OSuNDzV0cmS14ciboIrFuDeBNRpjKJzfgnLoQuDlfsuo9f770+a7/?= =?us-ascii?Q?qeP2EG7zHZ0jU=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 6:Eig85l4JLgFmuGA7yawhe7Ex0jcXp4nMUsQTPLMUlqGlcAimelBjhHERDsYyRrPKKUSZZVGyL32eO9spnPqBINVxUv+w5YQfb5Y9Ei6d5xIEeALaIoTQOLlWk3J8JUDTCClETsBaG1wNDnlJthHWHFfqFkX6ewJIFGJtnZDLx27moFJBdnRGPlmsg/NlvWuthjG1+OCHtEhdSNiMWupDG2RKmBAEUJlxUgi3inn6UM0EHfQubETupvIigvYScrqvFAs+9z1+JmuM7ZLDIxhqtWthMLXmFy1qjCTaMJLva4BMzfEVY+CrNI6xYmbauOCb5iQGZckWRp2QwsjXQ5TFQfNuZbhzYcDEvXIyn52s5IlhX9mqs95K408EjB922XItroO2pt1p1DRvR9l+bNSVAQ==; 5:PsABpVbElhSC5mHAV6Oq7GAuuynvr1bVwHi37TPhdkrmgDTnAAGhbhbOewcC9TGGv93qCmUh1P0B+TGzBeKzn0l1Xfo4h9J0NkLhbqxBWX3uS4dGsQPrQr5TJBAUEnYt4h0TsueLoVbrLM79p7HUnnSFfcoCW5FtIBCSUrVhv720YvFUHasUMCRftHBorcS4; 24:G1TZb4yYAL/IRItwpsvsl8BKrWi8MQlJ9/Tvuf7pKKsoRUp0D8Jig7P74F8Zh+KSCy10LaWJgubSx9+V3bRR4IXCrZMwYwBoFoWrc/0fQPQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB277; 7:mbdbF2Rftez06wmNBc2uYBHZjsVnsAP5/hytTj3Phh+ZhN7E9lI8kNRc/Mb+qHQLUMGMiszsacRKGdjyYxQ0TqpFTLliYdWfK/VtkeoQBUu0Lt4AMevQJJ8/RSJY902MfMaFPZ6o3vhcLWMkkHrFaArxZg/h9C6FWWvCdX8j0W2QiRLy6F8d3j1vbZtyYbZfsPsNisRmWuGBc1RLMJ/8WX0Sgz2Mkcwqv3ix6VT/Y/JIlkY5ea7tCOotVxJ7RWTDKaRX1Zzs307YLRafBvEA+PfuRyxGlzc8qhPZFK9I0PZkzrBFsxrpac8ZxYI4HF6vksciWltXMlAZ76vejA8OOw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 09:00:14.4077 (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 v2 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: Mon, 03 Apr 2017 09:00:17 -0000 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 --- test/test/test_mempool.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c index d863885..aefbf80 100644 --- a/test/test/test_mempool.c +++ b/test/test/test_mempool.c @@ -500,6 +500,12 @@ static int test_mempool_single_consumer(void) return 0; } +static void +walk_cb(struct rte_mempool *mp, void *userdata __rte_unused) +{ + printf("\t%s\n", mp->name); +} + static int test_mempool(void) { @@ -507,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); @@ -556,12 +563,39 @@ 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"); + goto err; + } + if (rte_mempool_populate_default(default_pool) < 0) { + printf("cannot populate default mempool\n"); + 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"); goto err; } + printf("Walk into mempools:\n"); + rte_mempool_walk(walk_cb, NULL); + rte_mempool_list_dump(stdout); /* basic tests without cache */ @@ -597,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; @@ -605,6 +642,7 @@ 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); return ret; } -- 1.9.1