Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Different results from iperf3 vs. bwctl -T iperf3


Chronological Thread 
  • 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




Archive powered by MHonArc 2.6.16.

Top of Page