| 51a639ca | 18-Mar-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: fix hyphens in doc
With the line in rst file: The single mode: "--aaa" or "-a". corresponding line in html doc: The single mode: -aaa or -a. the two hyphens (--aaa) become one (-aaa).
A
argparse: fix hyphens in doc
With the line in rst file: The single mode: "--aaa" or "-a". corresponding line in html doc: The single mode: -aaa or -a. the two hyphens (--aaa) become one (-aaa).
According to [1], this commit uses the backquote (``xxx``) to fix it. And for consistency, use this format for all arguments.
[1] https://stackoverflow.com/questions/51075907/display-two-dashes-in-rst-file
Fixes: e3e579f5bab5 ("argparse: introduce argparse library") Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Jie Hai <haijie1@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| f48e4eed | 18-Mar-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: fix argument flags size
The struct rte_argparse_arg's flags was 64bit type, uint64_t should be used instead of uint32_t where the operation happened.
Also, the flags' bit16 was also unuse
argparse: fix argument flags size
The struct rte_argparse_arg's flags was 64bit type, uint64_t should be used instead of uint32_t where the operation happened.
Also, the flags' bit16 was also unused, so don't test bit16 in testcase test_argparse_invalid_arg_flags.
In addition, this commit introduces two bitmask marcros and removes an internal duplicate macro.
Fixes: 6c5c6571601c ("argparse: verify argument config") Fixes: 31ed9f9f43bb ("argparse: parse parameters") Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Jie Hai <haijie1@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| bd0d68bd | 18-Mar-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: replace flag enum with macros
The enum rte_argparse_flag's value is u64, but an enum in C is represented as an int. This commit replace these enum values with macro.
Bugzilla ID: 1409 Fix
argparse: replace flag enum with macros
The enum rte_argparse_flag's value is u64, but an enum in C is represented as an int. This commit replace these enum values with macro.
Bugzilla ID: 1409 Fixes: e3e579f5bab5 ("argparse: introduce argparse library") Fixes: 5357c248c960 ("argparse: parse unsigned integers") Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Jie Hai <haijie1@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| 66e57df3 | 18-Mar-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: remove dead code
The judgement "obj->callback == NULL" is dead code which can't be reached, because verify_arg_saver() already make sure obj->callback must not be NULL when arg->val_saver
argparse: remove dead code
The judgement "obj->callback == NULL" is dead code which can't be reached, because verify_arg_saver() already make sure obj->callback must not be NULL when arg->val_saver is NULL.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Jie Hai <haijie1@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| 676ca0d2 | 26-Jan-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: print pretty help
This commit aligns help info.
Take dmafwd as an example, previous:
options: -h, --help: show this help message and exit. --mac-updating: Enable MAC addresses updating
argparse: print pretty help
This commit aligns help info.
Take dmafwd as an example, previous:
options: -h, --help: show this help message and exit. --mac-updating: Enable MAC addresses updating --no-mac-updating: Disable MAC addresses updating -p, --portmask: hexadecimal bitmask of ports to configure -q, --nb-queue: number of RX queues per port (default is 1) -c, --copy-type: type of copy: sw|hw -s, --ring-size: size of dmadev descriptor ring for hardware copy mode or rte_ring for software copy mode -b, --dma-batch-size: number of requests per DMA batch -f, --max-frame-size: max frame size -m, --force-min-copy-size: force a minimum copy length, even for smaller packets -i, --stats-interval: interval, in seconds, between stats prints (default is 1)
Now: options: -h, --help show this help message and exit. --mac-updating Enable MAC addresses updating --no-mac-updating Disable MAC addresses updating -p, --portmask hexadecimal bitmask of ports to configure -q, --nb-queue number of RX queues per port (default is 1) -c, --copy-type type of copy: sw|hw -s, --ring-size size of dmadev descriptor ring for hardware copy mode or rte_ring for software copy mode -b, --dma-batch-size number of requests per DMA batch -f, --max-frame-size max frame size -m, --force-min-copy-size force a minimum copy length, even for smaller packets -i, --stats-interval interval, in seconds, between stats prints (default is 1)
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|