Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-06-11 Thread Thomas Monjalon
01/06/2021 05:06, Chenbo Xia: > From: Tiwei Bie > > This patch adds a helper for reading string from sysfs. > > Signed-off-by: Cunming Liang > Signed-off-by: Tiwei Bie > --- > lib/eal/common/eal_filesystem.h | 10 ++ > lib/eal/freebsd/eal.c | 22 ++ > lib

Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-06-07 Thread Xia, Chenbo
Hi Stephen, > -Original Message- > From: Stephen Hemminger > Sent: Tuesday, June 1, 2021 1:39 PM > To: Xia, Chenbo > Cc: dev@dpdk.org; tho...@monjalon.net; Liang, Cunming > ; Wu, Jingjing ; Burakov, > Anatoly ; Yigit, Ferruh ; > m...@ashroe.eu; nhor...@tuxdriver.com; Richardson, Bruce >

Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-06-07 Thread Xia, Chenbo
Hi Stephen, > -Original Message- > From: Stephen Hemminger > Sent: Tuesday, June 1, 2021 1:38 PM > To: Xia, Chenbo > Cc: dev@dpdk.org; tho...@monjalon.net; Liang, Cunming > ; Wu, Jingjing ; Burakov, > Anatoly ; Yigit, Ferruh ; > m...@ashroe.eu; nhor...@tuxdriver.com; Richardson, Bruce >

Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-05-31 Thread Stephen Hemminger
On Tue, 1 Jun 2021 11:06:42 +0800 Chenbo Xia wrote: > > +int > +rte_eal_parse_sysfs_str(const char *filename, char *buf, unsigned long sz) > +{ > + FILE *f; > + > + f = fopen(filename, "r"); > + if (f == NULL) { > + RTE_LOG(ERR, EAL, "%s(): cannot open sysfs file %s\n",

Re: [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-05-31 Thread Stephen Hemminger
On Tue, 1 Jun 2021 11:06:42 +0800 Chenbo Xia wrote: > +int > +rte_eal_parse_sysfs_str(const char *filename, char *buf, unsigned long sz) > +{ > + FILE *f; > + > + f = fopen(filename, "r"); > + if (f == NULL) { > + RTE_LOG(ERR, EAL, "%s(): cannot open sysfs file %s\n", > +

[dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs

2021-05-31 Thread Chenbo Xia
From: Tiwei Bie This patch adds a helper for reading string from sysfs. Signed-off-by: Cunming Liang Signed-off-by: Tiwei Bie --- lib/eal/common/eal_filesystem.h | 10 ++ lib/eal/freebsd/eal.c | 22 ++ lib/eal/linux/eal.c | 22