From owner-cvs-src@FreeBSD.ORG Sun Sep 17 17:58:02 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34A7416A403; Sun, 17 Sep 2006 17:58:02 +0000 (UTC) (envelope-from prvs=julian=408aca9bb@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E31643D4C; Sun, 17 Sep 2006 17:58:01 +0000 (GMT) (envelope-from prvs=julian=408aca9bb@elischer.org) Received: from unknown (HELO [192.168.2.6]) ([10.251.60.65]) by a50.ironport.com with ESMTP; 17 Sep 2006 10:57:59 -0700 Message-ID: <450D8CA1.4020704@elischer.org> Date: Sun, 17 Sep 2006 10:57:53 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <200609171333.k8HDXUht029746@repoman.freebsd.org> In-Reply-To: <200609171333.k8HDXUht029746@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/bce if_bce.c src/sys/dev/bge if_bge.c src/sys/dev/em if_em.c src/sys/dev/ixgb if_ixgb.c src/sys/dev/nfe if_nfe.c src/sys/dev/nge if_nge.c src/sys/dev/re if_re.c src/sys/dev/stge if_stge.c src/sys/dev/ti if_ti.c src/sys/dev/txp ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2006 17:58:02 -0000 As I mentioned before, I am slightly uncomfortable with the implementation of this change as it puts protocol specific items into the protocol independent mbuf header. The fact that 99.99% of network traffic coming in and out of a machine uses this protocol at the the moment makes it understandable but if in 2 years a new transport mechanism sweeps the world for which this is irrelevent, or worse, has a different requirement for similar fields, are we going to add fields for that too? should this be defined as a link layer specific union for which we can add future variants? Andre Oppermann wrote: >andre 2006-09-17 13:33:30 UTC > > FreeBSD src repository > > Modified files: > sys/dev/bce if_bce.c > sys/dev/bge if_bge.c > sys/dev/em if_em.c > sys/dev/ixgb if_ixgb.c > sys/dev/nfe if_nfe.c > sys/dev/nge if_nge.c > sys/dev/re if_re.c > sys/dev/stge if_stge.c > sys/dev/ti if_ti.c > sys/dev/txp if_txp.c > sys/dev/vge if_vge.c > sys/net if_vlan.c if_vlan_var.h > sys/net80211 ieee80211_input.c ieee80211_output.c > sys/netgraph ng_vlan.c > sys/sys mbuf.h > Log: > Move ethernet VLAN tags from mtags to its own mbuf packet header field > m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf > signifies the presence and validity of its content. > > Drivers that support hardware VLAN tag stripping fill in the received > VLAN tag (containing both vlan and priority information) into the > ether_vtag mbuf packet header field: > > m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ > m->m_flags |= M_VLANTAG; > > to mark the packet m with the specified VLAN tag. > > On output the driver should check the mbuf for the M_VLANTAG flag to > see if a VLAN tag is present and valid: > > if (m->m_flags & M_VLANTAG) { > ... = m->m_pkthdr.ether_vtag; /* htons()? */ > ... pass tag to hardware ... > } > > VLAN tags are stored in host byte order. Byte swapping may be necessary. > > (Note: This driver conversion was mechanic and did not add or remove any > byte swapping in the drivers.) > > Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag > memory allocation have to be done. > > Reviewed by: thompsa, yar > Sponsored by: TCP/IP Optimization Fundraise 2005 > > Revision Changes Path > 1.8 +4 -7 src/sys/dev/bce/if_bce.c > 1.146 +4 -6 src/sys/dev/bge/if_bge.c > 1.145 +7 -12 src/sys/dev/em/if_em.c > 1.20 +13 -4 src/sys/dev/ixgb/if_ixgb.c > 1.5 +5 -16 src/sys/dev/nfe/if_nfe.c > 1.89 +5 -8 src/sys/dev/nge/if_nge.c > 1.75 +6 -9 src/sys/dev/re/if_re.c > 1.3 +6 -6 src/sys/dev/stge/if_stge.c > 1.125 +4 -7 src/sys/dev/ti/if_ti.c > 1.42 +4 -7 src/sys/dev/txp/if_txp.c > 1.26 +5 -8 src/sys/dev/vge/if_vge.c > 1.115 +5 -17 src/sys/net/if_vlan.c > 1.25 +16 -39 src/sys/net/if_vlan_var.h > 1.95 +2 -10 src/sys/net80211/ieee80211_input.c > 1.43 +2 -3 src/sys/net80211/ieee80211_output.c > 1.4 +8 -8 src/sys/netgraph/ng_vlan.c > 1.196 +1 -4 src/sys/sys/mbuf.h > >