DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Srikanth Yalavarthi <syalavarthi@marvell.com>,
	Anup Prabhu <aprabhu@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Shivah Shankar Shankar Narayan Rao <sshankarnara@marvell.com>,
	Prince Takkar <ptakkar@marvell.com>
Subject: Re: [EXT] Re: [PATCH v3] app/mldev: add internal function for file read
Date: Wed, 3 May 2023 16:04:05 -0700	[thread overview]
Message-ID: <20230503230405.GA6191@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <20230503112826.6450d96a@hermes.local>

On Wed, May 03, 2023 at 11:28:26AM -0700, Stephen Hemminger wrote:
> On Wed, 3 May 2023 14:59:40 +0000
> Srikanth Yalavarthi <syalavarthi@marvell.com> 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.

well almost, the windows standard c library implements a subset of
POSIX.1 (ISO/IEC 9945-1:1996) and there should be a strong emphasis on
`a subset' as in it is not fully conformant to any specific POSIX standard.

also because they aren't technically part of the standard C library
(again POSIX is not standard C) they are exposed with different names on
windows by prepending a leading `_' to the names. so you get `_read' instead
of `read' for example.

you can force exposure of the non-conforming names (i.e. the POSIX
names) with the _CRT_DECLARE_NONSTDC_NAMES define but if you do and you use
them you may then get deprecation warnings.

anyway, i read above nobody cares if this code ever runs on anything but
Linux ~forever so i won't make it my business to comment further unless
there is a desire to include windows.

  reply	other threads:[~2023-05-03 23:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 15:28 [PATCH 1/1] " Srikanth Yalavarthi
2023-03-28 15:52 ` Stephen Hemminger
2023-04-12  8:48   ` [EXT] " Srikanth Yalavarthi
2023-04-23  4:55 ` [PATCH v2] " Srikanth Yalavarthi
2023-05-03  8:56 ` [PATCH v3] " Srikanth Yalavarthi
2023-05-03 14:54   ` Stephen Hemminger
2023-05-03 14:59     ` [EXT] " Srikanth Yalavarthi
2023-05-03 18:28       ` Stephen Hemminger
2023-05-03 23:04         ` Tyler Retzlaff [this message]
2023-06-07 11:35 ` [PATCH v4] " Srikanth Yalavarthi
2023-06-07 15:02   ` Stephen Hemminger
2023-06-07 16:21     ` [EXT] " Srikanth Yalavarthi
2023-06-07 16:20 ` [PATCH v5] " Srikanth Yalavarthi
2023-06-07 16:49   ` Stephen Hemminger
2023-06-07 17:24     ` [EXT] " Srikanth Yalavarthi
2023-06-07 17:24 ` [PATCH v6] " Srikanth Yalavarthi
2023-07-07  8:06   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230503230405.GA6191@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=aprabhu@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ptakkar@marvell.com \
    --cc=sshankarnara@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=syalavarthi@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).