| 1026 | } |
| 1027 | |
| 1028 | static int |
| 1029 | netisr_queue_internal(u_int proto, struct mbuf *m, u_int cpuid) |
| 1030 | { |
| 1031 | struct netisr_workstream *nwsp; |
| 1032 | struct netisr_work *npwp; |
| 1033 | int dosignal, error; |
| 1034 | |
| 1035 | #ifdef NETISR_LOCKING |
| 1036 | NETISR_LOCK_ASSERT(); |
| 1037 | #endif |
| 1038 | KASSERT(cpuid <= mp_maxid, ("%s: cpuid too big (%u, %u)", __func__, |
| 1039 | cpuid, mp_maxid)); |
| 1040 | KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); |
| 1041 | |
| 1042 | dosignal = 0; |
| 1043 | error = 0; |
| 1044 | nwsp = DPCPU_ID_PTR(cpuid, nws); |
| 1045 | npwp = &nwsp->nws_work[proto]; |
| 1046 | NWS_LOCK(nwsp); |
| 1047 | error = netisr_queue_workstream(nwsp, proto, npwp, m, &dosignal); |
| 1048 | NWS_UNLOCK(nwsp); |
| 1049 | if (dosignal) |
| 1050 | NWS_SIGNAL(nwsp); |
| 1051 | return (error); |
| 1052 | } |
| 1053 | |
| 1054 | int |
| 1055 | netisr_queue_src(u_int proto, uintptr_t source, struct mbuf *m) |
no test coverage detected