Date: Sat, 3 Apr 2004 13:39:13 -0800 From: Luigi Rizzo <rizzo@icir.org> To: net@freebsd.org Subject: removal of unused and redundant fields in 'struct ifnet' Message-ID: <20040403133913.A67287@xorpc.icir.org>
next in thread | raw e-mail | index | archive | help
Hi, in -current, I am about to remove the following unused fields from 'struct ifnet', hope there are no objections: - int (*if_done) /* output complete routine */ - (struct ifnet *); /* (XXX not used; fake prototype) */ - int (*if_poll_recv) /* polled receive routine */ - (struct ifnet *, int *); - int (*if_poll_xmit) /* polled transmit routine */ - (struct ifnet *, int *); - void (*if_poll_intren) /* polled interrupt reenable routine */ - (struct ifnet *); - void (*if_poll_slowinput) /* input routine for slow devices */ - (struct ifnet *, struct mbuf *); - struct ifqueue *if_poll_slowq; /* input queue for slow devices */ On passing, i also note that the following fields are only used by IPv6, and they seem quite redundant (and space-consuming! AF_MAX is 36) struct ifprefixhead if_prefixhead; /* list of prefixes per if */ void *if_afdata[AF_MAX]; int if_afdata_initialized; struct mtx if_afdata_mtx; I suppose all of this could go into a 'struct inet6_data *', using the lock on the struct ifnet for the initial creation, and an additional lock inside the struct for specific ops. While this is not a change i plan to make soon, at some point in the future I would like to fix this too. comments ? cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040403133913.A67287>