Lines Matching defs:proto
390 u_int i, proto;
392 proto = nhp->nh_proto;
401 ("%s: nh_name NULL for %u", __func__, proto));
425 KASSERT(proto < NETISR_MAXPROT,
426 ("%s(%u, %s): protocol too big", __func__, proto, name));
432 KASSERT(netisr_proto[proto].np_name == NULL,
433 ("%s(%u, %s): name present", __func__, proto, name));
434 KASSERT(netisr_proto[proto].np_handler == NULL,
435 ("%s(%u, %s): handler present", __func__, proto, name));
437 netisr_proto[proto].np_name = name;
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;
443 netisr_proto[proto].np_qlimit = netisr_defaultqlimit;
448 netisr_proto[proto].np_qlimit = netisr_maxqlimit;
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;
454 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
456 npwp->nw_qlimit = netisr_proto[proto].np_qlimit;
460 V_netisr_enable[proto] = 1;
466 V_netisr_enable[proto] = 1;
484 u_int i, proto;
486 proto = nhp->nh_proto;
490 KASSERT(proto < NETISR_MAXPROT,
491 ("%s(%u): protocol too big for %s", __func__, proto, name));
494 KASSERT(netisr_proto[proto].np_handler != NULL,
495 ("%s(%u): protocol not registered for %s", __func__, proto,
499 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
516 u_int i, proto;
519 proto = nhp->nh_proto;
523 KASSERT(proto < NETISR_MAXPROT,
524 ("%s(%u): protocol too big for %s", __func__, proto, name));
527 KASSERT(netisr_proto[proto].np_handler != NULL,
528 ("%s(%u): protocol not registered for %s", __func__, proto,
532 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
548 u_int proto;
550 proto = nhp->nh_proto;
554 KASSERT(proto < NETISR_MAXPROT,
555 ("%s(%u): protocol too big for %s", __func__, proto, name));
558 KASSERT(netisr_proto[proto].np_handler != NULL,
559 ("%s(%u): protocol not registered for %s", __func__, proto,
561 *qlimitp = netisr_proto[proto].np_qlimit;
577 u_int i, proto;
582 proto = nhp->nh_proto;
586 KASSERT(proto < NETISR_MAXPROT,
587 ("%s(%u): protocol too big for %s", __func__, proto, name));
590 KASSERT(netisr_proto[proto].np_handler != NULL,
591 ("%s(%u): protocol not registered for %s", __func__, proto,
594 netisr_proto[proto].np_qlimit = qlimit;
596 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
640 u_int i, proto;
642 proto = nhp->nh_proto;
646 KASSERT(proto < NETISR_MAXPROT,
647 ("%s(%u): protocol too big for %s", __func__, proto, name));
650 KASSERT(netisr_proto[proto].np_handler != NULL,
651 ("%s(%u): protocol not registered for %s", __func__, proto,
658 V_netisr_enable[proto] = 0;
664 netisr_proto[proto].np_name = NULL;
665 netisr_proto[proto].np_handler = NULL;
666 netisr_proto[proto].np_m2flow = NULL;
667 netisr_proto[proto].np_m2cpuid = NULL;
668 netisr_proto[proto].np_qlimit = 0;
669 netisr_proto[proto].np_policy = 0;
671 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
682 u_int proto;
684 proto = nhp->nh_proto;
687 KASSERT(proto < NETISR_MAXPROT,
688 ("%s(%u): protocol too big for %s", __func__, proto, nhp->nh_name));
690 KASSERT(netisr_proto[proto].np_handler != NULL,
691 ("%s(%u): protocol not registered for %s", __func__, proto,
694 V_netisr_enable[proto] = 1;
699 netisr_drain_proto_vnet(struct vnet *vnet, u_int proto)
715 npwp = &nwsp->nws_work[proto];
757 u_int proto;
759 proto = nhp->nh_proto;
762 KASSERT(proto < NETISR_MAXPROT,
763 ("%s(%u): protocol too big for %s", __func__, proto, nhp->nh_name));
765 KASSERT(netisr_proto[proto].np_handler != NULL,
766 ("%s(%u): protocol not registered for %s", __func__, proto,
769 V_netisr_enable[proto] = 0;
771 netisr_drain_proto_vnet(curvnet, proto);
883 netisr_process_workstream_proto(struct netisr_workstream *nwsp, u_int proto)
893 ("%s(%u): not running", __func__, proto));
894 KASSERT(proto >= 0 && proto < NETISR_MAXPROT,
895 ("%s(%u): invalid proto\n", __func__, proto));
897 npwp = &nwsp->nws_work[proto];
913 nwsp->nws_pendingbits &= ~(1 << proto);
926 netisr_proto[proto].np_handler(m);
930 ("%s(%u): len %u", __func__, proto, local_npw.nw_len));
931 if (netisr_proto[proto].np_drainedcpu)
932 netisr_proto[proto].np_drainedcpu(nwsp->nws_cpu);
988 netisr_queue_workstream(struct netisr_workstream *nwsp, u_int proto,
1013 nwsp->nws_pendingbits |= (1 << proto);
1029 netisr_queue_internal(u_int proto, struct mbuf *m, u_int cpuid)
1045 npwp = &nwsp->nws_work[proto];
1047 error = netisr_queue_workstream(nwsp, proto, npwp, m, &dosignal);
1055 netisr_queue_src(u_int proto, uintptr_t source, struct mbuf *m)
1063 KASSERT(proto < NETISR_MAXPROT,
1064 ("%s: invalid proto %u", __func__, proto));
1069 KASSERT(netisr_proto[proto].np_handler != NULL,
1070 ("%s: invalid proto %u", __func__, proto));
1073 if (V_netisr_enable[proto] == 0) {
1079 m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_DEFERRED,
1086 error = netisr_queue_internal(proto, m, cpuid);
1096 netisr_queue(u_int proto, struct mbuf *m)
1099 return (netisr_queue_src(proto, 0, m));
1107 netisr_dispatch_src(u_int proto, uintptr_t source, struct mbuf *m)
1119 KASSERT(proto < NETISR_MAXPROT,
1120 ("%s: invalid proto %u", __func__, proto));
1124 npp = &netisr_proto[proto];
1125 KASSERT(npp->np_handler != NULL, ("%s: invalid proto %u", __func__,
1126 proto));
1129 if (V_netisr_enable[proto] == 0) {
1137 return (netisr_queue_src(proto, source, m));
1148 npwp = &nwsp->nws_work[proto];
1151 netisr_proto[proto].np_handler(m);
1165 m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_HYBRID,
1175 npwp = &nwsp->nws_work[proto];
1186 error = netisr_queue_workstream(nwsp, proto, npwp, m,
1202 netisr_proto[proto].np_handler(m);
1228 error = netisr_queue_internal(proto, m, cpuid);
1239 netisr_dispatch(u_int proto, struct mbuf *m)
1242 return (netisr_dispatch_src(proto, 0, m));
1377 u_int counter, proto;
1386 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1387 npp = &netisr_proto[proto];
1393 snpp->snp_proto = proto;
1413 SYSCTL_PROC(_net_isr, OID_AUTO, proto,
1481 u_int counter, cpuid, proto;
1495 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1496 npp = &netisr_proto[proto];
1499 nwp = &nwsp->nws_work[proto];
1503 snwp->snw_proto = proto;
1534 int first, proto;
1544 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1545 if (netisr_proto[proto].np_handler == NULL)
1547 nwp = &nwsp->nws_work[proto];
1555 netisr_proto[proto].np_name, nwp->nw_len,