perfsonar-user - Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3
Subject: perfSONAR User Q&A and Other Discussion
List archive
- From: Brian Candler <>
- To: Aaron Brown <>
- Cc: "" <>
- Subject: Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3
- Date: Thu, 11 Dec 2014 19:56:43 +0000
- Domainkey-signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=MJZO7b dESS214J2mbqjVG0LNNr8NjnJ5lVxkACSGCmG4YBsflrCHSP+jaBCuqlVqgWhihs ZhlAarLlhlboRqBr5J9a91CvvNSnnHCIaNzfk9GjAUYNXW4NShfoDWNLVGOQLaUg rjmdP7oMkODVPwHQZtwckTrzCTUOzvFptHg14=
On 10/12/2014 20:59, Brian Candler wrote:
- wrong size passed to memcpy/memcmp: sizeof(sid), where sid is function argument uid8_t[16], gives sizeof(uid8_t*) instead(Demo below)
It occurs to me that this could cause an incompatibility between current and fixed software, if the old software sets only 8 bytes of sid but the fixed software compares all 16 bytes.
Maybe it's better just to fix the memcpy() calls for now, and leave memcmp() to match only 8 bytes (with a comment to this effect). Then in a few generations, fix the memcmp calls too.
Regards,
Brian.
---- 8< ----
#include <stdio.h>
typedef unsigned char BWLSID[16];
static void foo(BWLSID sid)
{
printf("%ld\n", (long)sizeof(sid));
}
int main(void)
{
BWLSID sid;
printf("%ld\n", (long)sizeof(sid));
foo(sid);
return 0;
}
When I run this, I get:
16
8
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, (continued)
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/07/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Aaron Brown, 12/09/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/09/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/09/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Aaron Brown, 12/10/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/10/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/11/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Aaron Brown, 12/11/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/11/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/07/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/10/2014
- Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3, Brian Candler, 12/11/2014
Archive powered by MHonArc 2.6.16.