Add padding for anticipated functionality

- vimage
 - TOE
 - multiq
 - host rtentry caching

Rename spare used by 80211 to if_llsoftc

Reviewed by: rwatson, gnn
MFC after: 1 day
This commit is contained in:
Kip Macy 2007-12-07 01:46:13 +00:00
parent 41eee5558c
commit 2de2af32a0
7 changed files with 28 additions and 13 deletions

View file

@ -161,8 +161,7 @@ struct ifnet {
int (*if_resolvemulti) /* validate/resolve multicast */
(struct ifnet *, struct sockaddr **, struct sockaddr *);
struct ifaddr *if_addr; /* pointer to link-level address */
void *if_spare2; /* spare pointer 2 */
void *if_spare3; /* spare pointer 3 */
void *if_llsoftc; /* link layer softc */
int if_drv_flags; /* driver-managed status flags */
u_int if_spare_flags2; /* spare flags 2 */
struct ifaltq if_snd; /* output queue (includes altq) */
@ -187,6 +186,8 @@ struct ifnet {
/* protected by if_addr_mtx */
void *if_pf_kif;
void *if_lagg; /* lagg glue */
void *if_pspare[10]; /* multiq/TOE 3; vimage 3; general use 4 */
int if_ispare[2]; /* general use 2 */
};
typedef void if_init_f_t(void *);

View file

@ -275,8 +275,8 @@ ieee80211_ifattach(struct ieee80211com *ic)
if (ic->ic_reset == NULL)
ic->ic_reset = ieee80211_default_reset;
KASSERT(ifp->if_spare2 == NULL, ("oops, hosed"));
ifp->if_spare2 = ic; /* XXX temp backpointer */
KASSERT(ifp->if_llsoftc == NULL, ("oops, hosed"));
ifp->if_llsoftc = ic;
}
void

View file

@ -248,7 +248,7 @@ ieee80211_output(struct ifnet *ifp, struct mbuf *m,
struct sockaddr *dst, struct rtentry *rt0)
{
#define senderr(e) do { error = (e); goto bad;} while (0)
struct ieee80211com *ic = ifp->if_spare2; /* XXX */
struct ieee80211com *ic = ifp->if_llsoftc; /* XXX */
struct ieee80211_node *ni = NULL;
struct ieee80211_frame *wh;
int error;

View file

@ -113,19 +113,13 @@ struct icmp6_filter;
struct inpcb {
LIST_ENTRY(inpcb) inp_hash; /* hash list */
LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
u_int32_t inp_flow;
/* Local and foreign ports, local and foreign addr. */
struct in_conninfo inp_inc;
void *inp_ppcb; /* pointer to per-protocol pcb */
struct inpcbinfo *inp_pcbinfo; /* PCB list info */
struct socket *inp_socket; /* back pointer to socket */
/* list for this PCB's local port */
struct label *inp_label; /* MAC label */
u_int32_t inp_flow;
int inp_flags; /* generic IP/datagram flags */
struct inpcbpolicy *inp_sp; /* for IPSEC */
u_char inp_vflag; /* IP version flag (v4/v6) */
#define INP_IPV4 0x1
#define INP_IPV6 0x2
@ -137,6 +131,15 @@ struct inpcb {
u_char inp_ip_ttl; /* time to live proto */
u_char inp_ip_p; /* protocol proto */
u_char inp_ip_minttl; /* minimum TTL or drop */
uint32_t inp_ispare1; /* connection id / queue id */
void *inp_pspare[2]; /* rtentry / general use */
/* Local and foreign ports, local and foreign addr. */
struct in_conninfo inp_inc;
/* list for this PCB's local port */
struct label *inp_label; /* MAC label */
struct inpcbpolicy *inp_sp; /* for IPSEC */
/* Protocol-dependent part; options. */
struct {
@ -262,6 +265,12 @@ struct inpcbinfo {
*/
u_quad_t ipi_gencnt;
struct mtx ipi_mtx;
/*
* vimage 1
* general use 1
*/
void *ipi_pspare[2];
};
#define INP_LOCK_INIT(inp, d, t) \

View file

@ -135,6 +135,9 @@ struct syncache {
#define SCF_UNREACH 0x10 /* icmp unreachable received */
#define SCF_SIGNATURE 0x20 /* send MD5 digests */
#define SCF_SACK 0x80 /* send SACK option */
#ifndef DISABLE_TCP_OFFLOAD
void *sc_pspare[2]; /* toepcb / toe_usrreqs */
#endif
#ifdef MAC
struct label *sc_label; /* MAC label reference */
#endif

View file

@ -206,6 +206,7 @@ struct tcpcb {
int t_rttlow; /* smallest observerved RTT */
u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */
int rfbuf_cnt; /* recv buffer autoscaling byte count */
void *t_pspare[5]; /* toe usrreqs / toepcb * / congestion algo / vimage / 1 general use */
};
#define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)

View file

@ -55,6 +55,7 @@ struct ucred {
struct uidinfo *cr_uidinfo; /* per euid resource consumption */
struct uidinfo *cr_ruidinfo; /* per ruid resource consumption */
struct prison *cr_prison; /* jail(2) */
void *cr_pspare[3]; /* vimage 2; general use 1 */
#define cr_endcopy cr_label
struct label *cr_label; /* MAC label */
struct auditinfo_addr cr_audit; /* Audit properties. */