Skip to contentSkip to conversation

let multi tx queues with pcap work

PATCH In review Zhouyi Zhou 2 participants 2 messages Apr 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 let multi tx queues with pcap work

Currently, dpdk-pktgen will panic when assigning multi tx queues with pcap packet, for example:
./app/app/build/pktgen -c f -n 2 -- -P -m "[0:1-3].0" -s 0:pcap/large.pcap

This patch fix this bug by assigning qid to memory pool name.

---
 app/pktgen-pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/pktgen-pcap.c +1 -1
index 1af0a53..960294c 100644
@@ -337,7 +337,7 @@ pktgen_pcap_parse(pcap_info_t *pcap, port_info_t *info, unsigned qid)
 
 	wr_pcap_rewind(pcap);
 
-	snprintf(name, sizeof(name), "%-12s%d:%d", "PCAP TX", info->pid, 0);
+	snprintf(name, sizeof(name), "%-12s%d:%d", "PCAP TX", info->pid, qid);
 	rte_printf_status("    Process: %-*s ", 18, name);
 
 	pkt_sizes = elt_count = i = 0;
Signature · 1 line
1.9.1
#1 lore raw

Thank you.

Quoted 29 lines

Currently, dpdk-pktgen will panic when assigning multi tx queues with pcap packet, for example:
./app/app/build/pktgen -c f -n 2 -- -P -m "[0:1-3].0" -s 0:pcap/large.pcap

This patch fix this bug by assigning qid to memory pool name.

---
app/pktgen-pcap.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
app/pktgen-pcap.c +1 -1
index 1af0a53..960294c 100644
@@ -337,7 +337,7 @@ pktgen_pcap_parse(pcap_info_t *pcap, port_info_t *info, unsigned qid)
 
 	wr_pcap_rewind(pcap);
 
-	snprintf(name, sizeof(name), "%-12s%d:%d", "PCAP TX", info->pid, 0);
+	snprintf(name, sizeof(name), "%-12s%d:%d", "PCAP TX", info->pid, qid);
 	rte_printf_status("    Process: %-*s ", 18, name);
 
 	pkt_sizes = elt_count = i = 0;
Signature · 1 line
1.9.1

Regards,
Keith