net/pcap: fix multiple queues
authorIdo Goshen <ido@cgstowernetworks.com>
Tue, 19 Jun 2018 14:37:25 +0000 (17:37 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
commit8ffda7673fa71e6a666963fc0ea4969d65dd09da
treedb44e94b958ff9faa4e4b902eb13d811d2381049
parent279d33199cacfe2ef03cba2c6db8683b33d97ba7
net/pcap: fix multiple queues

Change open_rx/tx_pcap/iface functions to open only a single pcap/dumper
and not loop num_of_queue times
The num_of_queue loop is already achieved by the
caller rte_kvargs_process

Fixing:
1. Opens N requested pcaps/dumpers instead of N^2
2. Leak of pcap/dumper's which are being overwritten by
   the sequential calls to open_rx/tx_pcap/iface functions
3. Use the filename/iface args per queue and not just the last one
   that overwrites the previous names

Fixes: 4c173302c307 ("pcap: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/pcap/rte_eth_pcap.c