[DCCP]: Use `unsigned' for packet lengths
This patch implements a suggestion by Ian McDonald and
1) avoids tests against negative packet lengths by using unsigned (u32)
for packet payload lengths in the CCID send_packet()/packet_sent() routines
2) removes an now unnecessary test with
On 11/29/06, Gerrit Renker [EMAIL PROTECTED] wrote:
[DCCP]: Use `unsigned' for packet lengths
I'm wondering whether this code is 64 bit safe??? I don't think it is.
Arnaldo can probably advise.
We changed int to u32 for length and I went and checked the callers
and parameters. They all
Quoting Ian McDonald:
| On 11/29/06, Gerrit Renker [EMAIL PROTECTED] wrote:
| [DCCP]: Use `unsigned' for packet lengths
|
| I'm wondering whether this code is 64 bit safe??? I don't think it is.
| Arnaldo can probably advise.
|
| We changed int to u32 for length and I went and checked
Quoting Ian McDonald:
| I think I didn't explain my point well here. You can't change to u32
| but need to be unsigned int (not u64).
Don't get this: u32 is a 32-bit unsigned value and therefore looks sufficient -
and you
are proposing `unsigned int' to have easier conversion to skb-len,
On 11/29/06, Gerrit Renker [EMAIL PROTECTED] wrote:
Quoting Ian McDonald:
| I think I didn't explain my point well here. You can't change to u32
| but need to be unsigned int (not u64).
Don't get this: u32 is a 32-bit unsigned value and therefore looks sufficient -
and you
are proposing
On Wed, Nov 29, 2006 at 09:17:04AM +1300, Ian McDonald wrote:
On 11/29/06, Gerrit Renker [EMAIL PROTECTED] wrote:
Quoting Ian McDonald:
| I think I didn't explain my point well here. You can't change to u32
| but need to be unsigned int (not u64).
Don't get this: u32 is a 32-bit unsigned
| On 11/29/06, Gerrit Renker [EMAIL PROTECTED] wrote:
| Quoting Ian McDonald:
| | I think I didn't explain my point well here. You can't change to u32
| | but need to be unsigned int (not u64).
| Don't get this: u32 is a 32-bit unsigned value and therefore looks
sufficient - and you
|
In short: my suggestion is to keep an experimental patch for this and I would
even offer to
keep one up-to-date and online, if in return we can simplify the
socket API. Does
this sound like a more convincing argument?
Fair enough, I think we should go this way for now,
On 11/28/06, Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote:
On 11/28/06, Ian McDonald [EMAIL PROTECTED] wrote:
In short: my suggestion is to keep an experimental patch for this and I
would even offer to
keep one up-to-date and online, if in return we can simplify
the socket
OK, additionally I'm replacing:
+ DCCP_WARN(sockopt(PACKET_SIZE) is deprecated: fix your app\n);
+ err = -EINVAL;
By
+ DCCP_WARN(sockopt(PACKET_SIZE) not yet supported\n);
+ err = -EINVAL;
To better reflect what we've discussed so far.
On 11/28/06, Ian McDonald [EMAIL PROTECTED] wrote:
OK, additionally I'm replacing:
+ DCCP_WARN(sockopt(PACKET_SIZE) is deprecated: fix your
app\n);
+ err = -EINVAL;
By
+ DCCP_WARN(sockopt(PACKET_SIZE) not yet supported\n);
+ err =
Quoting Ian McDonald:
|In short: my suggestion is to keep an experimental patch for this and I
would even offer to
| keep one up-to-date and online, if in return we can simplify
the socket API. Does
| this sound like a more convincing argument?
|
| Fair enough,
On 11/28/06, Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote:
On 11/28/06, Ian McDonald [EMAIL PROTECTED] wrote:
OK, additionally I'm replacing:
+ DCCP_WARN(sockopt(PACKET_SIZE) is deprecated: fix your
app\n);
+ err = -EINVAL;
By
+
Quoting Eddie Kohler:
| | Would really appreciate if you could at some time have a look at the
moving-average patch. Have communicated
| | with Eddie again about it, and using MSS would at the moment be much
more complicated.
| |
| | Will look at it tomorrow (along with
ttcp-r: accept from localhost.ghostprotocols.net
ttcp-t: connect
ttcp-t: 256000 bytes in 22.98 real seconds = 10.88 KB/sec +++
ttcp-t: 1000 I/O calls, msec/call = 23.53, calls/sec = 43.51
ttcp-t: 0.2user 17.0sys 0:22real 75% 0i+0d 0maxrss 0+1pf 0+1000csw
ttcp-r: 256000 bytes in 23.31 real seconds
On 11/28/06, Ian McDonald [EMAIL PROTECTED] wrote:
ttcp-r: accept from localhost.ghostprotocols.net
ttcp-t: connect
ttcp-t: 256000 bytes in 22.98 real seconds = 10.88 KB/sec +++
ttcp-t: 1000 I/O calls, msec/call = 23.53, calls/sec = 43.51
ttcp-t: 0.2user 17.0sys 0:22real 75% 0i+0d 0maxrss
On 11/29/06, Arnaldo Carvalho de Melo [EMAIL PROTECTED] wrote:
On 11/28/06, Ian McDonald [EMAIL PROTECTED] wrote:
ttcp-r: accept from localhost.ghostprotocols.net
ttcp-t: connect
ttcp-t: 256000 bytes in 22.98 real seconds = 10.88 KB/sec +++
ttcp-t: 1000 I/O calls, msec/call = 23.53,
17 matches
Mail list logo