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 D2FE2A0527; Mon, 9 Nov 2020 12:44:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFAFB5AA6; Mon, 9 Nov 2020 12:44:56 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by dpdk.org (Postfix) with ESMTP id 18E5E5A62 for ; Mon, 9 Nov 2020 12:44:55 +0100 (CET) X-Originating-IP: 90.78.4.16 Received: from u256.net (lfbn-poi-1-1343-16.w90-78.abo.wanadoo.fr [90.78.4.16]) (Authenticated sender: grive@u256.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 6974CC0009; Mon, 9 Nov 2020 11:44:54 +0000 (UTC) Date: Mon, 9 Nov 2020 12:44:50 +0100 From: =?utf-8?Q?Ga=C3=ABtan?= Rivet To: Hemant Agrawal , Sachin Saxena Cc: dev@dpdk.org Message-ID: <20201109114450.y7iq6ec2hmn4zesv@u256.net> References: <20201109113147.962882-1-grive@u256.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201109113147.962882-1-grive@u256.net> Subject: Re: [dpdk-dev] [PATCH] bus/dpaa: optimize device name parsing 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" On 09/11/20 12:31 +0100, Gaetan Rivet wrote: > Device name parsing is done on all buses during device iterations at > either EAL or ethdev levels. > > When a bus implements device name parsing slowly, all iterations are > impacted. Efficient implementation is important. > > The DPAA bus device name parsing has two issues: it allocates dynamic > memory and uses snprintf without a real need for it. Both can be > avoided, which improves the parsing performance. > > The function is also simpler and shorter. > > Signed-off-by: Gaetan Rivet > --- Sorry I meant to annotate this patch before sending. Please note that I could not test with a real DPAA bus. There are some string offsets that should be correct but the parsing still needs to be tested. Cheers, -- Gaƫtan