mirror of https://github.com/F-Stack/f-stack.git
Modify some code of KNI support virtio_user.
This commit is contained in:
parent
ba2a7fe957
commit
51c6fbd66b
|
@ -582,7 +582,7 @@ init_port_start(void)
|
|||
#ifdef FF_KNI
|
||||
if (enable_kni && rte_eal_process_type() == RTE_PROC_PRIMARY) {
|
||||
#ifdef FF_KNI_KNI
|
||||
if (ff_global_cfg.kni.type == 1)
|
||||
if (ff_global_cfg.kni.type == KNI_TYPE_VIRTIO)
|
||||
#endif
|
||||
{
|
||||
total_nb_ports *= 2; /* one more virtio_user port for kernel per port */
|
||||
|
|
|
@ -571,7 +571,7 @@ ff_kni_alloc(uint16_t port_id, unsigned socket_id, int type, int port_idx,
|
|||
printf("create kni on port %u success!\n", port_id);
|
||||
|
||||
kni_stat[port_id]->port_id = port_id;
|
||||
}else if (type == KNI_TYPE_VIRTIO)
|
||||
} else if (type == KNI_TYPE_VIRTIO)
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
|
@ -623,7 +623,7 @@ ff_kni_process(uint16_t port_id, uint16_t queue_id,
|
|||
struct rte_mbuf **pkts_burst, unsigned count)
|
||||
{
|
||||
kni_process_tx(port_id, queue_id, pkts_burst, count);
|
||||
kni_process_rx(port_id, queue_id,pkts_burst, count);
|
||||
kni_process_rx(port_id, queue_id, pkts_burst, count);
|
||||
}
|
||||
|
||||
/* enqueue the packet, and own it */
|
||||
|
|
Loading…
Reference in New Issue