Re: [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-05 Thread Neil Horman
On Fri, Jun 05, 2020 at 03:16:03AM +0300, Dmitry Kozlyuk wrote: > On Thu, 4 Jun 2020 17:07:07 -0400 > Neil Horman wrote: > > > On Wed, Jun 03, 2020 at 03:34:03PM +0300, Dmitry Kozlyuk wrote: > > > On Wed, 3 Jun 2020 08:07:59 -0400 > > > Neil Horman wrote: > > > > > > [snip] > > > > > +int > >

Re: [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-04 Thread Dmitry Kozlyuk
On Thu, 4 Jun 2020 17:07:07 -0400 Neil Horman wrote: > On Wed, Jun 03, 2020 at 03:34:03PM +0300, Dmitry Kozlyuk wrote: > > On Wed, 3 Jun 2020 08:07:59 -0400 > > Neil Horman wrote: > > > > [snip] > > > > +int > > > > +eal_file_create(const char *path) > > > > +{ > > > > + int ret; > > >

Re: [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-04 Thread Neil Horman
On Wed, Jun 03, 2020 at 03:34:03PM +0300, Dmitry Kozlyuk wrote: > On Wed, 3 Jun 2020 08:07:59 -0400 > Neil Horman wrote: > > [snip] > > > +int > > > +eal_file_create(const char *path) > > > +{ > > > + int ret; > > > + > > > + ret = open(path, O_CREAT | O_RDWR, 0600); > > > + if (ret < 0) > > > +

Re: [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-03 Thread Dmitry Kozlyuk
On Wed, 3 Jun 2020 08:07:59 -0400 Neil Horman wrote: [snip] > > +int > > +eal_file_create(const char *path) > > +{ > > + int ret; > > + > > + ret = open(path, O_CREAT | O_RDWR, 0600); > > + if (ret < 0) > > + rte_errno = errno; > > + > > + return ret; > > +} > > + > You don't

Re: [dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-03 Thread Neil Horman
On Wed, Jun 03, 2020 at 02:03:20AM +0300, Dmitry Kozlyuk wrote: > Introduce OS-independent wrappers in order to support common EAL code > on Unix and Windows: > > * eal_file_create: open an existing file. > * eal_file_open: create a file or open it if exists. > * eal_file_lock: lock or unlock an o

[dpdk-dev] [PATCH v6 02/11] eal: introduce internal wrappers for file operations

2020-06-02 Thread Dmitry Kozlyuk
Introduce OS-independent wrappers in order to support common EAL code on Unix and Windows: * eal_file_create: open an existing file. * eal_file_open: create a file or open it if exists. * eal_file_lock: lock or unlock an open file. * eal_file_truncate: enforce a given size for an open file. Imple