mbox series

[v2,0/4] cfgfile: enhance error detecting

Message ID 20240705093115.4437-1-fengchengwen@huawei.com (mailing list archive)
Headers
Series cfgfile: enhance error detecting |

Message

fengchengwen July 5, 2024, 9:31 a.m. UTC
When I was trying to debug a problem introduced by config.ini in
test-dma-perf, I found the cfgfile library should enhance error
detecting, so got this patchset.

Chengwen Feng (4):
  cfgfile: remove dead code
  cfgfile: support verify name and value
  cfgfile: verify add section and entry result
  cfgfile: add strict parse flag

---
v2: replace unique name with strict parse flag which address Stephen's
    comment.

 lib/cfgfile/rte_cfgfile.c | 70 +++++++++++++++++++++++++++++----------
 lib/cfgfile/rte_cfgfile.h |  7 ++++
 2 files changed, 59 insertions(+), 18 deletions(-)
  

Comments

fengchengwen Sept. 6, 2024, 1:03 a.m. UTC | #1
Kindly ping

Thanks

On 2024/7/5 17:31, Chengwen Feng wrote:
> When I was trying to debug a problem introduced by config.ini in
> test-dma-perf, I found the cfgfile library should enhance error
> detecting, so got this patchset.
> 
> Chengwen Feng (4):
>   cfgfile: remove dead code
>   cfgfile: support verify name and value
>   cfgfile: verify add section and entry result
>   cfgfile: add strict parse flag
> 
> ---
> v2: replace unique name with strict parse flag which address Stephen's
>     comment.
> 
>  lib/cfgfile/rte_cfgfile.c | 70 +++++++++++++++++++++++++++++----------
>  lib/cfgfile/rte_cfgfile.h |  7 ++++
>  2 files changed, 59 insertions(+), 18 deletions(-)
>
  
Stephen Hemminger Oct. 9, 2024, 10:47 p.m. UTC | #2
On Fri, 5 Jul 2024 09:31:11 +0000
Chengwen Feng <fengchengwen@huawei.com> wrote:

> When I was trying to debug a problem introduced by config.ini in
> test-dma-perf, I found the cfgfile library should enhance error
> detecting, so got this patchset.
> 
> Chengwen Feng (4):
>   cfgfile: remove dead code
>   cfgfile: support verify name and value
>   cfgfile: verify add section and entry result
>   cfgfile: add strict parse flag
> 
> ---
> v2: replace unique name with strict parse flag which address Stephen's
>     comment.
> 
>  lib/cfgfile/rte_cfgfile.c | 70 +++++++++++++++++++++++++++++----------
>  lib/cfgfile/rte_cfgfile.h |  7 ++++
>  2 files changed, 59 insertions(+), 18 deletions(-)
> 

This patch series is good, but a few things are needed still:
  - please add a functional test for this.
  - add a release note, since somebody might get be surprised.


Also, would be good to put DPDK cfgfile parser on the Wikipedia page
about ini files?

This library could really use some work:
	- support variable length (not fixed size strings)
	- support multi-line
	- sub sections
	- faster access for large ini files (not linked list)