Lines Matching refs:proto

362 	u_int i, proto;
364 proto = nhp->nh_proto;
371 ("%s: nh_name NULL for %u", __func__, proto));
395 KASSERT(proto < NETISR_MAXPROT,
396 ("%s(%u, %s): protocol too big", __func__, proto, name));
402 KASSERT(netisr_proto[proto].np_name == NULL,
403 ("%s(%u, %s): name present", __func__, proto, name));
404 KASSERT(netisr_proto[proto].np_handler == NULL,
405 ("%s(%u, %s): handler present", __func__, proto, name));
407 netisr_proto[proto].np_name = name;
408 netisr_proto[proto].np_handler = nhp->nh_handler;
409 netisr_proto[proto].np_m2flow = nhp->nh_m2flow;
410 netisr_proto[proto].np_m2cpuid = nhp->nh_m2cpuid;
411 netisr_proto[proto].np_drainedcpu = nhp->nh_drainedcpu;
413 netisr_proto[proto].np_qlimit = netisr_defaultqlimit;
418 netisr_proto[proto].np_qlimit = netisr_maxqlimit;
420 netisr_proto[proto].np_qlimit = nhp->nh_qlimit;
421 netisr_proto[proto].np_policy = nhp->nh_policy;
422 netisr_proto[proto].np_dispatch = nhp->nh_dispatch;
424 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
426 npwp->nw_qlimit = netisr_proto[proto].np_qlimit;
441 u_int i, proto;
443 proto = nhp->nh_proto;
447 KASSERT(proto < NETISR_MAXPROT,
448 ("%s(%u): protocol too big for %s", __func__, proto, name));
451 KASSERT(netisr_proto[proto].np_handler != NULL,
452 ("%s(%u): protocol not registered for %s", __func__, proto,
456 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
473 u_int i, proto;
476 proto = nhp->nh_proto;
480 KASSERT(proto < NETISR_MAXPROT,
481 ("%s(%u): protocol too big for %s", __func__, proto, name));
484 KASSERT(netisr_proto[proto].np_handler != NULL,
485 ("%s(%u): protocol not registered for %s", __func__, proto,
489 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
505 u_int proto;
507 proto = nhp->nh_proto;
511 KASSERT(proto < NETISR_MAXPROT,
512 ("%s(%u): protocol too big for %s", __func__, proto, name));
515 KASSERT(netisr_proto[proto].np_handler != NULL,
516 ("%s(%u): protocol not registered for %s", __func__, proto,
518 *qlimitp = netisr_proto[proto].np_qlimit;
534 u_int i, proto;
539 proto = nhp->nh_proto;
543 KASSERT(proto < NETISR_MAXPROT,
544 ("%s(%u): protocol too big for %s", __func__, proto, name));
547 KASSERT(netisr_proto[proto].np_handler != NULL,
548 ("%s(%u): protocol not registered for %s", __func__, proto,
551 netisr_proto[proto].np_qlimit = qlimit;
553 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
596 u_int i, proto;
598 proto = nhp->nh_proto;
602 KASSERT(proto < NETISR_MAXPROT,
603 ("%s(%u): protocol too big for %s", __func__, proto, name));
606 KASSERT(netisr_proto[proto].np_handler != NULL,
607 ("%s(%u): protocol not registered for %s", __func__, proto,
610 netisr_proto[proto].np_name = NULL;
611 netisr_proto[proto].np_handler = NULL;
612 netisr_proto[proto].np_m2flow = NULL;
613 netisr_proto[proto].np_m2cpuid = NULL;
614 netisr_proto[proto].np_qlimit = 0;
615 netisr_proto[proto].np_policy = 0;
617 npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto];
728 netisr_process_workstream_proto(struct netisr_workstream *nwsp, u_int proto)
738 ("%s(%u): not running", __func__, proto));
739 KASSERT(proto >= 0 && proto < NETISR_MAXPROT,
740 ("%s(%u): invalid proto\n", __func__, proto));
742 npwp = &nwsp->nws_work[proto];
758 nwsp->nws_pendingbits &= ~(1 << proto);
769 netisr_proto[proto].np_handler(m);
773 ("%s(%u): len %u", __func__, proto, local_npw.nw_len));
774 if (netisr_proto[proto].np_drainedcpu)
775 netisr_proto[proto].np_drainedcpu(nwsp->nws_cpu);
831 netisr_queue_workstream(struct netisr_workstream *nwsp, u_int proto,
855 nwsp->nws_pendingbits |= (1 << proto);
871 netisr_queue_internal(u_int proto, struct mbuf *m, u_int cpuid)
887 npwp = &nwsp->nws_work[proto];
889 error = netisr_queue_workstream(nwsp, proto, npwp, m, &dosignal);
897 netisr_queue_src(u_int proto, uintptr_t source, struct mbuf *m)
905 KASSERT(proto < NETISR_MAXPROT,
906 ("%s: invalid proto %u", __func__, proto));
911 KASSERT(netisr_proto[proto].np_handler != NULL,
912 ("%s: invalid proto %u", __func__, proto));
914 m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_DEFERRED,
919 error = netisr_queue_internal(proto, m, cpuid);
929 netisr_queue(u_int proto, struct mbuf *m)
932 return (netisr_queue_src(proto, 0, m));
940 netisr_dispatch_src(u_int proto, uintptr_t source, struct mbuf *m)
951 KASSERT(proto < NETISR_MAXPROT,
952 ("%s: invalid proto %u", __func__, proto));
956 npp = &netisr_proto[proto];
957 KASSERT(npp->np_handler != NULL, ("%s: invalid proto %u", __func__,
958 proto));
962 return (netisr_queue_src(proto, source, m));
973 npwp = &nwsp->nws_work[proto];
976 netisr_proto[proto].np_handler(m);
990 m = netisr_select_cpuid(&netisr_proto[proto], NETISR_DISPATCH_HYBRID,
1000 npwp = &nwsp->nws_work[proto];
1011 error = netisr_queue_workstream(nwsp, proto, npwp, m,
1027 netisr_proto[proto].np_handler(m);
1053 error = netisr_queue_internal(proto, m, cpuid);
1064 netisr_dispatch(u_int proto, struct mbuf *m)
1067 return (netisr_dispatch_src(proto, 0, m));
1211 u_int counter, proto;
1220 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1221 npp = &netisr_proto[proto];
1227 snpp->snp_proto = proto;
1247 SYSCTL_PROC(_net_isr, OID_AUTO, proto,
1315 u_int counter, cpuid, proto;
1329 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1330 npp = &netisr_proto[proto];
1333 nwp = &nwsp->nws_work[proto];
1337 snwp->snw_proto = proto;
1368 int first, proto;
1378 for (proto = 0; proto < NETISR_MAXPROT; proto++) {
1379 if (netisr_proto[proto].np_handler == NULL)
1381 nwp = &nwsp->nws_work[proto];
1389 netisr_proto[proto].np_name, nwp->nw_len,