From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3B5662BDF for ; Thu, 26 May 2016 11:05:12 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 26 May 2016 02:05:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,367,1459839600"; d="scan'208";a="962699791" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 26 May 2016 02:05:10 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 26 May 2016 02:05:10 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.148]) with mapi id 14.03.0248.002; Thu, 26 May 2016 17:05:08 +0800 From: "Wang, Zhihong" To: Ravi Kerur , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1 2/2] Test cases for rte_memcmp functions Thread-Index: AQHReMVAwLpgxle4AUi4lce7uR+4BZ/LY3tw Date: Thu, 26 May 2016 09:05:08 +0000 Message-ID: <8F6C2BD409508844A0EFC19955BE09411074394E@SHSMSX103.ccr.corp.intel.com> References: <1457391583-29604-1-git-send-email-rkerur@gmail.com> <1457391644-29645-1-git-send-email-rkerur@gmail.com> <1457391644-29645-2-git-send-email-rkerur@gmail.com> In-Reply-To: <1457391644-29645-2-git-send-email-rkerur@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjI2NGJmOGEtYzkxYi00OWE4LThkOWItZTdhMGNkYmQ1NTU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im9nb0Ywb0EzamkyTmZ2ajRWQk5hREhHYzlSUGh2ZGNwc2VBM25VaHd6eG89In0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 2/2] Test cases for rte_memcmp functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 09:05:12 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ravi Kerur > Sent: Tuesday, March 8, 2016 7:01 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v1 2/2] Test cases for rte_memcmp functions >=20 > v1: > This patch adds test cases for rte_memcmp functions. > New rte_memcmp functions can be tested via 'make test' > and 'testpmd' utility. >=20 > Compiled and tested on Ubuntu 14.04(non-NUMA) and > 15.10(NUMA) systems. [...] > +/************************************************************ > ******************* > + * Memcmp function performance test configuration section. Each performa= nce > test > + * will be performed MEMCMP_ITERATIONS times. > + * > + * The five arrays below control what tests are performed. Every combina= tion > + * from the array entries is tested. > + */ > +#define MEMCMP_ITERATIONS (500 * 500 * 500) Maybe less iteration will make the test faster without compromise precison? > + > +static size_t memcmp_sizes[] =3D { > + 2, 5, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65, 127, 128, > + 129, 191, 192, 193, 255, 256, 257, 319, 320, 321, 383, 384, > + 385, 447, 448, 449, 511, 512, 513, 767, 768, 769, 1023, 1024, > + 1025, 1522, 1536, 1600, 2048, 2560, 3072, 3584, 4096, 4608, > + 5632, 6144, 6656, 7168, 7680, 8192, 16834 > +}; > + [...] > +/* > + * Do all performance tests. > + */ > +static int > +test_memcmp_perf(void) > +{ > + if (run_all_memcmp_eq_perf_tests() !=3D 0) > + return -1; > + > + if (run_all_memcmp_gt_perf_tests() !=3D 0) > + return -1; > + > + if (run_all_memcmp_lt_perf_tests() !=3D 0) > + return -1; > + Perhaps unaligned test cases are needed here. How do you think? > + > + return 0; > +} > + > +static struct test_command memcmp_perf_cmd =3D { > + .command =3D "memcmp_perf_autotest", > + .callback =3D test_memcmp_perf, > +}; > +REGISTER_TEST_COMMAND(memcmp_perf_cmd); > -- > 1.9.1