#
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 ...
|
#
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 ...
|
#
9b8df29b |
| 18-Mar-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: clarify error logs
This patch rewords the error messages.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Dengdui Huang <huangdengdui@huawei.com> Acked-by: Jie Hai <ha
argparse: clarify error logs
This patch rewords the error messages.
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 ...
|
#
9ccd7b27 |
| 26-Jan-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: parse signed integer
Provide API which could parsing the value from the input string based on the value type. This API could used in user callback when parsing string by argparse or kvargs
argparse: parse signed integer
Provide API which could parsing the value from the input string based on the value type. This API could used in user callback when parsing string by argparse or kvargs library.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
#
e3e579f5 |
| 26-Jan-2024 |
Chengwen Feng <fengchengwen@huawei.com> |
argparse: introduce argparse library
Introduce argparse library (which was inspired by the thread [1]). This commit provides public API and doc.
[1] https://patchwork.dpdk.org/project/dpdk/patch/20
argparse: introduce argparse library
Introduce argparse library (which was inspired by the thread [1]). This commit provides public API and doc.
[1] https://patchwork.dpdk.org/project/dpdk/patch/20231105054539.22303-2-fengchengwen@huawei.com/
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|