diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-12-07 01:46:13 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-12-07 01:46:13 +0000 |
commit | 12b5f9c8c99a01b1d40e88aaa1a58ce757e68d5e (patch) | |
tree | 289212aebdc351f35a4be524028d42623b7ebba5 /sys | |
parent | fad90600c19b80ff5cafb5fd89a160912b9a6e81 (diff) | |
download | FreeBSD-src-12b5f9c8c99a01b1d40e88aaa1a58ce757e68d5e.zip FreeBSD-src-12b5f9c8c99a01b1d40e88aaa1a58ce757e68d5e.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_var.h | 5 | ||||
-rw-r--r-- | sys/net80211/ieee80211.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 2 | ||||
-rw-r--r-- | sys/netinet/in_pcb.h | 25 | ||||
-rw-r--r-- | sys/netinet/tcp_syncache.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 1 | ||||
-rw-r--r-- | sys/sys/ucred.h | 1 |
7 files changed, 28 insertions, 13 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 98f2793..50a469b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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 *); diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 38acb54..dbeb7a3 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -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 diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 8531135..6e31d1d 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -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; diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index abcac75..9b3c134 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -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) \ diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 946706d..c3e2b90 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -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 diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index b2bdecc..0999043 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -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) diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 1c8e7c8..b7587da 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -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. */ |