mbox

[v3,0/2] fix pcap handlers for secondary

Message ID 20181114195647.196648-1-qi.z.zhang@intel.com (mailing list archive)
Headers

Message

Qi Zhang Nov. 14, 2018, 7:56 p.m. UTC
  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.

Also so we use `rte_eth_dev->process_private` to store pcap handlers
separately for each process, so a handler in one process will not be
closed or overwritten by another process unexpectedly. 

Qi Zhang (2):
  net/pcap: move pcap handler to process private
  net/pcap: enable data path for secondary

 drivers/net/pcap/rte_eth_pcap.c | 101 ++++++++++++++++++++++++++++++++++------
 1 file changed, 86 insertions(+), 15 deletions(-)