Date: Mon, 1 Jul 2019 20:38:05 +0000 From: Phabricator <phabric-noreply@FreeBSD.org> To: Phabricator <phabric-noreply@FreeBSD.org> Cc: freebsd-net@freebsd.org Subject: [Differential] D20824: Fix netmap + vlan panics Message-ID: <6daab43ebb657d9d7f57620efcf263f1@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-heyctxdkstfd3icnu4gy-req@reviews.freebsd.org> References: <differential-rev-PHID-DREV-heyctxdkstfd3icnu4gy-req@reviews.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] This revision was automatically updated to reflect the committed changes. Closed by commit rS349581: netmap: fix two panics with emulated adapter (authored by vmaffione). Herald added a subscriber: imp. CHANGED PRIOR TO COMMIT https://reviews.freebsd.org/D20824?vs=59258&id=59287#toc REPOSITORY rS FreeBSD src repository CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D20824?vs=59258&id=59287 CHANGES SINCE LAST ACTION https://reviews.freebsd.org/D20824/new/ REVISION DETAIL https://reviews.freebsd.org/D20824 AFFECTED FILES head/sys/dev/netmap/netmap_freebsd.c CHANGE DETAILS diff --git a/head/sys/dev/netmap/netmap_freebsd.c b/head/sys/dev/netmap/netmap_freebsd.c --- a/head/sys/dev/netmap/netmap_freebsd.c +++ b/head/sys/dev/netmap/netmap_freebsd.c @@ -444,6 +444,7 @@ m->m_ext.ext_size = len; #endif /* __FreeBSD_version >= 1100000 */ + m->m_flags |= M_PKTHDR; m->m_len = m->m_pkthdr.len = len; /* mbuf refcnt is not contended, no need to use atomic @@ -452,7 +453,9 @@ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = a->ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ + CURVNET_SET(ifp->if_vnet); ret = NA(ifp)->if_transmit(ifp, m); + CURVNET_RESTORE(); return ret ? -1 : 0; } EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: aleksandr.fedorov_itglobal.com, vmaffione, jhb, bz Cc: imp, olevole_olevole.ru, krion, evgueni.gavrilov_itglobal.com, freebsd-net-list [-- Attachment #2 --] diff --git a/head/sys/dev/netmap/netmap_freebsd.c b/head/sys/dev/netmap/netmap_freebsd.c --- a/head/sys/dev/netmap/netmap_freebsd.c +++ b/head/sys/dev/netmap/netmap_freebsd.c @@ -444,6 +444,7 @@ m->m_ext.ext_size = len; #endif /* __FreeBSD_version >= 1100000 */ + m->m_flags |= M_PKTHDR; m->m_len = m->m_pkthdr.len = len; /* mbuf refcnt is not contended, no need to use atomic @@ -452,7 +453,9 @@ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = a->ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ + CURVNET_SET(ifp->if_vnet); ret = NA(ifp)->if_transmit(ifp, m); + CURVNET_RESTORE(); return ret ? -1 : 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6daab43ebb657d9d7f57620efcf263f1>
