devargs: introduce API and test
authorOlivier Matz <olivier.matz@6wind.com>
Sat, 1 Mar 2014 12:14:15 +0000 (13:14 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 10 Apr 2014 12:58:34 +0000 (14:58 +0200)
commitbf6dea0e04afc0d1f2c8056cd4d1aecab12502d1
treeb57c29dd5b13ce256260af78a90acb1d9c645746
parent5b1f4a67dd5bcfa8d5139c064ced6e37a9149419
devargs: introduce API and test

This commit introduces a new API for storing device arguments given by
the user. It only adds the framework and the test. The modification of
EAL to use this new module is done in next commit.

The final goals:

- unify pci-blacklist, pci-whitelist, and virtual devices arguments
  in one file
- allow to register a virtual device driver from a dpdk extension
  provided as a shared library. For that we will require to remove
  references to rte_pmd_ring and rte_pmd_pcap in argument parsing code
- clarify the API of eal_common_whitelist.c, and rework its code that is
  often complex for no reason.
- support arguments for PCI devices and possibly future non-PCI devices
  (other than virtual devices) without effort.

Test result:

echo 100 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 100 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
./app/test -c 0x15 -n 3 -m 64
RTE>>eal_flags_autotest
[...]
Test OK

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
app/test/Makefile
app/test/commands.c
app/test/test.h
app/test/test_devargs.c [new file with mode: 0644]
lib/librte_eal/common/Makefile
lib/librte_eal/common/eal_common_devargs.c [new file with mode: 0644]
lib/librte_eal/common/include/rte_devargs.h [new file with mode: 0644]
lib/librte_eal/linuxapp/eal/Makefile