svn commit: r272396 - head/sys/net
Hiroki Sato
hrs at FreeBSD.org
Thu Oct 2 05:56:18 UTC 2014
Author: hrs
Date: Thu Oct 2 05:56:17 2014
New Revision: 272396
URL: https://svnweb.freebsd.org/changeset/base/272396
Log:
Virtualize net.link.vlan.soft_pad.
Modified:
head/sys/net/if_vlan.c
Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c Thu Oct 2 05:32:29 2014 (r272395)
+++ head/sys/net/if_vlan.c Thu Oct 2 05:56:17 2014 (r272396)
@@ -148,9 +148,10 @@ static SYSCTL_NODE(_net_link, IFT_L2VLAN
static SYSCTL_NODE(_net_link_vlan, PF_LINK, link, CTLFLAG_RW, 0,
"for consistency");
-static int soft_pad = 0;
-SYSCTL_INT(_net_link_vlan, OID_AUTO, soft_pad, CTLFLAG_RW, &soft_pad, 0,
- "pad short frames before tagging");
+static VNET_DEFINE(int, soft_pad);
+#define V_soft_pad VNET(soft_pad)
+SYSCTL_INT(_net_link_vlan, OID_AUTO, soft_pad, CTLFLAG_RW | CTLFLAG_VNET,
+ &VNET_NAME(soft_pad), 0, "pad short frames before tagging");
static const char vlanname[] = "vlan";
static MALLOC_DEFINE(M_VLAN, vlanname, "802.1Q Virtual LAN Interface");
@@ -1082,7 +1083,7 @@ vlan_transmit(struct ifnet *ifp, struct
* devices that just discard such runts instead or mishandle
* them somehow.
*/
- if (soft_pad && p->if_type == IFT_ETHER) {
+ if (V_soft_pad && p->if_type == IFT_ETHER) {
static char pad[8]; /* just zeros */
int n;
More information about the svn-src-all
mailing list