Lines Matching defs:bps

557 	struct nm_bdg_polling_state *bps;
584 bna = nbk->bps->bna;
594 nm_bdg_create_kthreads(struct nm_bdg_polling_state *bps)
599 bps->kthreads = nm_os_malloc(sizeof(struct nm_bdg_kthread) * bps->ncpus);
600 if (bps->kthreads == NULL)
605 for (i = 0; i < bps->ncpus; i++) {
606 struct nm_bdg_kthread *t = bps->kthreads + i;
607 int all = (bps->ncpus == 1 &&
608 bps->mode == NETMAP_POLLING_MODE_SINGLE_CPU);
609 int affinity = bps->cpu_from + i;
611 t->bps = bps;
612 t->qfirst = all ? bps->qfirst /* must be 0 */: affinity;
613 t->qlast = all ? bps->qlast : t->qfirst + 1;
630 struct nm_bdg_kthread *t = bps->kthreads + i;
633 nm_os_free(bps->kthreads);
639 nm_bdg_polling_start_kthreads(struct nm_bdg_polling_state *bps)
643 if (!bps) {
647 bps->stopped = false;
649 for (i = 0; i < bps->ncpus; i++) {
650 struct nm_bdg_kthread *t = bps->kthreads + i;
661 struct nm_bdg_kthread *t = bps->kthreads + i;
664 bps->stopped = true;
669 nm_bdg_polling_stop_delete_kthreads(struct nm_bdg_polling_state *bps)
673 if (!bps)
676 for (i = 0; i < bps->ncpus; i++) {
677 struct nm_bdg_kthread *t = bps->kthreads + i;
681 bps->stopped = true;
686 struct nm_bdg_polling_state *bps)
733 bps->mode = req->nr_mode;
734 bps->qfirst = qfirst;
735 bps->qlast = qlast;
736 bps->cpu_from = core_from;
737 bps->ncpus = req_cpus;
748 struct nm_bdg_polling_state *bps;
758 bps = nm_os_malloc(sizeof(*bps));
759 if (!bps)
761 bps->configured = false;
762 bps->stopped = true;
764 if (get_polling_cfg(req, na, bps)) {
765 nm_os_free(bps);
769 if (nm_bdg_create_kthreads(bps)) {
770 nm_os_free(bps);
774 bps->configured = true;
775 bna->na_polling_state = bps;
776 bps->bna = bna;
781 error = nm_bdg_polling_start_kthreads(bps);
784 nm_os_free(bps->kthreads);
785 nm_os_free(bps);
796 struct nm_bdg_polling_state *bps;
802 bps = bna->na_polling_state;
804 bps->configured = false;
805 nm_os_free(bps);