From owner-svn-src-head@FreeBSD.ORG Thu Jul 3 20:16:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08BB8283; Thu, 3 Jul 2014 20:16:49 +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 EA2E72FE6; Thu, 3 Jul 2014 20:16:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s63KGm6j059018; Thu, 3 Jul 2014 20:16:48 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s63KGmlu059017; Thu, 3 Jul 2014 20:16:48 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201407032016.s63KGmlu059017@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 3 Jul 2014 20:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268235 - head/sys/mips/atheros 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 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, 03 Jul 2014 20:16:49 -0000 Author: loos Date: Thu Jul 3 20:16:48 2014 New Revision: 268235 URL: http://svnweb.freebsd.org/changeset/base/268235 Log: Properly advertise that if_arge can handle long frames (if_arge is set to handle packets up to 1536 bytes) This fixes the need to frag that could happen when using vlans on top of if_arge (which is a common case for the use the switch ports as individual NICs). Previously to this commit any vlan setup with if_arge as parent would have the MTU of the parent interface reduced by the size of dot1q header (4 bytes). Tested on TP-Link 1043ND (where the WAN port is just a switch port setup to tag packets in a different VLAN than the LAN ports). Reported and tested by: Harm Weites (harm at weites.com) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Thu Jul 3 20:10:30 2014 (r268234) +++ head/sys/mips/atheros/if_arge.c Thu Jul 3 20:16:48 2014 (r268235) @@ -703,6 +703,9 @@ arge_attach(device_t dev) ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); + /* Tell the upper layer(s) we support long frames. */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING;