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 56108A04DD; Tue, 26 Nov 2019 14:19:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B80B2B96; Tue, 26 Nov 2019 14:19:08 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9C6522B88 for ; Tue, 26 Nov 2019 14:19:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2019 05:19:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,245,1571727600"; d="scan'208";a="408658558" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 26 Nov 2019 05:19:04 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 Nov 2019 05:19:03 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.58) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 Nov 2019 05:19:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q9hR2+wyyPO+IjFdFIKrkO7DCMvETLGO1/mArywMj4sqWpuB+zmgKMOfXBoX+gVzj6ob3L0In6Q8ByUYHf0j1wdNwB+mQVAwoT4oKyrlUWFlJndi7p2b2oq0DozjoqzrRDvA+QTPIot4ggl3b5ET+BxCW1xUN+/wgpyV7KHQGbixB2CZlvuKY7QXGeQxu8g2+5EOElnoEqG5mGlOtUmyHdNf06zx801ccTVhwVKX9QOB68rAt6eHs4kmW+LE8Hse2Xyt23Vx09UDjxzlQp9ZHSi1e9LUzumHprn/BbBZcR6RI5jFOmJU48mMRV+QnxmMuT51mKaB42hO4Ll50AOGbQ== 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=/e4Y/XiATuhVEcC+XRUOFs/AiG6kWN1VTcXLyicW/7o=; b=agT3LajRmy0RgFVAZEzhwkv+UsB/HQ90M4wcdQIP8h/8kgXDVw8cT+1bZRupL18+qtg/2EE3j49sgIn8HvOQCrnDhWt5kyGsEZu9tdHg+tFdWHuHp2KXfRgK+cFCUTiK7VspL26jlfQ/Jj4q8aIW212HzCCjtYRxl2yYupEL4F3P33aE2rT663t6pxgbSu0/0m0HHRv63sxvcIDU6ZLsZV8AjXq5EBaYcePWIrsbF5o7fzjdHKdGBLhrLPLnL0UqScmz+FxE7rKVAJdWeKkcZnUggHIxkQMZJ3wMUXqgrORMt0rantz/69DED/8mvr0Efv5KpCDscB32nrmHbYo8gg== 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=/e4Y/XiATuhVEcC+XRUOFs/AiG6kWN1VTcXLyicW/7o=; b=owcODnaM0acrfJYlkKBmpCPA91gm2CHgYAvOT4XvGnCScs+7RFwdOc3LqBb7dxg0/VxgTFqr56Q0rZtXoLl5V9p3aNjU0I49SE9iLUBlG/XMQaVWIgXvUz+a+Clrqe8F81KOC/W8P2oJtTAeH+swVMQ7uq8spiJjDZH9b84ZwYM= Received: from MN2PR11MB4447.namprd11.prod.outlook.com (52.135.39.217) by MN2PR11MB3758.namprd11.prod.outlook.com (20.178.253.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.18; Tue, 26 Nov 2019 13:19:02 +0000 Received: from MN2PR11MB4447.namprd11.prod.outlook.com ([fe80::c4e6:5cec:9c4c:e37]) by MN2PR11MB4447.namprd11.prod.outlook.com ([fe80::c4e6:5cec:9c4c:e37%2]) with mapi id 15.20.2474.023; Tue, 26 Nov 2019 13:19:02 +0000 From: "Van Haaren, Harry" To: Aaron Conole , Thomas Monjalon CC: "Amber, Kumar" , "dev@dpdk.org" , "Wang, Yipeng1" , "Yigit, Ferruh" , "Thakur, Sham Singh" , David Marchand Thread-Topic: [dpdk-dev] [PATCH v3] hash: added a new API to hash to query key id Thread-Index: AQHVoWHEOsXFPYPhH0ut+Ho/0A5KwqebvnSAgABPAACAABNGUoAAAEMwgAAO4wCAAATYEYAATxO8gADv7OA= Date: Tue, 26 Nov 2019 13:19:02 +0000 Message-ID: References: <20191122182100.15631-1-kumar.amber@intel.com> <2900799.QLPOietlla@xps> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWQyNTA1NWItZjA4Ny00ZWYwLWExZGMtMzA4MTY4Zjc0Y2VhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieDNvZFFObU04ZjE3MnRSUHlDTEtKTnRHbytcL2praUMxS3picFVmcU5MZ1VVc2RiWGxnckpmdElcL296amxLdFFCIn0= dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=harry.van.haaren@intel.com; x-originating-ip: [192.198.151.163] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c726752a-94fe-4d72-de74-08d77273349b x-ms-traffictypediagnostic: MN2PR11MB3758: 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:8882; x-forefront-prvs: 0233768B38 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(346002)(376002)(366004)(136003)(396003)(189003)(199004)(13464003)(11346002)(71200400001)(66066001)(55016002)(25786009)(6116002)(3846002)(66556008)(66476007)(66946007)(4326008)(66446008)(5660300002)(52536014)(7736002)(14454004)(316002)(478600001)(71190400001)(2906002)(33656002)(6246003)(256004)(6436002)(305945005)(26005)(186003)(9686003)(76116006)(8676002)(8936002)(81166006)(81156014)(229853002)(74316002)(64756008)(110136005)(76176011)(6506007)(53546011)(7696005)(54906003)(102836004)(99286004)(86362001)(446003); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR11MB3758; H:MN2PR11MB4447.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Vx4BS07HX1i9vsHoU+WI8QHW7CG/dsJEuhrKIrug9tD6klSm68Q6TNy1qJ7JOTsF8bB4OPoOEFZgwZUs3rtNbasfbzT5/VIyMKG4odGHqKYR1WiSsGZYbu5gcZX0AaYUouhx0x8Bovh9fMY4CS+XIuJjE6KwBMYPDOJFREU4prPCGwztiZTeC2fKb9MVy3cxjrG0NarOgC08HLomoGvONuf3uxSwHW7P7wrgIYKov1LE8aHFBx4cSaeeCqb+EtP6zFVfmwetjadgAzR3wiVFvpmHyqavOIagCrfovC5DLFVXRxWRbg9ZAArB8GzLXvCm30fQA+jtTXrsAoaWAcY3kBhcon/9gQZ/3KdKkbxjmnzAxekKHMeh4zlS6ehnQA345DAVCnxrZM94hgbuH6CZqck30JvLdi75VkrwJ+/s+DyKGgiS513juHf49ngoT3Rb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c726752a-94fe-4d72-de74-08d77273349b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2019 13:19:02.4460 (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: 8XuseRlwekT8KxoizQJhJDnONJ9JVbMVaSPHrps7SvBoeu31xDIDKd5fofJtmNz31Oe5xjgTE0gcxUGp9FtFcZn6uL9P4ZDQnaqQ3UqPqC4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3758 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] hash: added a new API to hash to query key id 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" Hi Aaron, > -----Original Message----- > From: Aaron Conole > Sent: Monday, November 25, 2019 10:54 PM > To: Thomas Monjalon > Cc: Van Haaren, Harry ; Amber, Kumar > ; dev@dpdk.org; Wang, Yipeng1 > ; Yigit, Ferruh ; Thakur, > Sham Singh ; David Marchand > > Subject: Re: [dpdk-dev] [PATCH v3] hash: added a new API to hash to query > key id >=20 > Aaron Conole writes: >=20 > > Thomas Monjalon writes: > > > >>> From: Aaron Conole > >>> > - if (!service_valid(id)) > >>> > + if (id >=3D RTE_SERVICE_NUM_MAX || !service_valid(id)) > >> > >> Why not adding this check in service_valid()? > > > > I think the best fix is to use SERVICE_VALID_GET_OR_ERR_RET() in these > > places. For this, I at least want to try and show that there aren't an= y > > further errors. And my test loop has been running for a while now > > without any more errors or segfaults, so I guess it's okay to build a > > proper patch. >=20 > This popped up: >=20 > EAL: Test assert service_lcore_en_dis_able line 487 failed: Ex-service co= re > function call had no effect. >=20 > So I'll spend some time in this area, it seems. The below diff makes it 100% reproducible here, failing every time. It seems like the main thread is returning, before the service thread has r= eturned. The rte_eal_mp_wait_lcore() call seems to not wait on the service-core, whi= ch allows the main thread to read the "service_remote_launch_flag" value as 0 (before= the service-thread writes it to 1). Adding the delay between the service launch and service write being perform= ed makes this issue much much more likely to occur - so the above descripti= on I have confidence in. What I'm not clear on (yet) is why the eal_mp_wait_lcore() isn't waiting... -H diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 9fe38f5e0..846ad00d1 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -445,6 +445,7 @@ static int service_remote_launch_func(void *arg) { RTE_SET_USED(arg); + rte_delay_ms(100); service_remote_launch_flag =3D 1; return 0; }