On Tue, May 30, 2017 at 10:30:36AM +0200, Jacek Piasecki wrote: > From: Kuba Kozak <kubax.ko...@intel.com> > > added function rte_eal_configure which translate > options from config file into argc, **argv form. > > changed function rte_eal_init to meld > argc, argv** options from config file with > these from command line and then parse as > before >
Hi, while this approach to merging the values from two sources (config struct and cmdline) works, I'm not sure it's the best way to implement this. I would have thought it more logical to separate out cmdline args into name-value pairs to add to the cfgfile struct internally instead. However, this has the disadvantage of forcing a dependency on cfgfile, or adding a third name-value pair struct to DPDK [after kvargs, which supports flat pairs, and cfgfile, which supports sections and pairs]. Using the cfgfile struct also saves us from "flattening out" hierarchical information we may wish to add in the config file. For example, consider the following cfgfile structure: [DPDK] lcores = 20-25 socket-mem = 2048, 1024 vdevs = 2 [DPDK.vdev0] name = eth_pcap0 rx_pcap = /path/to/file tx_pcap = /path/to/other_file [DPDK.vdev1] name = eth_tap0 iface = iface_arg Longer term, it would be good to keep those vdev entries separated as passed as such to the driver, rather than merging them back into a single string to be separated out again by kvargs lib. /Bruce