From owner-freebsd-net@FreeBSD.ORG Wed Apr 22 22:04:22 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 572B49FD; Wed, 22 Apr 2015 22:04:22 +0000 (UTC) Received: from st11p00im-asmtp003.me.com (st11p00im-asmtp003.me.com [17.172.80.97]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316B91BF2; Wed, 22 Apr 2015 22:04:21 +0000 (UTC) Received: from akita.localnet (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NN000AHLUR8BC10@st11p00im-asmtp003.me.com>; Sat, 18 Apr 2015 21:37:58 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-18_02:2015-04-17,2015-04-18,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1504180201 From: Rui Paulo To: freebsd-net@freebsd.org Cc: Mark Johnston Subject: Re: moving struct bpf_if to bpf.c Date: Sat, 18 Apr 2015 14:37:56 -0700 Message-id: <3983189.kvm2TuS0U7@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: <20150418210855.GA50409@charmander.west.isilon.com> References: <20150418210855.GA50409@charmander.west.isilon.com> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 22:04:22 -0000 On Saturday 18 April 2015 14:08:56 Mark Johnston wrote: > Hello, > > At the moment, bpf.h defines struct bpf_if differently depending on > whether BPF_INTERNAL is #defined. This causes problems with CTF, as it > results in a sort of bifurcation within the type graph: CTF sees two > different struct bpf_ifs, and so every struct/union containing a struct > bpf_if is duplicated, and so on. CTF currently imposes a limit of 2^15 > distinct types within a container, and several people have been running > into this limit. The type duplication exacerbates this problem. > > The change here fixes the issue by moving the definition of > struct bpf_if to bpf.c, and making its externally-used fields > available via struct bpf_if_ext: https://reviews.freebsd.org/D2319 > > In particular, the ext fields are at the same offsets within struct > bpf_if as before, so this change should have no functional impact. > Moreover, it reduces the number of types from 20879 to 15725 with my > (stripped-down) kernel config on amd64. Would anyone be willing to > review the proposed change? I've also placed the raw diff here: > https://people.freebsd.org/~markj/patches/bpf_entrails.diff Looks good to me. Thanks for fixing this! -- Rui Paulo