Skip to content

Bug in InitDpdk: First arg in rte_args ignored #41

@ssaroiu

Description

@ssaroiu

Dpdk::InitDpdk calls rte_eal_init with rte_args, which are command-line options without the program name (basename). A typical rte_args might look like --log-level=eal,8 --proc-type=auto or -c 0x0 -n 6.

However, rte_eal_init expects the traditional argc, argv format, including the program name. In its implementation, rte_eal_init ignores argv[0] and processes arguments starting from argv[1].

As a result, the first parameter in rte_args is ignored by DPDK.

I tested a simple fix by adding a dummy first argument, but this feels like a hack. I can submit a PR with this fix if you'd like. Let me know.

Example of fix in my code

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions