Discussion:
[ofw] rsocket.c & gtod.c duplicate include error.
Smith, Stan
2013-02-05 21:43:06 UTC
Permalink
Hello,
When building winOFED from trunk\ svn.3425 I find duplicate definitions of gettimeofday() link errors when building ulp\librdmacm?
Duplication is resultant from



ulp\librdmacm\src\cma_main.cpp:#include "../../../etc/user/gtod.c"

ulp\librdmacm\src\rsocket.cpp:#include "../../../etc/user/gtod.c"



Fixed by removing gtod.c include from rsocket.cpp



Signed-off by stan smith (***@intel.com<mailto:***@intel.com>)





--- C:/Users/scsmith/AppData/Local/Temp/rsocket.cpp-revBASE.svn000.tmp.cpp Thu Jan 24 15:02:56 2013

+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/librdmacm/src/rsocket.cpp Tue Feb 05 13:28:32 2013

@@ -60,8 +60,6 @@

#include <rdma/rsocket.h>

#include "cma.h"

#include "indexer.h"

-#include "../../../etc/user/gtod.c"

-

#define RS_OLAP_START_SIZE 2048

#define RS_MAX_TRANSFER 65536

#define RS_MAX_BACKLOG 256
Schmitt, Hubert
2013-02-06 08:21:26 UTC
Permalink
Hi Stan,

Can it be that you were still using the "original" gtod.c? Because in my
recent rsocket patch there was also contained an updated gtod.c with
(among other things) gettimeofday() changed to static.
However, non-static gettimeofday() is just as well for me. But I
recommend to at least adopt my real modification of gtod.c, in order to
fix a potential division-by-zero issue when calling gettimeofday() from
a multi-threaded process (see also ofw Digest, Vol 68, Issue 2 from Dec
17, 2012).

Thanks,
Hubert


________________________________

Von: Smith, Stan [mailto:***@intel.com]
Gesendet: Dienstag, 5. Februar 2013 22:43
An: Schmitt, Hubert
Cc: ***@lists.openfabrics.org
Betreff: rsocket.c & gtod.c duplicate include error.



Hello,

When building winOFED from trunk\ svn.3425 I find duplicate
definitions of gettimeofday() link errors when building ulp\librdmacm?

Duplication is resultant from



ulp\librdmacm\src\cma_main.cpp:#include
"../../../etc/user/gtod.c"

ulp\librdmacm\src\rsocket.cpp:#include
"../../../etc/user/gtod.c"



Fixed by removing gtod.c include from rsocket.cpp



Signed-off by stan smith (***@intel.com)





---
C:/Users/scsmith/AppData/Local/Temp/rsocket.cpp-revBASE.svn000.tmp.cpp
Thu Jan 24 15:02:56 2013

+++
C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/librdmacm/s
rc/rsocket.cpp Tue Feb 05 13:28:32 2013

@@ -60,8 +60,6 @@

#include <rdma/rsocket.h>

#include "cma.h"

#include "indexer.h"

-#include "../../../etc/user/gtod.c"

-

#define RS_OLAP_START_SIZE 2048

#define RS_MAX_TRANSFER 65536

#define RS_MAX_BACKLOG 256





This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message.

Thank you for your co-operation.
Hefty, Sean
2013-02-06 14:47:50 UTC
Permalink
Can it be that you were still using the "original" gtod.c? Because in my recent
rsocket patch there was also contained an updated gtod.c with (among other
things) gettimeofday() changed to static.
However, non-static gettimeofday() is just as well for me. But I recommend to
at least adopt my real modification of gtod.c, in order to fix a potential
division-by-zero issue when calling gettimeofday() from a multi-threaded
process (see also ofw Digest, Vol 68, Issue 2 from Dec 17, 2012).
I applied the original patch to the tree, did test builds, and committed those changes with only slight modifications to fix my build. Stan pulled them, so he should have everything.
Smith, Stan
2013-02-06 17:05:51 UTC
Permalink
From: Schmitt, Hubert [mailto:***@oce.com]
Sent: Wednesday, February 06, 2013 12:21 AM
To: Smith, Stan
Cc: ***@lists.openfabrics.org
Subject: AW: rsocket.c & gtod.c duplicate include error.

Hi Stan,

Can it be that you were still using the "original" gtod.c? Because in my recent rsocket patch there was also contained an updated gtod.c with (among other things) gettimeofday() changed to static.
However, non-static gettimeofday() is just as well for me. But I recommend to at least adopt my real modification of gtod.c, in order to fix a potential division-by-zero issue when calling gettimeofday() from a multi-threaded process (see also ofw Digest, Vol 68, Issue 2 from Dec 17, 2012).

All your divide-by-zero mods are included.

The 'static' qualifier is IMHO is the incorrect attribute to be using; how many copies of gettimeofday() does an application need?
Not to mention the 'static' inhibits the detection of duplicate gtod.c includes.
It's truly sad that gettimeofday() is a '#include <etc/gtod.c>' and not in a library somewhere.
I'm convinced that for now, the 'static' qualifier should be removed and will do so.

Stan.

Thanks,
Hubert
________________________________
Von: Smith, Stan [mailto:***@intel.com]
Gesendet: Dienstag, 5. Februar 2013 22:43
An: Schmitt, Hubert
Cc: ***@lists.openfabrics.org<mailto:***@lists.openfabrics.org>
Betreff: rsocket.c & gtod.c duplicate include error.
Hello,
When building winOFED from trunk\ svn.3425 I find duplicate definitions of gettimeofday() link errors when building ulp\librdmacm?
Duplication is resultant from



ulp\librdmacm\src\cma_main.cpp:#include "../../../etc/user/gtod.c"

ulp\librdmacm\src\rsocket.cpp:#include "../../../etc/user/gtod.c"



Fixed by removing gtod.c include from rsocket.cpp



Signed-off by stan smith (***@intel.com<mailto:***@intel.com>)





--- C:/Users/scsmith/AppData/Local/Temp/rsocket.cpp-revBASE.svn000.tmp.cpp Thu Jan 24 15:02:56 2013

+++ C:/Users/scsmith/Documents/openIB-windows/ofw/gen1/trunk/ulp/librdmacm/src/rsocket.cpp Tue Feb 05 13:28:32 2013

@@ -60,8 +60,6 @@

#include <rdma/rsocket.h>

#include "cma.h"

#include "indexer.h"

-#include "../../../etc/user/gtod.c"

-

#define RS_OLAP_START_SIZE 2048

#define RS_MAX_TRANSFER 65536

#define RS_MAX_BACKLOG 256


This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message. Thank you for your co-operation.
Loading...