commit e85b4ba99daeb86c62a0b659b57cde2c8b3ede8e Author: Ryota Ozaki Date: Fri Jan 15 12:28:30 2016 +0900 Stop using ip_pktq diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 67e2cf1..0775e06 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -874,9 +874,13 @@ ether_input(struct ifnet *ifp, struct mbuf *m) if (__predict_true(pktq)) { const uint32_t h = pktq_rps_hash(m); + if (pktq == ip_pktq) { + ipintr2(m); + } else { if (__predict_false(!pktq_enqueue(pktq, m, h))) { m_freem(m); } + } return; } diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 2821847..5d82fe0 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -239,6 +239,7 @@ struct in_multi { #include extern pktqueue_t *ip_pktq; +void ipintr2(struct mbuf *); extern int ip_dad_count; /* Duplicate Address Detection probes */ diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index c64045e..da6e017 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -359,6 +359,17 @@ ipintr(void *arg __unused) mutex_exit(softnet_lock); } +void +ipintr2(struct mbuf *m) +{ + + KASSERT(cpu_softintr_p()); + + mutex_enter(softnet_lock); + ip_input(m); + mutex_exit(softnet_lock); +} + /* * IP input routine. Checksum and byte swap header. If fragmented * try to reassemble. Process options. Pass to next level.