From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0064.outbound.protection.outlook.com [104.47.32.64]) by dpdk.org (Postfix) with ESMTP id AE98B2FDD for ; Tue, 4 Apr 2017 07:57:21 +0200 (CEST) Received: from BN3PR03CA0103.namprd03.prod.outlook.com (10.174.66.21) by DM5PR03MB3113.namprd03.prod.outlook.com (10.174.190.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Tue, 4 Apr 2017 05:57:20 +0000 Received: from BL2FFO11OLC008.protection.gbl (2a01:111:f400:7c09::152) by BN3PR03CA0103.outlook.office365.com (2603:10b6:400:4::21) 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; Tue, 4 Apr 2017 05:57:20 +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 BL2FFO11OLC008.mail.protection.outlook.com (10.173.160.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1005.5 via Frontend Transport; Tue, 4 Apr 2017 05:57:19 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v345vF0q016799; Mon, 3 Apr 2017 22:57:18 -0700 From: Hemant Agrawal To: CC: , , Date: Tue, 4 Apr 2017 11:27:09 +0530 Message-ID: <1491285429-1114-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491285429-1114-1-git-send-email-hemant.agrawal@nxp.com> References: <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> <1491285429-1114-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131357590401348692; (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)(39380400002)(39400400002)(39850400002)(39860400002)(39450400003)(39840400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(48376002)(33646002)(4326008)(86362001)(38730400002)(106466001)(5003940100001)(2351001)(47776003)(105606002)(36756003)(50466002)(110136004)(77096006)(2906002)(575784001)(104016004)(81166006)(54906002)(50226002)(8676002)(5660300001)(8936002)(85426001)(356003)(305945005)(53936002)(189998001)(76176999)(8656002)(2950100002)(6916009)(6666003)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3113; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC008; 1:9Ucol16lbBtWeOjcPrYJHzGenqFoEH1+rdcmTqDWkNe769oS1AIdR2Jn086Uv7cPPIRUDycG832E4m42INutx/RvsK+Vv6/hQld2FcHYFUvP1hXHsYETh/i14qso40sQM0n0lBLb+s/euhNOOjUejA2/TAjy7fXy5YYxM+GEgbaE5DTXXqnTijTZAkR2Gg7JkVHae2wRL5xpWQToY0Gj5ge3o1NAL3Wku+0zIa/M7D26lpH7z24umvTRDz4g70DjCQDF1D6fMhQ7PglPh8we00x5Kao/nVbiSz+dx5KLgOsxDpOv8oAqIwrVD9KXxbd3hLTiCSvOmMcGa5UXlecYMeny2M41eV04JLwUVrs3hYL4r2jpnRkX7TPK0QfMhUi0tRknXfougwxMwDioGt0pONjxSuvV2J6unoQUj9t83kQ6PVcbv9lKRwzK+bzNV8WfX0jQ3rXlmbCwfg/WFuSeyEHqu/G1nY9XO/tFC5pXK8sLs3dSw/tjX/+HW7vWdKK4QscRmYG6Va9xgbtfuH6tg8Yj4v3bwPSa8fFpiFUatW1P7qfhz5bk7qpo8nIoQGWjV69wyYNEq1/ySKceqvYdINflbj6OLYGXsqrP06/Eh+XU3rS7EPb9C83qLZ/ifP0BWOlGmOef1s/WpjZt9V/cfA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: bbdc3dd7-527f-407d-7454-08d47b1f74e3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:DM5PR03MB3113; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 3:G5xfNiyiAhH7bW1qemzXWDL4+4/RvN/JdIHHZ3M5MQd0HuitLPHjD+wYjw+Ov0VSA3VUhc8ScWU2l7qPgsJA1wYIfVtzB/rN8kFI5dZYw0jaU6MLRL+IR87aArqQ4NU2u7q5eu3CKXahroIr+WLUeRXDZ52AzLhYyTjWbAmnUCZsi8v97l5HUWl1nIv/TuqeRpyS/2dsAeLCCL0B57aNklyTwQ3tFEabkU8Hl23D/lN23itnD9YMGoRbmgnHcphrqZ8r5qG/uxR58RqijVQxUV532Mx7Wg37LHlnVxYiVfbMSFGSkP1rHAkSE7KvtTwA/dpG2CEqlpsLYW6TL9A9OqmolfUD/wCoMEgzigHLPAKSvcAgUQlAz8GTQn69eyJ/qMuMTh0pWoWw5wEfFVma4Od9EEeH4vpVdaqjGhyXvxJ1qZGoPHonN+6f2G954Xpv; 25:ZS3GIcxI2Rn8kEDuSTz5tF59w30a4QEm2LUSz0F5BLUAqROPwwiJTqw63Tv76eLLqSiPJoRi6iAqHXXUD/V4UNyYLdH1YkxrD2/VYAUGaWTtNe0ZSyK8UBiXK3UA7QpeEVYFWh4ICxLebO34m2zXNr+CtU41leJRvrgignF47Vo/lBheuRQmy0j7d8iwr42fAMZiConmA2dXdq34OPyxefyuS2Pjn+cChN63lbDuhGkCko6Z13Hqlnp+jl7/0pa4zA32y1DsBTPsQSWHKa+/VrBezEub1bjXrZxXks81fQlaRVg9ux9NCNFd6dPRnYTAgLxupri49jV/ovwtRXO/2a0vhiQRGQ0/uGYy43yZCGK5ptj9o+omxGqW0CmHuCGBoHiPYuUC7ysNPy1G27FYTGnNnWfLB2CwaqS0ZUROjHnrEIRrk0wRrKxb79tt62Kod+SnVi+ksDqxtrQtgk0bqw== X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 31:BpmXOquBV9pdWefRGEVDc2pDHgRnL5hLzSPZjtLKZnde+AIxNZR0sHNf4awzNxBkt7yZe3rWSYpRfiLDmi7iBoR24qH1qsGV58Ri38qFWb/AO7b1ZOWGs985fZI/V8lHMqpl2H6qCqDXBmwxpDoODHM0HyFUmchDX9uyuMvxwQfVxrVoPX70x3jFvX8SS3ntyeKaaR0gT6foCnOdnD8sYMjXmmHX4nl5q3uqD+wVrA9yo0fr+VjIUq0kgQwgGA3nrwF1CCti1ZQprffxb6HbOA== 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)(13018025)(13024025)(13023025)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123565025)(20161123561025)(20161123556025)(20161123563025); SRVR:DM5PR03MB3113; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB3113; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 4:VE1gq2i3aKR8Xz2inVt1kcKHK1BEjO8iDHeZeEQNmFj6v7N5sAAUW+KjuHGV0b7U+WQah8CBpDsGYQRZW4XxInCmSM3JrqPm46PWWrZoYHvr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-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3113; 7:jU9yHcKGVDW7cW0t9k4wSqsf8itBdaLYuygD4LXw4RYErLNb9Mb4xzkD3bmyxNJikGKtffU4vHf/B3JvspmT6DHnQiWvqDk6MBj1HUlfQ2ib0S2bXWjjcAhwxCpmmUgK9W1I9M37kTMzkwjrbe6KIvKHLWRkPolccmYjUAMvuc5eFaVUd4Pm4nXpJpnQr3ryt8SP94Wkv6ZHmwh7ADjmTP21WQCSnvYwCvesdasHKmI4kCUqRjYu2nKEXKWzJT2Dui+RhS/c/ov+9NYDllZuQSPPF1JimKiAJTGMm/SZjabNM+9Om7bHUrdmlPT6NPjk75SwYC/uj5YrAHGdbqC+Kw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2017 05:57:19.9632 (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: DM5PR03MB3113 Subject: [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: Tue, 04 Apr 2017 05:57:22 -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 --- 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"); + 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"); @@ -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); + return ret; } -- 1.9.1