Discussion:
svn commit: r217018 - stable/8/sys/netinet
(too old to reply)
George V. Neville-Neil
2011-01-05 18:52:30 UTC
Permalink
Author: gnn
Date: Wed Jan 5 18:52:30 2011
New Revision: 217018
URL: http://svn.freebsd.org/changeset/base/217018

Log:
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.

Reviewed by: rwatson, bz

Modified:
stable/8/sys/netinet/tcp_var.h

Modified: stable/8/sys/netinet/tcp_var.h
==============================================================================
--- stable/8/sys/netinet/tcp_var.h Wed Jan 5 18:46:05 2011 (r217017)
+++ stable/8/sys/netinet/tcp_var.h Wed Jan 5 18:52:30 2011 (r217018)
@@ -177,7 +177,6 @@ struct tcpcb {
u_long snd_cwnd_prev; /* cwnd prior to retransmit */
u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */
tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */
- int t_sndzerowin; /* zero-window updates sent */
u_int t_badrxtwin; /* window for retransmit recovery */
u_char snd_limited; /* segments limited transmitted */
/* SACK related state */
@@ -194,14 +193,15 @@ struct tcpcb {
u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */
int rfbuf_cnt; /* recv buffer autoscaling byte count */
struct toe_usrreqs *t_tu; /* offload operations vector */
- int t_sndrexmitpack; /* retransmit packets sent */
- int t_rcvoopack; /* out-of-order packets received */
void *t_toe; /* TOE pcb pointer */
int t_bytes_acked; /* # bytes acked during current RTT */

- int t_ispare; /* explicit pad for 64bit alignment */
+ int t_sndzerowin; /* zero-window updates sent */
+ uint64_t t_sndrexmitpack;/* retransmit packets sent */
+ uint64_t t_rcvoopack; /* out-of-order packets received */
+
void *t_pspare2[6]; /* 2 CC / 4 TBD */
- uint64_t _pad[12]; /* 7 UTO, 5 TBD (1-2 CC/RTT?) */
+ uint64_t _pad[10]; /* 7 UTO, 3 TBD (1-2 CC/RTT?) */
};

/*
Lawrence Stewart
2011-01-07 05:15:17 UTC
Permalink
Hi George,
Post by George V. Neville-Neil
Author: gnn
Date: Wed Jan 5 18:52:30 2011
New Revision: 217018
URL: http://svn.freebsd.org/changeset/base/217018
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.
Reviewed by: rwatson, bz
stable/8/sys/netinet/tcp_var.h
Modified: stable/8/sys/netinet/tcp_var.h
==============================================================================
--- stable/8/sys/netinet/tcp_var.h Wed Jan 5 18:46:05 2011 (r217017)
+++ stable/8/sys/netinet/tcp_var.h Wed Jan 5 18:52:30 2011 (r217018)
@@ -177,7 +177,6 @@ struct tcpcb {
u_long snd_cwnd_prev; /* cwnd prior to retransmit */
u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */
tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */
- int t_sndzerowin; /* zero-window updates sent */
u_int t_badrxtwin; /* window for retransmit recovery */
u_char snd_limited; /* segments limited transmitted */
/* SACK related state */
@@ -194,14 +193,15 @@ struct tcpcb {
u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */
int rfbuf_cnt; /* recv buffer autoscaling byte count */
struct toe_usrreqs *t_tu; /* offload operations vector */
- int t_sndrexmitpack; /* retransmit packets sent */
- int t_rcvoopack; /* out-of-order packets received */
void *t_toe; /* TOE pcb pointer */
int t_bytes_acked; /* # bytes acked during current RTT */
- int t_ispare; /* explicit pad for 64bit alignment */
+ int t_sndzerowin; /* zero-window updates sent */
+ uint64_t t_sndrexmitpack;/* retransmit packets sent */
+ uint64_t t_rcvoopack; /* out-of-order packets received */
+
void *t_pspare2[6]; /* 2 CC / 4 TBD */
- uint64_t _pad[12]; /* 7 UTO, 5 TBD (1-2 CC/RTT?) */
+ uint64_t _pad[10]; /* 7 UTO, 3 TBD (1-2 CC/RTT?) */
};
On my stable/8 machine after updating world but not kernel I see "struct
xtcpcb size mismatch" messages which indicates the ABI has been futzed with.

Looking at the above diff I think this commit does indeed change the ABI
and therefore needs to be tweaked in order to maintain our current ABI
preservation policy for stable branches (unless I'm missing something?).
If the change to the ABI is intentional, a note in UPDATING would
probably be warranted.

Cheers,
Lawrence
Bjoern A. Zeeb
2011-01-07 09:36:38 UTC
Permalink
Post by Lawrence Stewart
Hi George,
Post by George V. Neville-Neil
Author: gnn
Date: Wed Jan 5 18:52:30 2011
New Revision: 217018
URL: http://svn.freebsd.org/changeset/base/217018
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.
Reviewed by: rwatson, bz
stable/8/sys/netinet/tcp_var.h
...
Post by Lawrence Stewart
On my stable/8 machine after updating world but not kernel I see "struct
xtcpcb size mismatch" messages which indicates the ABI has been futzed with.
Be sure that it's not local changes.
Post by Lawrence Stewart
Looking at the above diff I think this commit does indeed change the ABI
and therefore needs to be tweaked in order to maintain our current ABI
preservation policy for stable branches (unless I'm missing something?).
If the change to the ABI is intentional, a note in UPDATING would
probably be warranted.
I think you are missing that that was the "repair" commit. Are you
sure you didn't pickup the wrong versions? There was about a 1 day
timeframe, where things were hosed but I believe George fixed them
all.

Hmm looking at the diff committed more closely I see that the two
uint64_t are not were they should be. Are you by any chance on i386
or another 32bit platform?

uint64_t t_sndrexmitpack;/* retransmit packets sent */
uint64_t t_rcvoopack; /* out-of-order packets received */
should move after t_pspare2[6] and the patch I had seen had that.

Maybe we should even move them after _pad[] to keep the spares
together.

Can you test this one?
http://people.freebsd.org/~bz/20110107-01-restore-xtcpcb-ABI.diff


/bz
--
Bjoern A. Zeeb You have to have visions!
<ks> Going to jail sucks -- <bz> All my daemons like it!
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
George Neville-Neil
2011-01-07 14:52:42 UTC
Permalink
Post by Bjoern A. Zeeb
Post by Lawrence Stewart
Hi George,
Post by George V. Neville-Neil
Author: gnn
Date: Wed Jan 5 18:52:30 2011
New Revision: 217018
URL: http://svn.freebsd.org/changeset/base/217018
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.
Reviewed by: rwatson, bz
stable/8/sys/netinet/tcp_var.h
...
Post by Lawrence Stewart
On my stable/8 machine after updating world but not kernel I see "struct
xtcpcb size mismatch" messages which indicates the ABI has been futzed
with.
Post by Bjoern A. Zeeb
Be sure that it's not local changes.
Post by Lawrence Stewart
Looking at the above diff I think this commit does indeed change the ABI
and therefore needs to be tweaked in order to maintain our current ABI
preservation policy for stable branches (unless I'm missing something?).
If the change to the ABI is intentional, a note in UPDATING would
probably be warranted.
I think you are missing that that was the "repair" commit. Are you
sure you didn't pickup the wrong versions? There was about a 1 day
timeframe, where things were hosed but I believe George fixed them
all.
Hmm looking at the diff committed more closely I see that the two
uint64_t are not were they should be. Are you by any chance on i386
or another 32bit platform?
uint64_t t_sndrexmitpack;/* retransmit packets sent */
uint64_t t_rcvoopack; /* out-of-order packets received */
should move after t_pspare2[6] and the patch I had seen had that.
Maybe we should even move them after _pad[] to keep the spares
together.
Can you test this one?
http://people.freebsd.org/~bz/20110107-01-restore-xtcpcb-ABI.diff
I think something like this is appropriate even regardless as it is cleaner to
use the pad[] spots where they were originally.
Yeah, that patch is the right way to go.

Best,
George
John Baldwin
2011-01-07 13:04:46 UTC
Permalink
Post by Bjoern A. Zeeb
Post by Lawrence Stewart
Hi George,
Post by George V. Neville-Neil
Author: gnn
Date: Wed Jan 5 18:52:30 2011
New Revision: 217018
URL: http://svn.freebsd.org/changeset/base/217018
Fix binary compatability for netstats across the -x/-T changes
that have been previously MFC'd.
Reviewed by: rwatson, bz
stable/8/sys/netinet/tcp_var.h
...
Post by Lawrence Stewart
On my stable/8 machine after updating world but not kernel I see "struct
xtcpcb size mismatch" messages which indicates the ABI has been futzed with.
Be sure that it's not local changes.
Post by Lawrence Stewart
Looking at the above diff I think this commit does indeed change the ABI
and therefore needs to be tweaked in order to maintain our current ABI
preservation policy for stable branches (unless I'm missing something?).
If the change to the ABI is intentional, a note in UPDATING would
probably be warranted.
I think you are missing that that was the "repair" commit. Are you
sure you didn't pickup the wrong versions? There was about a 1 day
timeframe, where things were hosed but I believe George fixed them
all.
Hmm looking at the diff committed more closely I see that the two
uint64_t are not were they should be. Are you by any chance on i386
or another 32bit platform?
uint64_t t_sndrexmitpack;/* retransmit packets sent */
uint64_t t_rcvoopack; /* out-of-order packets received */
should move after t_pspare2[6] and the patch I had seen had that.
Maybe we should even move them after _pad[] to keep the spares
together.
Can you test this one?
http://people.freebsd.org/~bz/20110107-01-restore-xtcpcb-ABI.diff
I think something like this is appropriate even regardless as it is cleaner to
use the pad[] spots where they were originally.
--
John Baldwin
Loading...