[EXT] Re: [PATCH v3] app/mldev: add internal function for file read

Stephen Hemminger stephen at networkplumber.org
Wed May 3 20:28:26 CEST 2023


On Wed, 3 May 2023 14:59:40 +0000
Srikanth Yalavarthi <syalavarthi at 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.


More information about the dev mailing list