[spp] [spp 03539] Re: [PATCH 0/6] Replace deprecated APIs

Yasufumi Ogawa usufumu at gmail.com
Thu Nov 15 15:17:37 CET 2018


On 2018/11/15 9:16, Nakamura Hioryuki wrote:
> 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().
Thanks Hideyuki and Hiroyuki for suggesting the update and having  
discussion with DPDK cores! It is clear what is the problem and that we  
should update. I think updating code is OK, but commit messages are  
still needed to be revised.

Thanks,
Yasufumi
> 


More information about the spp mailing list