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 C659842A52; Wed, 3 May 2023 20:28:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A109741144; Wed, 3 May 2023 20:28:31 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 85F5C410F9 for ; Wed, 3 May 2023 20:28:30 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2496863c2c7so5324956a91.1 for ; Wed, 03 May 2023 11:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1683138510; x=1685730510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=dGFdtKq6W5kgfPBDoUsi1IcLYTrU/x+TM2M2hwd/2wk=; b=2e7QSXzbroV3bl3a8wiH36UjyWLdi0v4C/D4J4l6my9Um4mCayhg7e64olbcZYoz83 zkoBKbQwWxrRYKjOU7AW86pj8IoWFk47fUE6mdqNJ3ApWqXYuRJyqxI3VhFjb3C2XvvI M9BLJbiuMHHGgng0BzdZiWnxUBx7DNd9DsGld1q/VHX79rMWqKChdYvoNQmMgcN4/zUT 9LBQeBaUiTU9cblITTCl+yxc6G3RAFdU3ch2mLUXov8HA4q3nB3zGJvPmk0H7vLihw0c unnsriP0O1AuzKl6C8wntnVala8lF/zEGg4ErqyWQ9AFs+ZpAOuB+IxwbNOXMFInGODY XyVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683138510; x=1685730510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dGFdtKq6W5kgfPBDoUsi1IcLYTrU/x+TM2M2hwd/2wk=; b=dXVSUKiRF90XDM7lYm0dfclXNygsrMVBpNRbD1gVIiH4ZUUSvhpfohh/h0qskQxZqe Xmqmmva32K8mQpjWlANL60oLIaZPcJG7wMVxEhDBIGOAkhOHi0KyJY33HSu+C2YvzT2I ozyvQH+GGFgvEGjgcgJ/e05HgKXYf3ZRmmA0toPDd2FgQd4npD+qLZylVlmoCwp/kV6m 0mWDxCQCT61nr9+RtxRxC4rzQgXyJpQLhrjBT5lYBCJJo3Z48O50O5QDYSi9Q3Egapcn 1ushzG9tcaUlqwVVc2k5prT5Xb2eltvNZj2QqL7LDiUdpCcsdmDF3U/nYxS4kmIUxuDG FajA== X-Gm-Message-State: AC+VfDxWZLYIW1UOINSMefWK1/djuHcb04dYzxaCFBAq+ccsKRFNaRF3 0Yc0C+LuO4f0KXEbWht6d0nZaA== X-Google-Smtp-Source: ACHHUZ5W+I0weIxgQZVRb7we/C+qDgu1DnaeW1ZZvMdeEnkXwWqC/PKelNMtuBvXVsaNtnKDCZ+IQQ== X-Received: by 2002:a17:90a:a10b:b0:24e:18d0:12ba with SMTP id s11-20020a17090aa10b00b0024e18d012bamr8673144pjp.43.1683138509701; Wed, 03 May 2023 11:28:29 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id w8-20020a17090a1b8800b0024df6bbf5d8sm6394467pjc.30.2023.05.03.11.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 11:28:29 -0700 (PDT) Date: Wed, 3 May 2023 11:28:26 -0700 From: Stephen Hemminger To: Srikanth Yalavarthi Cc: Anup Prabhu , "dev@dpdk.org" , Shivah Shankar Shankar Narayan Rao , Prince Takkar Subject: Re: [EXT] Re: [PATCH v3] app/mldev: add internal function for file read Message-ID: <20230503112826.6450d96a@hermes.local> In-Reply-To: References: <20230323152801.27666-1-syalavarthi@marvell.com> <20230503085642.7284-1-syalavarthi@marvell.com> <20230503075408.455ee334@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 3 May 2023 14:59:40 +0000 Srikanth Yalavarthi wrote: > > > > Granted this is a test program. But why did you ignore my feedback that this > > is the slowest way to read a file. Stdio requires extra buffering, use regular > > read() or better yet mmap(). > > Agree on the improvement, but, considering that this is a test code and these operations are done in slow-path, I would prefer to have the implementation based on C library calls rather than using system calls. > > Also, using system calls may not make this code portable? Though we are not supporting this app on platforms other than Linux, as of now. > Pls let me know what you think. > > I had shared my additional comments on v2 patch. Using system calls read/write is used lots of places in DPDK already and is portable to all the supported platforms.