net/pcap: enable data path for secondary process
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 15 Nov 2018 01:37:42 +0000 (09:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Nov 2018 15:56:19 +0000 (16:56 +0100)
commit0d0dd2d9d8ff4e6a2224bc79cc8f37a635187f54
tree6941eb3f17d5c0760f4b2e2537049897b239573c
parent0ecfb6c04d548d3f873a6f3116639aa3587b9b3a
net/pcap: enable data path for secondary process

Private vdev was the way previously, when pdump developed, now with
shared device mode on virtual devices, pcap data path in secondary
is not working.

When secondary adds a virtual device, related data transferred to
primary and primary creates the device and shares device back with
secondary.  When pcap device created in primary, pcap handlers
(pointers) are process local and they are not valid for secondary
process. This breaks secondary.

So we can't directly share the pcap handlers, but need to create a new
set of handlers for secondary, that's what we done in this patch.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/pcap/rte_eth_pcap.c