Date: Sat, 29 Jun 2019 00:51:39 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349532 - head/sys/net Message-ID: <201906290051.x5T0pdRN037549@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Sat Jun 29 00:51:38 2019 New Revision: 349532 URL: https://svnweb.freebsd.org/changeset/base/349532 Log: Support IFCAP_NOMAP in vlan(4). Enable IFCAP_NOMAP for a vlan interface if it is supported by the underlying trunk device. Reviewed by: gallatin, hselasky, rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20616 Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Sat Jun 29 00:50:25 2019 (r349531) +++ head/sys/net/if_vlan.c Sat Jun 29 00:51:38 2019 (r349532) @@ -1731,6 +1731,16 @@ vlan_capabilities(struct ifvlan *ifv) ena |= (mena & IFCAP_TXRTLMT); #endif + /* + * If the parent interface supports unmapped mbufs, so does + * the VLAN interface. Note that this should be fine even for + * interfaces that don't support hardware tagging as headers + * are prepended in normal mbufs to unmapped mbufs holding + * payload data. + */ + cap |= (p->if_capabilities & IFCAP_NOMAP); + ena |= (mena & IFCAP_NOMAP); + ifp->if_capabilities = cap; ifp->if_capenable = ena; ifp->if_hwassist = hwa;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906290051.x5T0pdRN037549>