Date: Wed, 16 Jun 2004 09:53:38 -0700 From: Luigi Rizzo <rizzo@icir.org> To: freebsd-net@freebsd.org Subject: Re: Must softc begin with arpcom? Message-ID: <20040616095338.A46666@xorpc.icir.org> In-Reply-To: <20040616132405.GB37246@empiric.dek.spc.org>; from bms@spc.org on Wed, Jun 16, 2004 at 02:24:05PM %2B0100 References: <20040616132405.GB37246@empiric.dek.spc.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 16, 2004 at 02:24:05PM +0100, Bruce M Simpson wrote: > In if_arp.h: > 103 * The code is written so that each *_softc _must_ begin with a > 104 * struct arpcom, which in turn _must_ begin with a struct ifnet. > > It seems to be that this may no longer be the case after luigi's > recent cleanups (IFP2AC() and friends) which I nearly ended up > duplicating. it is still necessary. Many drivers certainly make this assumption by casting either ifp or sc to (struct arpcom *). One easy way out that does not require to touch all drivers is to move the only remaining arpcom field (one, plus one which is only used by ng_ether and can go into the af_data array) into the struct ifnet and '#define arpcom ifnet' The #define then can be removed after a cleaning pass on all drivers (which i'd postpone to a later time when we know what we want to do with the arpcom field, given that it is supposed to be driver-specific or possibly useless). cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040616095338.A46666>