microsoft / microsoft/machnet

Bug in InitDpdk: First arg in rte_args ignored

Open
#41 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
162
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search for Dpdk::InitDpdk and its rte_eal_init call, then inspect how rte_args is converted into argc/argv. Verify the example argument forms, including --log-level=eal,8 and -c 0x0 -n 6, are all processed rather than having the first option skipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.