if_wg: wg_mbuf_reset: don't free send tags
Send tags are only added on mbufs sent to an interface which supports if_snd_tag_alloc. Just assert that they are never present instead. Signed-off-by: John Baldwin <jhb@FreeBSD.org>
This commit is contained in:
parent
60ac45234c
commit
dad3e685f5
10
src/compat.h
10
src/compat.h
|
@ -68,16 +68,6 @@ static inline void taskqgroup_drain_all(struct taskqgroup *tqg)
|
|||
#undef atomic_load_ptr
|
||||
#define atomic_load_ptr(p) (*(volatile __typeof(*p) *)(p))
|
||||
|
||||
static inline void m_snd_tag_rele(struct m_snd_tag *mst)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
if (!mst)
|
||||
return;
|
||||
ifp = mst->ifp;
|
||||
ifp->if_snd_tag_free(mst);
|
||||
if_rele(ifp);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if __FreeBSD_version < 1202000
|
||||
|
|
|
@ -1478,10 +1478,8 @@ wg_mbuf_reset(struct mbuf *m)
|
|||
m_tag_delete(m, t);
|
||||
}
|
||||
|
||||
if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) {
|
||||
m_snd_tag_rele(m->m_pkthdr.snd_tag);
|
||||
m->m_pkthdr.snd_tag = NULL;
|
||||
}
|
||||
KASSERT((m->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0,
|
||||
("%s: mbuf %p has a send tag", __func__, m));
|
||||
|
||||
m->m_pkthdr.csum_flags = 0;
|
||||
m->m_pkthdr.PH_per.sixtyfour[0] = 0;
|
||||
|
|
Loading…
Reference in New Issue