[spp] [spp 03539] Re: [PATCH 0/6] Replace deprecated APIs
Nakamura Hioryuki
nakamura.hiroyuki at po.ntt-tx.co.jp
Thu Nov 15 01:16:14 CET 2018
Hi, Yasufumi and all,
> > I've got understand your point. Could you confirm why you avoid to use global variable?
> rte_eth_dev_attach is function inside dpdk library so it is somehow
> natural to use global variable when retrieve newly created dpdk port.
> As I said earlier, this time new function is located in application side.
> It is unnatural to use global variable of library from application
> rather I prefer to use existing function for retrieving allocated dpdk
> from appliction(rte_eth_dev_get_port_by_name).
I would like to add background to above discussion.
First, we asked simple question “How to replace rte_eth_dev_attach with
rte_eal_hotplug_add" to dpdk-dev ML. At that time, we thought that this
replacement can be realized by migrating the codes in
rte_eth_dev_attatch() in "lib/librte_ethdev/rte_ethdev.c" to spp code.
But thanks to advice from Thomas, we found that this idea is too
simple (or idiot?) to handle the "internal data (global variable)" in
rte_eth_dev_attach().
See
https://mails.dpdk.org/archives/dev/2018-September/112412.html
So, we decided to use rte_eth_dev_get_port_by_name().
--
Nakamura Hioryuki <nakamua.hiroyuki at po.ntt-tx.co.jp>
More information about the spp
mailing list