Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_ether.c
Show First 20 Lines • Show All 726 Lines • ▼ Show 20 Lines | if (m->m_pkthdr.len < sizeof(struct ether_header)) { | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
if (m->m_len < sizeof(struct ether_header) && | if (m->m_len < sizeof(struct ether_header) && | ||||
(m = m_pullup(m, sizeof(struct ether_header))) == NULL) | (m = m_pullup(m, sizeof(struct ether_header))) == NULL) | ||||
return (ENOBUFS); | return (ENOBUFS); | ||||
m->m_pkthdr.rcvif = ifp; | m->m_pkthdr.rcvif = ifp; | ||||
NET_EPOCH_ENTER(et); | |||||
glebius: This epoch entrance after /* Route packet back in */ was added by myself in r353292. Now that… | |||||
/* Pass the packet to the bridge, it may come back to us */ | /* Pass the packet to the bridge, it may come back to us */ | ||||
if (ifp->if_bridge) { | if (ifp->if_bridge) { | ||||
BRIDGE_INPUT(ifp, m); | BRIDGE_INPUT(ifp, m); | ||||
if (m == NULL) | if (m == NULL) { | ||||
NET_EPOCH_EXIT(et); | |||||
return (0); | return (0); | ||||
} | } | ||||
} | |||||
/* Route packet back in */ | /* Route packet back in */ | ||||
NET_EPOCH_ENTER(et); | |||||
ether_demux(ifp, m); | ether_demux(ifp, m); | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* Shutdown node. This resets the node but does not remove it | * Shutdown node. This resets the node but does not remove it | ||||
* unless the REALLY_DIE flag is set. | * unless the REALLY_DIE flag is set. | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |
This epoch entrance after /* Route packet back in */ was added by myself in r353292. Now that ng_socket and other entrance nodes are fixed, I'm not sure it is still needed. Of course your patch makes it more consistent - covering BRIDGE_INPUT, too.
Have you tested with this NET_EPOCH_ENTER removed but with ng_pppoe_rcvmsg() epoch in place?