MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ifpga_monitor_start_func

Function ifpga_monitor_start_func

dpdk/drivers/raw/ifpga/ifpga_rawdev.c:538–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538static int
539ifpga_monitor_start_func(struct ifpga_rawdev *dev)
540{
541 int ret;
542
543 if (!dev)
544 return -ENODEV;
545
546 ret = ifpga_rawdev_fill_info(dev);
547 if (ret)
548 return ret;
549
550 dev->poll_enabled = 1;
551
552 if (!__atomic_fetch_add(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED)) {
553 ret = rte_thread_create_internal_control(&ifpga_monitor_start_thread,
554 "ifpga-mon", ifpga_rawdev_gsd_handle, NULL);
555 if (ret != 0) {
556 ifpga_monitor_start_thread.opaque_id = 0;
557 IFPGA_RAWDEV_PMD_ERR(
558 "Fail to create ifpga monitor thread");
559 return -1;
560 }
561 }
562
563 return 0;
564}
565
566static int
567ifpga_monitor_stop_func(struct ifpga_rawdev *dev)

Callers 1

ifpga_rawdev_createFunction · 0.85

Calls 2

ifpga_rawdev_fill_infoFunction · 0.85

Tested by

no test coverage detected