From owner-svn-src-head@FreeBSD.ORG Thu Oct 2 05:56:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F03535A; Thu, 2 Oct 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BC428E9; Thu, 2 Oct 2014 05:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s925uIgD064422; Thu, 2 Oct 2014 05:56:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s925uIY4064421; Thu, 2 Oct 2014 05:56:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410020556.s925uIY4064421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 2 Oct 2014 05:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272396 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 05:56:18 -0000 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;