MCPcopy Index your code
hub / github.com/F-Stack/f-stack / init_kni

Function init_kni

lib/ff_dpdk_if.c:536–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536static int
537init_kni(void)
538{
539 int nb_ports = nb_dev_ports;
540
541 kni_accept = 0;
542
543 if(strcasecmp(ff_global_cfg.kni.method, "accept") == 0)
544 kni_accept = 1;
545
546 knictl_action = get_kni_action(ff_global_cfg.kni.kni_action);
547
548 ff_kni_init(nb_ports, ff_global_cfg.kni.tcp_port,
549 ff_global_cfg.kni.udp_port);
550
551 unsigned socket_id = lcore_conf.socket_id;
552 struct rte_mempool *mbuf_pool = pktmbuf_pool[socket_id];
553
554 nb_ports = ff_global_cfg.dpdk.nb_ports;
555 int i, ret;
556 for (i = 0; i < nb_ports; i++) {
557 uint16_t port_id = ff_global_cfg.dpdk.portid_list[i];
558 ff_kni_alloc(port_id, socket_id, i, KNI_QUEUE_SIZE);
559 }
560
561 return 0;
562}
563#endif
564
565//RSS reta update will failed when enable flow isolate

Callers 1

ff_dpdk_initFunction · 0.85

Calls 4

strcasecmpFunction · 0.85
get_kni_actionFunction · 0.85
ff_kni_initFunction · 0.85
ff_kni_allocFunction · 0.85

Tested by

no test coverage detected