Inline: > > This is the intended behavior with this patch. Ports are to be created > > only by the primary process. This is required for correct operation > > IMO, because if we allow secondary processes to create ports > > dynamically (and locally use conflicting port ids) without any > > synchronization mechanism, they're guaranteed to overwrite each other's > rte_eth_dev_data. > > Thanks Amin for clarification, > I had another approach, that rte_eth_devices and rte_eth_dev_data should have > different offset of port_id and secondary process can also add devices.
That wouldn't work without some rather intrusive changes. As of now, rte_eth_dev_data includes port_id and therefore should be consistent across processes. > as I now understand with this patch we will not be able do something like: > Primary: > ./test-pmd -c 0xf -n 4 --socket-mem='512,0' -w 03:00.1 -w 03:00.0 > --proc-type=primary --file-prefix=xz1 -- -i > Secondary: > ./test-pmd -c 0xf0 --socket-mem='512,0' -n 4 -v -b 03:00.1 -b 03:00.0 --vdev > 'eth_pcap0,rx_pcap=/var/log/device1.pcap,tx_pcap=/var/log/device2.pcap' > --proc-type=secondary --file-prefix=xz1 -- -i > > Because secondary processes "Ports are to be created only by the primary > process"? Right, that wouldn't work. Amin