svn commit: r349532 - head/sys/net
John Baldwin
jhb at FreeBSD.org
Sat Jun 29 00:51:40 UTC 2019
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;
More information about the svn-src-head
mailing list