From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ACF31A057B; Mon, 30 Mar 2020 22:33:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CBD22C6D; Mon, 30 Mar 2020 22:33:12 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C59D52C15 for ; Mon, 30 Mar 2020 22:33:10 +0200 (CEST) IronPort-SDR: k1CegZqFFha+cyRFrWih399ItGRmdZg6CqTnu+2kuiArptPnHvtntWxQzb17LCYYllZEgSBmzn ni9H9JUb039g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 13:33:09 -0700 IronPort-SDR: HV1UOMoTWKugW6398POESw2UyhfmzBoohJfiMexvyhtZ4KwSaGDK2SVgwQQn8b0E1uV1Fi3SR1 1xoH5FRRJpCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,325,1580803200"; d="scan'208";a="272492631" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 30 Mar 2020 13:33:09 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Mar 2020 13:33:08 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 30 Mar 2020 13:33:08 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 30 Mar 2020 13:33:08 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 30 Mar 2020 13:33:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQeUb0NzeUzepEOCLlv3GJrQcZDFwCQkXASd41dzBQhj3kpk2vhawBYNKhZcGQ5x++VT5Q6ILPvKLCbL/vqOXYj/fDfTsevOVHYJ1fCknVzdxtjSTQkEkIQbRUVKRTl/7RcomHMEpDRj+Lr0Hs/gNBvAW6rTUpGyR/tImphOo3L94Nj8VpUOOYl5sf8Zb2gPAZgJKoFcV9mT6+PxdFWQoUp7JmIsfairAQAbp28muls1HAT9NEXwRpgXr70kjHQGpr9zHAEh2+JgK1JYJJxOvKaeLk/H/t68TgvQwSkirBTiS6CgHG9BRKY7S8mZiNFOoWZ2YcDCiK4N4vawWgHeBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U4IwTdBp5FniCXEQ3RmRbBNYnXDpoXkdVQaCrKHGXGo=; b=dhGYxWoZjRcWh4WUZVN+eOsLMsd5gW7vp8DmqOdT0AtPS5HqvZwQXlpBecYCgPIkT6dNP6hbhQf/0feA5UPTo5mcNhz+RhXnWSNCz6gfRJ04+ecb+4c8t40J3O6sr49qnhRxYisi96p41v2Es1IU/5DE5tRK0MX1HZGHHMguho2tUkklPqidGk1ydH2kfaDNorrB6rxEeDTBvoiz9zgHJtGhuIbcEUp/OJ2+jRWm1GdPDiq12Yn1IBjma+vKTxsxydja7F2uzOul4Cigv8E9xOckRUbV0XU7ylbeslCalgfcie20oEQqj+hgxL3kBlgqHp/gqNlr2gd6fwjvb/vaSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U4IwTdBp5FniCXEQ3RmRbBNYnXDpoXkdVQaCrKHGXGo=; b=GyDHZpuBuVOy3OgATzRxaHLTyl+F4a7dkHZWW8AOLmi/Ks5jJxOaQCn0f828oE/dU61wqurJX4nOcDVSTzgiCKsBcEtl34i7bDOPkHaqhLBiBR0yUgbgpkV05WiBB7yW/laSGIZkgv3C2J8N+R2AYiEd8sBop4cBZ7M1DYllLnU= Received: from MN2PR11MB4158.namprd11.prod.outlook.com (2603:10b6:208:155::14) by MN2PR11MB4110.namprd11.prod.outlook.com (2603:10b6:208:154::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Mon, 30 Mar 2020 20:33:06 +0000 Received: from MN2PR11MB4158.namprd11.prod.outlook.com ([fe80::6471:daba:c5ad:2399]) by MN2PR11MB4158.namprd11.prod.outlook.com ([fe80::6471:daba:c5ad:2399%4]) with mapi id 15.20.2856.019; Mon, 30 Mar 2020 20:33:06 +0000 From: "Wang, Yipeng1" To: "Medvedkin, Vladimir" , "dev@dpdk.org" CC: "Gobriel, Sameh" , "Richardson, Bruce" Thread-Topic: [PATCH v2 2/2] test: update hash performance tests Thread-Index: AQHWA45Tqv3HxeG89EiYdsnQlHZ3zKhhmlZA Date: Mon, 30 Mar 2020 20:33:06 +0000 Message-ID: References: <1583757860-375294-1-git-send-email-vladimir.medvedkin@intel.com> <1585241243-339118-2-git-send-email-vladimir.medvedkin@intel.com> In-Reply-To: <1585241243-339118-2-git-send-email-vladimir.medvedkin@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=yipeng1.wang@intel.com; x-originating-ip: [108.161.24.24] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 33a50245-67fb-4fe4-2074-08d7d4e98d7e x-ms-traffictypediagnostic: MN2PR11MB4110: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:466; x-forefront-prvs: 0358535363 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4158.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(366004)(136003)(39860400002)(346002)(396003)(376002)(71200400001)(2906002)(478600001)(66946007)(76116006)(9686003)(64756008)(66476007)(55016002)(15650500001)(54906003)(107886003)(66446008)(110136005)(66556008)(316002)(81156014)(81166006)(4326008)(8936002)(186003)(52536014)(86362001)(8676002)(7696005)(33656002)(53546011)(6506007)(26005)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OPkwQeEhgDq9bjEniI+w3qlMHslrGvyxfneZcp1WbzxTiX7vfZvG9/wQSUyvaGTmwXBHRPM5NZ/clJkhEIEXwbks8LVwarF299o3lKoZK5kcRoZD+srFPOwkCsoyloAr38V66YhMvnafqaH2YdjqcfMHuIOcbfq4s80NkyYQRP2VcL4d4kddMlEkblqvyEtamJTwNiCWvzouXY1Rj76pJS3PmyV/TZs7I9GZ0sqmAdY1sI0oSGyOGrWBNRgG4+MP6dSHYnprb7CDOga8O5gZuzh57jCLlnKqSyPFe0eGj3rhNhOihzVGAn3FqwAca1tODAF0ApDAc7LdnvaLyzOmCNwSNJGAumSj2hXHok6xLW0kS7KkxcLTYoy0ODjXn4PltWZWjWWs4GflZRRhPyVbICDaHGJJjTkLaYrUw46yJxYmIvlK4y1tMoT1ARoCLq7C x-ms-exchange-antispam-messagedata: fbUjeXEUwl2+4gXou8sfEGFKgFhfRl4prTDYYY+GuDiA+k/kCS8hbV51x8QmDew90B5EFflCTZDerXmQXDqDaZ+WShgs0ngmM5Y7x9LnhLcwp9l5TqYLf8WgGy1nA+psGQhimImHJ/LW1ix7POn9WA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 33a50245-67fb-4fe4-2074-08d7d4e98d7e X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2020 20:33:06.1067 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MIrt2A/uDblBefvqDxU66KMsGy7pUc647kifVuopiFIL7/MDZomW1wIviStn6DrY54kN6KGW+pgDQS0wJGwxFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4110 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 2/2] test: update hash performance tests 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Medvedkin, Vladimir > Sent: Thursday, March 26, 2020 9:47 AM > To: dev@dpdk.org > Cc: Wang, Yipeng1 ; Gobriel, Sameh > ; Richardson, Bruce > > Subject: [PATCH v2 2/2] test: update hash performance tests >=20 > Add preformance test for rte_hash_lookup_with_hash_bulk_data() >=20 > Signed-off-by: Vladimir Medvedkin > --- > app/test/test_hash_perf.c | 45 > ++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 40 insertions(+), 5 deletions(-) >=20 > diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index > a438eae..e0d1600 100644 > --- a/app/test/test_hash_perf.c > +++ b/app/test/test_hash_perf.c > @@ -391,8 +391,8 @@ timed_lookups(unsigned int with_hash, unsigned int > with_data, } >=20 > static int > -timed_lookups_multi(unsigned int with_data, unsigned int table_index, > - unsigned int ext) > +timed_lookups_multi(unsigned int with_hash, unsigned int with_data, > + unsigned int table_index, unsigned int ext) > { > unsigned i, j, k; > int32_t positions_burst[BURST_SIZE]; > @@ -417,7 +417,7 @@ timed_lookups_multi(unsigned int with_data, > unsigned int table_index, > for (j =3D 0; j < keys_to_add/BURST_SIZE; j++) { > for (k =3D 0; k < BURST_SIZE; k++) > keys_burst[k] =3D keys[j * BURST_SIZE + k]; > - if (with_data) { > + if (!with_hash && with_data) { > ret =3D > rte_hash_lookup_bulk_data(h[table_index], > (const void **) keys_burst, > BURST_SIZE, > @@ -442,6 +442,39 @@ timed_lookups_multi(unsigned int with_data, > unsigned int table_index, > return -1; > } > } > + } else if (with_hash && with_data) { > + ret =3D > rte_hash_lookup_with_hash_bulk_data( > + h[table_index], > + (const void **)keys_burst, > + &signatures[j * BURST_SIZE], > + BURST_SIZE, &hit_mask, ret_data); > + if (ret !=3D BURST_SIZE) { > + printf("Expect to find %u keys," > + " but found %d\n", > + BURST_SIZE, ret); > + return -1; > + } > + for (k =3D 0; k < BURST_SIZE; k++) { > + if ((hit_mask & (1ULL << k)) =3D=3D 0) { > + printf("Key number %u" > + " not found\n", > + j * BURST_SIZE + k); > + return -1; > + } > + expected_data[k] =3D > + (void > *)((uintptr_t)signatures[ > + j * BURST_SIZE + k]); > + if (ret_data[k] !=3D expected_data[k]) { > + printf("Data returned for > key" > + " number %u is %p," > + " but should > be %p\n", > + j * BURST_SIZE + k, > + ret_data[k], > + expected_data[k]); > + return -1; > + } > + } > + > } else { > rte_hash_lookup_bulk(h[table_index], > (const void **) keys_burst, [Wang, Yipeng]=20 Although not implemented for (with_hash && !with_data), data would be still= printed to output. This could be misleading.