Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_mbuf.c
Show First 20 Lines • Show All 1,580 Lines • ▼ Show 20 Lines | m_free_raw(struct mbuf *mb) | ||||
uma_zfree(zone_mbuf, mb); | uma_zfree(zone_mbuf, mb); | ||||
} | } | ||||
int | int | ||||
m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, | m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, | ||||
struct m_snd_tag **mstp) | struct m_snd_tag **mstp) | ||||
{ | { | ||||
if (ifp->if_snd_tag_alloc == NULL) | return (if_snd_tag_alloc(ifp, params, mstp)); | ||||
jhibbits: Not sure if it's better to just flat remove m_snd_tag_alloc() in this case. Thoughts? | |||||
jhbUnsubmitted Not Done Inline ActionsIt might very well be. I would perhaps do that as a separate followup though after this commit. jhb: It might very well be. I would perhaps do that as a separate followup though after this commit. | |||||
return (EOPNOTSUPP); | |||||
return (ifp->if_snd_tag_alloc(ifp, params, mstp)); | |||||
} | } | ||||
void | void | ||||
m_snd_tag_init(struct m_snd_tag *mst, struct ifnet *ifp, | m_snd_tag_init(struct m_snd_tag *mst, struct ifnet *ifp, | ||||
const struct if_snd_tag_sw *sw) | const struct if_snd_tag_sw *sw) | ||||
{ | { | ||||
if_ref(ifp); | if_ref(ifp); | ||||
Show All 15 Lines | |||||
} | } | ||||
void | void | ||||
m_rcvif_serialize(struct mbuf *m) | m_rcvif_serialize(struct mbuf *m) | ||||
{ | { | ||||
u_short idx, gen; | u_short idx, gen; | ||||
M_ASSERTPKTHDR(m); | M_ASSERTPKTHDR(m); | ||||
idx = m->m_pkthdr.rcvif->if_index; | idx = if_getindex(m->m_pkthdr.rcvif); | ||||
gen = m->m_pkthdr.rcvif->if_idxgen; | gen = if_getidxgen(m->m_pkthdr.rcvif); | ||||
m->m_pkthdr.rcvidx = idx; | m->m_pkthdr.rcvidx = idx; | ||||
m->m_pkthdr.rcvgen = gen; | m->m_pkthdr.rcvgen = gen; | ||||
if (__predict_false(m->m_pkthdr.leaf_rcvif != NULL)) { | if (__predict_false(m->m_pkthdr.leaf_rcvif != NULL)) { | ||||
idx = m->m_pkthdr.leaf_rcvif->if_index; | idx = if_getindex(m->m_pkthdr.leaf_rcvif); | ||||
gen = m->m_pkthdr.leaf_rcvif->if_idxgen; | gen = if_getidxgen(m->m_pkthdr.leaf_rcvif); | ||||
} else { | } else { | ||||
idx = -1; | idx = -1; | ||||
gen = 0; | gen = 0; | ||||
} | } | ||||
m->m_pkthdr.leaf_rcvidx = idx; | m->m_pkthdr.leaf_rcvidx = idx; | ||||
m->m_pkthdr.leaf_rcvgen = gen; | m->m_pkthdr.leaf_rcvgen = gen; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |
Not sure if it's better to just flat remove m_snd_tag_alloc() in this case. Thoughts?