On Wed, Feb 10, 2016 at 04:42:53PM +0100, Wojciech ?muda wrote: > Bernard, Bruce, I have a question, if I may. Do you know what is the > reason that rte_pmd_af_packet_devinit() is the only non-static device > initialization function among all the dpdk drivers? There's even a > comment in the rte_eth_af_packet.h: > > /** > * For use by the EAL only. Called as part of EAL init to set up any dummy > NICs > * configured on command line. > */ > int rte_pmd_af_packet_devinit(const char *name, const char *params); > > Despite the comment above, I cannot see this function being called > directly anywhere. Is there any reason it is implemented this way? Or > should I change the definition to static, as it should be called via > proper API functions?
The af_packet driver structure was essentially copied from the pcap driver. Way in the past there was the EAL initialization of the "virtual" drivers, and the original af_packet code hooked into that. Somewhere along the way the driver initialization code changed and I guess the EAL initialization bits disappeared. The comment above rte_pmd_af_packet_devinit was overlooked. Long story, short -- I think you can remove the comment and add the static modifier and everything will be fine. John -- John W. Linville Someday the world will need a hero, and you linville at tuxdriver.com might be all we have. Be ready.