Commit 09accba
fix(dpdk): prepend program-name placeholder in eal::init
rte_eal_init treats argv[0] as the program name and skips it during
option parsing. The wrapper was passing the caller's args verbatim,
so the first flag was silently swallowed on every call -- including
in production callers and in any test that hands eal::init a list of
flags.
Fix by prepending a static `c"dataplane"` placeholder inside the
wrapper. The placeholder lives in .rodata; DPDK's argparse only
mutates the argv pointer array, never the strings, so the cast_mut
is sound (documented as a SAFETY comment).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 08e23f9 commit 09accba
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
131 | 142 | | |
132 | 143 | | |
133 | 144 | | |
| |||
0 commit comments