From owner-cvs-src@FreeBSD.ORG Fri Dec 1 17:50:12 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64BE716A494; Fri, 1 Dec 2006 17:50:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id D10AB43CA8; Fri, 1 Dec 2006 17:49:56 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kB1HoCVj096581; Fri, 1 Dec 2006 17:50:12 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kB1HoBnP096579; Fri, 1 Dec 2006 17:50:11 GMT (envelope-from imp) Message-Id: <200612011750.kB1HoBnP096579@repoman.freebsd.org> From: Warner Losh Date: Fri, 1 Dec 2006 17:50:11 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/net if_llc.h 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: Fri, 01 Dec 2006 17:50:12 -0000 imp 2006-12-01 17:50:11 UTC FreeBSD src repository Modified files: sys/net if_llc.h Log: Move the __packed declarations. This makes sizeof(struct llc) 8 again on the arm. Add an assert to ensure that the size is 8 to prefent others from falling into this trap (we should have more of these). Why the construct: struct foo { union bar { struct { ... } __packed fred; ... } __packed wilma; } __packed; has a different packing than: struct foo { union bar { struct { ... } fred __packed; ... } wilma __packed; } __packed; is beyond my ability to ferret out of the gcc documentation. Most likely some subtle binding issue (eg before it says the struct itself is packed, while after it means that the whole struct is packed into the thing it is in). Pointers to relevant documentation would be appreciated. Revision Changes Path 1.13 +11 -7 src/sys/net/if_llc.h