drivers/net: do not use private ethdev data
authorJianfeng Tan <jianfeng.tan@intel.com>
Tue, 24 Apr 2018 05:51:23 +0000 (05:51 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 24 Apr 2018 10:33:51 +0000 (12:33 +0200)
commit5f19dee604ed5760d819743d1d364493ead2aae6
treec8b75b63769edc565b9694469fd124a35ffdd7f8
parentcdb068f031c6b0a4ecea6f62190e17ecfdbeb23d
drivers/net: do not use private ethdev data

We introduced private rte_eth_dev_data to allow vdev to be created
both in primary process and secondary process(es). This is not
friendly to multi-process model, for example, it leads to port id
contention issue if two processes both find the data entry is free.

And to get stats of primary vdev in secondary, we must allocate
from the pre-defined array so that we can find it.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/cxgbe/cxgbe_main.c
drivers/net/kni/rte_eth_kni.c
drivers/net/null/rte_eth_null.c
drivers/net/octeontx/octeontx_ethdev.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c
drivers/net/tap/rte_eth_tap.c
drivers/net/vhost/rte_eth_vhost.c