Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2015 14:37:56 -0700
From:      Rui Paulo <rpaulo@me.com>
To:        freebsd-net@freebsd.org
Cc:        Mark Johnston <markj@freebsd.org>
Subject:   Re: moving struct bpf_if to bpf.c
Message-ID:  <3983189.kvm2TuS0U7@akita>
In-Reply-To: <20150418210855.GA50409@charmander.west.isilon.com>
References:  <20150418210855.GA50409@charmander.west.isilon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3983189.kvm2TuS0U7>