From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E32C42870; Thu, 30 Mar 2023 15:17:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31C77410D3; Thu, 30 Mar 2023 15:17:59 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id B9CC840E25 for ; Thu, 30 Mar 2023 15:17:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680182277; x=1711718277; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=3UNfVkj185Wf3giMrO/AvFRGiBl9CAd6DNqUUMfU2N8=; b=W//YtUsvkWV8Jei5Vqm3HDCtpy+hiMZ5pfx+e693z988etZW3Dyxys+O O320VMRYC0zKFnN7TTHuHX7CelYmO+ZSEz4W8cHUMpjcHIaIdjZPRJbgJ bBoHQnOY6EpCDE2WnFnkcayLIFvPJ1y0bV6mi5kOW/qDUCyVoSpCUjHC+ nXTiFAo8rAp9x2+a2JQi3p4EDknM1tQzv54yQnanOIHghTXlwic1jGhvx DuAbaEdiDtSIqVVaeDE+TWxkLihcJw2JvLmxFn5XyDLGVjQXexGJAJ/eu 0Hyx+JrZNtnmHOdsee7ZODF9N08Italva3/dpDpHysY4HRcSv5vxL1YoC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="338663069" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="338663069" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 06:17:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="717317148" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="717317148" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 30 Mar 2023 06:17:56 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.21; Thu, 30 Mar 2023 06:17:56 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 30 Mar 2023 06:17:55 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 30 Mar 2023 06:17:55 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 30 Mar 2023 06:17:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJjjT4lzhlYCObhrPhS3AoW2BAswcXGqzO5Q1jn1o/LKlBHkglcg7gr/dRkaZJF5rqkkKR/+1rq7KV/heyHCF0D6daShbxrbHn4+tq28Y3sPX8ISa15fGMqXCkMdFkT9AHS5y8JBbI1sJfUOvxyNp+wLNJlMT+plyDRg9VUThozDBPie1lkoED049AMpZefE8AkYdgUm+PlqNILHzAxgH4eZnh1RA7NC3SuOeVvxVYH6F2ETI0I1p9vWcYEZYdG3ckMrBQjkqo27e24PyW1UxmXD5saI5qKK4sxnUkqScHGC3MWYS6cvOBCDRo0TPCNH+NwKHgRk1kf/Ep/ahFodQw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e0MXSTUlhytQXDDItKlELS1tGynBoWXCG84bG9s6JIw=; b=Du1qwS0fTm/JFJVSrzJruK5vEfoAZntdVUBEus3ZtWcf6n07kUMO48kF9D3dt/6VaqP7sqPf45XxQtFUnJ9Ra7ycUm7Tm4AqGUyzOVePEJ6wHrWBuULE8sD4U/e+CWBqhTQyrhenlGuNZbYAF6+pvoG1LXpM+3x/6u37yNV2OIsHdnpraLBCWj1uU1/RKzvk6Hgde3mh8pNqgTf9NhVV5lhSdzgfmMOEw3vcqW3nLWw4/cpej5YxCUhvR/LLIITkKTXijWz/srWMUQKQHTw6wgWWbv4PRlgFBEoZBB7mgkYg8ga1ZSQFkQpElXxR0BvJ6P02zQPhbJh7MAkt/VKBMA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by BN9PR11MB5371.namprd11.prod.outlook.com (2603:10b6:408:11c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.35; Thu, 30 Mar 2023 13:17:53 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c%8]) with mapi id 15.20.6222.035; Thu, 30 Mar 2023 13:17:53 +0000 Date: Thu, 30 Mar 2023 14:17:46 +0100 From: Bruce Richardson To: Prashant Upadhyaya CC: Subject: Re: Regarding DPDK API's like rte_timer_subsystem_init/rte_hash_create etc. in VPP Message-ID: References: Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: LO4P265CA0239.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::13) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|BN9PR11MB5371:EE_ X-MS-Office365-Filtering-Correlation-Id: ccc45cab-2278-4032-f318-08db31212b30 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YmXH9AFIF0JmWcQAAR89juKpdpx9CE/HJFK5w552UpZlsB9qoDdV6TXLNDOlQ4RNftB2BRdje1kSSmpuUsjIKo2DD3XP5SinAqcWIbVc6yh23vA3bTmww/fD4HOsvnqZ6CuiIHcUbMOYOHBcq/8xlM+KSOzbD6HIb4tOdotKVRLtEu4Qa5OfXL/iShbRQoyENwP+ierGrwq/c4puS1vvWkfqVQa8QvZWFm3OPSaAG/ynQG4CBtnFzAjmMcSb+hZW/y8Q7uiiwkpfnIVxz9DYePA0qe+PwjqjJAtwPR+kSo2UopbsvWRhPAn1DuFHGxE31xVN9J4woRHuFbv5lY5GYRmQ2u0/hc0BWu5sOHe+QAZJ4bYwtvOhyk4JUm0IJpwYv3Svd9XujzgzFSuz3NIVeeh3/tAmG8oax+m1FjGh9xkgpyG7kYky4CdhYL9KPseCsjCJJUQ9wsru3wsf1g/OUrDGEg3eWNIv5KBQ55iChS7oLc+3WKHHqRtnbXpMRtnTZD1KjU1V59AzEKvYerf/N/u7GnVMJSSM0HsP7W5cE+aiAjRfDTLXjRf/6Y9Kc70zZMBNhjObrn7SMVBh2MbdHSBiQuf463ygEi6aKU0fb/g= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199021)(66556008)(82960400001)(26005)(6666004)(53546011)(6486002)(38100700002)(44832011)(8936002)(5660300002)(186003)(2906002)(6506007)(4326008)(6512007)(316002)(6916009)(41300700001)(478600001)(86362001)(8676002)(66476007)(66946007)(83380400001)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cjZ1aytVWVZZVzFQZzhFZDRaQTNkMnFhWndWcjIzRm1NekN6bGZ6QTBZUXNM?= =?utf-8?B?elVLVjBEdVYxQkorbllTSGFlaVFXQUpuV2hkbngyd05hQkxCNkx1VTdzd3g2?= =?utf-8?B?OGM1c1R4cTkxbnprTTdzM0N6d21SNXNna0lJSFdsQ3NwYXRoZzNjUklUT29y?= =?utf-8?B?VjM2cWFoUFMzSTRqQUQrSEdIZXJ6QUdpK3hCdndBVDFiRHRISzExSlBSaVRm?= =?utf-8?B?Q0M2ZXh6bWlFZFF2aHlRcDhFNTRwL0NEWE1qYUY5VVdiYkF1K0RnV1RORmxJ?= =?utf-8?B?bzVMczcyZStxNzRVcHd6NnVmQ1BtQ3RnN2hseGlZcndhbmJDRU5HanlCaEVo?= =?utf-8?B?U3VJSDE0VXM3R0JycXhPNXR6S25HMEVmS29WZjg3dGlwTFVhbjNPZmlVdGZ2?= =?utf-8?B?UGJDbHFlUnhZUUFibzVhcEJhYW5QRDJNWTBacThFS3ZEdHJNY2FUZHJyQUQ0?= =?utf-8?B?Sm1ENE1LRWdnU3JwVHVhbDlyaFRYdC9rNEhN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hxeU44RlhpS3NxSzMwNjVIelpGYWlT?= =?utf-8?B?Z2RZTmtqR2lPNWhYdkRzN0VuUmxkT0FDSmVhWDdpQ3AzdUEzQm5TMFV3c0w0?= =?utf-8?B?ekcrN1JsQTdQalUyOTN6djF3aDIzV1lhM3IyaURQOWk3dGo4MmpGdE5nMVMw?= =?utf-8?B?K2phNTRyNlJjSTFZd0NZYURuVXllNFkrNHNrOU5QeHNjZnk4ejlDUWFiQVJj?= =?utf-8?B?SlFDSEtUMXZnOHhBUE1TVjJDSnN1dytFb0taaldMTndUUzc1MUt5OVJINlli?= =?utf-8?B?L1FaS2dvWnZ6aTh1cnFra2w5WEJmQUtjWGIrYlJJMWZNVzc0WDlxSGRVRVYv?= =?utf-8?B?aWVkQnE3dXdsN2ZSTCtDbmlLK0luemgyY21ZQnBFTExWVUthWFFhelQzVUZE?= =?utf-8?B?cjlEbnRXRDVZQW11ZVlDaURvUS9SM21zZXZoZEQ2cWowbXZiNnU5ZkZqU3h3?= =?utf-8?B?dklpS1FZclcvV05KZWdUbXJxVXJDL3lOeDZ2T3ZzUHk5b1hjdEtlZmhHZ1Vh?= =?utf-8?B?dlJ6NzFWWk5WZ0w5VFJ0WXZUZHFmK2w3YlcwMko4cnBHZEYvWlhjUHNjaU9N?= =?utf-8?B?YlhiNnovZEhJRjg4cWxORFRUNlR4WURIMTRKMW16RTlaYWFlMUdBYWFEd28x?= =?utf-8?B?ckttREZvS2Y0ZlhTUnNnNklqdlpFVExqUm82R2lBcXdsNmFMQmRNYTM0K2cv?= =?utf-8?B?dGxhWnRWbTdvQ0xNOCtaNStQSmNUeWF2Q3lHM0YxQ0lpejhMUHloY2h0ZlFP?= =?utf-8?B?anc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: ccc45cab-2278-4032-f318-08db31212b30 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2023 13:17:53.3853 (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: PxZQcsuEHGhnnHBnhFv1O4gcGF8P5moBI6QE3Y91NZiAdGviUu9/kkmRWVo3abog9z2pNgcz7c72oCglaV3MXXf2AJmTjdBe4lPsmbDblaQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5371 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Mar 30, 2023 at 06:42:58PM +0530, Prashant Upadhyaya wrote: > On Thu, Mar 30, 2023 at 2:50 PM Bruce Richardson > wrote: > > > > On Thu, Mar 30, 2023 at 01:57:52PM +0530, Prashant Upadhyaya wrote: > > > Hi, > > > > > > > FYI, when replying on list, it's best not to top-post, but put your replies > > below the email snippet you are replying to. > > > > > The hash creation API throws the following error -- > > > RING: Cannot reserve memory for tailq > > > HASH: memory allocation failed > > > > > > The timer subsystem init api throws this error -- > > > EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested > > > memzone segments exceeds RTE_MAX_MEMZONE > > > > > > > Can you try increasing RTE_MAX_MEMZONE. It' defined in DPDK's rte_config.h > > file, so edit that and then rebuild DPDK. [If you are using the built-in > > DPDK from VPP, you may need to do a patch for this, add it into the VPP > > patches direction and then do a VPP rebuild.] > > > > Let's see if we can get rid of at least one of the error messages. :-) > > > > /Bruce > > > > > I did check the code and apparently the memzone and rte zmalloc > > > related api's are not being able to allocate memory. > > > > > > Regards > > > -Prashant > > > > > > On Thu, Mar 30, 2023 at 1:30 PM Bruce Richardson > > > wrote: > > > > > > > > On Thu, Mar 30, 2023 at 10:30:24AM +0530, Prashant Upadhyaya wrote: > > > > > Hi, > > > > > > > > > > While trying to port some code to VPP (which uses DPDK as the backend > > > > > driver), I am running into a problem that calls to API's like > > > > > rte_timer_subsystem_init, rte_hash_create are failing while allocation > > > > > of memory. > > > > > > > > > > This is presumably because VPP inits the EAL with the following arguments -- > > > > > > > > > > -in-memory --no-telemetry --file-prefix vpp > > > > > > > > > > Is there is something that can be done eg. passing some more parms in > > > > > the EAL initialization which hopefully wouldn't break VPP but will > > > > > also be friendly to the RTE timer and hash functions too, that would > > > > > be great, so requesting some advice here. > > > > > > > > > Hi, > > > > > > > > can you provide some more details on what the errors are that you are > > > > receiving? Have you been able to dig a little deeper into what might be > > > > causing the memory failures? The above flags alone are unlikely to cause > > > > issues with hash or timer libraries, for example. > > > > > > > > /Bruce > > Thanks Bruce, the error comes from the following function in > lib/eal/common/eal_common_memzone.c > memzone_reserve_aligned_thread_unsafe > > The condition which spits out the error is the following > if (arr->count >= arr->len) > So I printed both of the above values inside this function, and the > following output came > > vpp[14728]: dpdk: EAL init args: --in-memory --no-telemetry --file-prefix vpp > [New Thread 0x7fffa67b6700 (LWP 14732)] > count: 0 len: 2560 > count: 1 len: 2560 > count: 2 len: 2560 > [New Thread 0x7fffa5fb5700 (LWP 14733)] > [New Thread 0x7fffa5db4700 (LWP 14734)] > count: 3 len: 2560 > count: 4 len: 2560 > ### this is the place where I call rte_timer_subsystem_init from my > code, the above must be coming from any other code from VPP/EAL init, > the line below is surely because of my call to > rte_timer_subsystem_init > count: 0 len: 0 > > So as you can see that both values are coming to be zero -- is this > expected ? I thought the arr->len should have been non zero. > I must add that the thread which is calling the > rte_timer_subsystem_init is possibly different than the one which did > the eal init, do you think that might be a problem... > I am yet to increase the value of RTE_MAX_MEMZONE, but wanted to share > the above first for any suggestions. > Given the lengths you printed above, increasing the MAX_MEMZONE will not help things. Is the init call which is failing coming from a non-DPDK thread?