[ofw] WSD Detail Sample Code

Tzachi Dar tzachid at mellanox.co.il
Tue Jan 25 01:26:44 PST 2011


Hi,

It seems from your question that there is some confusion:

There are two ways to work with IB:


1)      Use native ib program. This means that you have to write your code differently, in order for it to work. To see examples of such programs you can download our code from svn://openib.tc.cornell.edu/gen1/trunk. there are many examples there (trunk\tools\perftests\user\send_bw, or trunk\tests\perftest\send_bw). In general in windows there are many apis that one can use. I’m currently not explaining this thoroughly, because I believe that you want to go to option #2.

2)      Use one of WSD or SDP. With this approach you don’t have to change anything in your source code. In fact, you don’t actually need to have the source code at all. For example the sdpconnect program (source attached) is a native windows socket program. You can find more information about how to run your program with one of this in the Mellanox documentation. Please also read the limitations section, as both have their limitations.

By the way, when you write “SDPConnect.exe  showed great performance”, how did you run it (wsd? SDP?)?

Thanks
Tzachi

From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of suo zhang
Sent: Tuesday, January 25, 2011 10:13 AM
To: ofw at lists.openfabrics.org
Subject: Re: [ofw] WSD Detail Sample Code

Hi

Following is our question.

Thanks

Suo

----------------------------------------------------------------------------
--------------------------------------------



We already wrote a IOCP and WinSocket based communication program. The
testing upon Infiniband indicated that this program still go over the
IPOverIP and has the overhead of Windows IP stack.



We saw this PPT and want to know how our WinSocket based program can fully
utilize the capabilities of Inifniband RDMA and how to write code over WSD
to avoid the overhead of Windows IP stack.



We just need a sample code like the source code of tool
SDPConnect.exe(within the Mallanox driver tools folder) etc. It showed great
performance we can’t achieved by our WinSocket code.



We’ve got some progress improvement:

1.       By searching the source code in OpenFabric, it turns out that these
open source include some tools’ source code, like this c file attached;

2.       There was some code founded in such tool’s source code like:

while (ccnt < user_param->iters || rcnt < user_param->iters ) {

          while (scnt < user_param->iters && (scnt - ccnt) <
user_param->tx_depth / 2) {

                   ib_send_wr_t  *bad_wr;

                   tposted[scnt] = get_cycles();

                   ib_status = ib_post_send(qp, &ctx->wr, &bad_wr);

                   if (ib_status != IB_SUCCESS) {

                            fprintf(stderr, "Couldn't post send: scnt=%d
ib_status %d\n",

                                      scnt,ib_status);

                            return 1;

                   }

                   ++scnt;

                   PERF_DEBUG("scnt = %d \n",scnt);

          }



But no document just have to guess from the source code for what “qp”,
“ctx” means and how to use them. These “ib_” initiated APIs were
absolutely NOT WinSocket APIs. What we asked for is SDK or documents for how
to using such API and which Header files we should include and which lib
have to be linked. A sample project will be OK if no such document exists.




Thanks

Suo
2011/1/25 Smith, Stan <stan.smith at intel.com<mailto:stan.smith at intel.com>>
Please submit modified question to ofw at lists.openfabrics.org<mailto:ofw at lists.openfabrics.org>

Furthermore, please identify which sample code you are referring to in order that someone can respond to your question.

Which Windows OS and processor (x86,x64,ia64).

Generally speaking WSD (WinSock Direct) is not used directly but utilized by opening a socket(AF_INET) which beneath the socket layer that has a WSD provider enabled for the specific address family.
For winOFED 2.3 release, run ‘installsp –l’ to see WSD providers.
WSD in no longer enabled by default for svr2008* – see ‘installsp –I’

Stan.


From: Suo Zhang <zhangs at bjcarnation.com.cn<mailto:zhangs at bjcarnation.com.cn>>
Date: 2011/1/20
Subject: WSD Detail Sample Code
To: membership at openfabrics.org<mailto:membership at openfabrics.org>
Hi
When I use WSD in my project, I found the sample code is very difficult to use. Because the sample code is very simple.
I want to know where can I get a detail sample code for WSD. Because my application must use zero copy to get good performance.
Thanks
Best regards

张锁 Suo Zhang
Sales Engineer
北京石竹科技有限公司
Beijing Carnation Technologies Limited
Mobile +86-186-1175-6167
Tel:+8610-68587971-8029
Fax:+8610-68587975
Http://www.vme.cn<http://www.vme.cn/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110125/f9a200d6/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SdpConnect.cpp
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110125/f9a200d6/attachment.ksh>


More information about the ofw mailing list