Lines Matching defs:nhp

385 netisr_register(const struct netisr_handler *nhp)
392 proto = nhp->nh_proto;
393 name = nhp->nh_name;
400 KASSERT(nhp->nh_name != NULL,
402 KASSERT(nhp->nh_handler != NULL,
404 KASSERT(nhp->nh_policy == NETISR_POLICY_SOURCE ||
405 nhp->nh_policy == NETISR_POLICY_FLOW ||
406 nhp->nh_policy == NETISR_POLICY_CPU,
408 nhp->nh_policy, name));
409 KASSERT(nhp->nh_policy == NETISR_POLICY_FLOW ||
410 nhp->nh_m2flow == NULL,
413 KASSERT(nhp->nh_policy == NETISR_POLICY_CPU || nhp->nh_m2cpuid == NULL,
416 KASSERT(nhp->nh_policy != NETISR_POLICY_CPU || nhp->nh_m2cpuid != NULL,
419 KASSERT(nhp->nh_dispatch == NETISR_DISPATCH_DEFAULT ||
420 nhp->nh_dispatch == NETISR_DISPATCH_DEFERRED ||
421 nhp->nh_dispatch == NETISR_DISPATCH_HYBRID ||
422 nhp->nh_dispatch == NETISR_DISPATCH_DIRECT,
423 ("%s: invalid nh_dispatch (%u)", __func__, nhp->nh_dispatch));
438 netisr_proto[proto].np_handler = nhp->nh_handler;
439 netisr_proto[proto].np_m2flow = nhp->nh_m2flow;
440 netisr_proto[proto].np_m2cpuid = nhp->nh_m2cpuid;
441 netisr_proto[proto].np_drainedcpu = nhp->nh_drainedcpu;
442 if (nhp->nh_qlimit == 0)
444 else if (nhp->nh_qlimit > netisr_maxqlimit) {
446 "net.isr.maxqlimit %u\n", __func__, name, nhp->nh_qlimit,
450 netisr_proto[proto].np_qlimit = nhp->nh_qlimit;
451 netisr_proto[proto].np_policy = nhp->nh_policy;
452 netisr_proto[proto].np_dispatch = nhp->nh_dispatch;
478 netisr_clearqdrops(const struct netisr_handler *nhp)
486 proto = nhp->nh_proto;
488 name = nhp->nh_name;
509 netisr_getqdrops(const struct netisr_handler *nhp, u_int64_t *qdropp)
519 proto = nhp->nh_proto;
521 name = nhp->nh_name;
542 netisr_getqlimit(const struct netisr_handler *nhp, u_int *qlimitp)
550 proto = nhp->nh_proto;
552 name = nhp->nh_name;
571 netisr_setqlimit(const struct netisr_handler *nhp, u_int qlimit)
582 proto = nhp->nh_proto;
584 name = nhp->nh_name;
633 netisr_unregister(const struct netisr_handler *nhp)
642 proto = nhp->nh_proto;
644 name = nhp->nh_name;
680 netisr_register_vnet(const struct netisr_handler *nhp)
684 proto = nhp->nh_proto;
688 ("%s(%u): protocol too big for %s", __func__, proto, nhp->nh_name));
692 nhp->nh_name));
755 netisr_unregister_vnet(const struct netisr_handler *nhp)
759 proto = nhp->nh_proto;
763 ("%s(%u): protocol too big for %s", __func__, proto, nhp->nh_name));
767 nhp->nh_name));