+ unsigned mbuf_size,
+ struct rte_mempool *pktmbuf_pool,
+ struct rte_kni_ops *ops)
+{
+ struct rte_kni_conf conf;
+ struct rte_eth_dev_info info;
+
+ memset(&info, 0, sizeof(info));
+ memset(&conf, 0, sizeof(conf));
+ rte_eth_dev_info_get(port_id, &info);
+
+ rte_snprintf(conf.name, sizeof(conf.name), "vEth%u", port_id);
+ conf.addr = info.pci_dev->addr;
+ conf.id = info.pci_dev->id;
+ conf.group_id = (uint16_t)port_id;
+ conf.mbuf_size = mbuf_size;
+
+ /* Save the port id for request handling */
+ ops->port_id = port_id;
+
+ return rte_kni_alloc(pktmbuf_pool, &conf, ops);
+}
+
+struct rte_kni *
+rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
+ const struct rte_kni_conf *conf,
+ struct rte_kni_ops *ops)