On Thu, 11 Aug 2022 01:26:49 +0000 Chaoyong He <chaoyong...@corigine.com> wrote:
> > > The 'port_id' is the 'Device [external] port identifier', which > > > related with the 'rte_ethdev_devices[]' I think. > > > Here the ethdev we created is not exposed to the user and is not in the > > 'rte_ethdev_devices[]' > > > array, so it can't be invoked by the user at all. > > > And we invoke this ethdev through a pointer in the `struct > > > nfp_net_hw`, so I think there should no conflict with other ones in the > > system. > > > > DPDK already has a port ownership framework to deal with internal ethernet > > device ports. Why was this not used? > > Sorry I have no knowledge about this framework before. Any document link or > logic about > this framework will be greatly appreciated. Thanks! It is part of ethdev https://doc.dpdk.org/api/rte__ethdev_8h.html See rte_eth_dev_owner_new, rte_eth_dev_owner_set, etc https://doc.dpdk.org/api/rte__ethdev_8h.html#ad6817cc801bf0faa566f52d382214457