static void netmsg_sync_func(netmsg_t msg);
static void netmsg_service_loop(void *arg);
static void cpu0_cpufn(struct mbuf **mp, int hoff);
+static void netisr_nohashck(struct mbuf *, const struct pktinfo *);
struct netmsg_port_registration {
TAILQ_ENTRY(netmsg_port_registration) npr_entry;
ni = &netisrs[num];
ni->ni_handler = handler;
+ ni->ni_hashck = netisr_nohashck;
ni->ni_cpufn = cpufn;
netmsg_init(&ni->ni_netmsg, NULL, &netisr_adone_rport, 0, NULL);
}
+void
+netisr_register_hashcheck(int num, netisr_hashck_t hashck)
+{
+ struct netisr *ni;
+
+ KASSERT((num > 0 && num <= NELEM(netisrs)),
+ ("netisr_register: bad isr %d", num));
+
+ ni = &netisrs[num];
+ ni->ni_hashck = hashck;
+}
+
void
netisr_register_rollup(netisr_ru_t ru_func)
{
#endif
br->br_isset = 0;
}
+
+static void
+netisr_nohashck(struct mbuf *m, const struct pktinfo *pi __unused)
+{
+ m->m_flags &= ~M_HASH;
+}
+
+void
+netisr_hashcheck(int num, struct mbuf *m, const struct pktinfo *pi)
+{
+ struct netisr *ni;
+
+ if (num < 0 || num >= NETISR_MAX)
+ panic("Bad isr %d", num);
+
+ /*
+ * Valid netisr?
+ */
+ ni = &netisrs[num];
+ if (ni->ni_handler == NULL)
+ panic("Unregistered isr %d\n", num);
+
+ ni->ni_hashck(m, pi);
+}