Date: Mon, 20 Feb 2012 18:42:15 -0800 From: Juli Mallett <jmallett@FreeBSD.org> To: Adrian Chadd <adrian@freebsd.org> Cc: net@freebsd.org, Brooks Davis <brooks@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>, Marcel Moolenaar <marcel@xcllnt.net> Subject: Re: Abstracting struct ifnet Message-ID: <CACVs6=9efUMQHTr9RH9SHm=Apo0PV7NeKcwFyV%2B2k9HCFNjS9g@mail.gmail.com> In-Reply-To: <CAJ-Vmo=T28t0XBmzmkNjOEA6wJ-Ub3Bc9DiWu1upDpBt8bM=XA@mail.gmail.com> References: <338757D1-6B1E-49CF-983F-5D5851066FD3@xcllnt.net> <20120220231601.GA51310@lor.one-eyed-alien.net> <20120221001552.GA60050@onelab2.iet.unipi.it> <CAJ-Vmoni1DHpxet08=JWSDGLFBP7MHO4-WDBLwX9vGxibR=EDA@mail.gmail.com> <CACVs6=_kTVC7tnsPJqgRq3VtUaSefkunVU8JetTdsXjGCmUT7A@mail.gmail.com> <CAJ-Vmo=T28t0XBmzmkNjOEA6wJ-Ub3Bc9DiWu1upDpBt8bM=XA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 20, 2012 at 18:34, Adrian Chadd <adrian@freebsd.org> wrote: > Is the target though _binary_ compatibility? Just having a blessed > method of doing accessor method things will buy more source > flexibility. The KBI can stay the same in the default case and IMHO > this kind of thing gives developers more power to do smart invariant > and debugging things. KBI compatibility requires very little discipline and makes loadable modules for network drivers much less hellish. Inlines, macros and full visibility of ifnet in -current may be useful, but unless there's a performance reason for doing so, retaining KBI compatibility *and* the ability to merge ifnet changes to -stable sounds pretty nice to me. > Being able to say "inform me every time an interface flag changes" > would actually be kind of nice when debugging some of the issues i've > been facing with ath. I've been half tempted to do this -inside- the > ath driver, partially to restore the OS portability it once tried to > achieve. I think that it is rare that this is useful in debugging, and something of a red herring. Even invariants are almost a red herring: really, we shouldn't be using these individual methods to tweak structure fields, either, we should have a way of describing a network driver more semantically, such that the invariants are richer and also not as complicated, and also more comprehensive. Source compatibility is the biggest win, but a little self-discipline to win what measure of binary compatibility we can seems perfectly sensible. (And at some point, we could even replace ifnet with something that's less of a strange grab bag assortment that's awkward to explain to new driver writers, and keep both source and binary compatibility for a reasonable period in doing so. Unlikely to happen in the near term, but wouldn't it be nice?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=9efUMQHTr9RH9SHm=Apo0PV7NeKcwFyV%2B2k9HCFNjS9g>