Skip to content

Commit c6c73eb

Browse files
committed
Fixed a crash issue of kni_stat in secondary proc.
1 parent d668831 commit c6c73eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ff_dpdk_kni.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,9 @@ ff_kni_enqueue(enum FilterReturn filter, uint16_t port_id, struct rte_mbuf *pkt)
665665
return 0;
666666

667667
error:
668-
kni_stat[port_id]->rx_dropped++;
668+
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
669+
kni_stat[port_id]->rx_dropped++;
670+
}
669671
rte_pktmbuf_free(pkt);
670672

671673
return -1;

0 commit comments

Comments
 (0)