<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I've trimmed down and in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/SCIF-data-transfer/m-p/1034870#M43540</link>
    <description>&lt;P&gt;I've trimmed down and annotated your code to highlight the most significant error I saw:&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kims.W wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;host side---------------&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;    scif_register( ep, ptr, len, /* RO_host = */ 0, SCIF_PROT_READ | SCIF_PROT_WRITE, /* note this! */ SCIF_MAP_FIXED)
    ret = scif_writeto(ep, /* RO_host */ (long)ptr, strlen(ptr), /* RO_mic */ (long)remote_ptr, 0);
    scif_fence_signal(ep, /* RO_host */ (long)ptr, strlen(ptr), /* RO_mic */ (long)remote_ptr, strlen(ptr), SCIF_FENCE_INIT_SELF|SCIF_SIGNAL_LOCAL|SCIF_SIGNAL_REMOTE);&lt;/PRE&gt;

&lt;P&gt;mic side---------------&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;    /* RO_mic = */ scif_register(new_ep, ptr, len, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, 0);
&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You're casting the local and remote virtual addresses (pointer values)&amp;nbsp;to&amp;nbsp;&lt;EM&gt;long&lt;/EM&gt; and using them as the local and remote&amp;nbsp;window offsets. While it's possible to set up such a 1:1 correspondence between virtual address space and registration offset space, you haven't actually done that. Unless I've made a mistake in my quick scan of your code, the host registration offset you should be passing is 0 and the card registration offset you should be passing is the ignored return value of the card-side scif_register() call.&lt;/P&gt;

&lt;P&gt;If you haven't already, you should read the &lt;A href="http://registrationcenter.intel.com/irc_nas/5017/SCIF_UserGuide.pdf"&gt;SCIF User Guide&lt;/A&gt;. In particular, you may find the bits of the example in section 3.5.1 which are highlighted in red helpful to review.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Dec 2014 23:22:24 GMT</pubDate>
    <dc:creator>Evan_P_Intel</dc:creator>
    <dc:date>2014-12-31T23:22:24Z</dc:date>
    <item>
      <title>SCIF data transfer</title>
      <link>https://community.intel.com/t5/Software-Archive/SCIF-data-transfer/m-p/1034869#M43539</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
	&lt;P style="line-height: 19.5120010375977px;"&gt;Hi,&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I want to send data using RMA function of SCIF.&lt;/SPAN&gt;&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Register is success. But do not write to remote memory.&lt;/SPAN&gt;&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;strerror (errno) output "No such device or address" message is displayed.&lt;/SPAN&gt;&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;Below is a simple code of both side(host, mic)&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;host side---------------&lt;/P&gt;

	&lt;PRE class="brush:cpp;"&gt;    int len = 1024;                                                                                             
    void *ptr = NULL;                                                                                       
    uint32_t page_size = sysconf(_SC_PAGESIZE);                                                                       
                                                                                                                      
    posix_memalign(&amp;amp;ptr, page_size, len);                                                                       
    scif_register( ep, ptr, len, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, SCIF_MAP_FIXED)
                                                                                                
    void *remote_ptr = NULL;                                                                        
    scif_recv(ep, &amp;amp;remote_ptr, sizeof(void *), SCIF_RECV_BLOCK);  
                                                                                    
    strcpy(ptr, "Hello, World!");                                                                               
    ret = scif_writeto(ep, (long)ptr, strlen(ptr), (long)remote_ptr, 0);                                                                            
    if(ret) {                                                                                                         
        fprintf(stderr, "SCIF Writeto Failed(%s)\n", strerror(errno));         //"No such device or address"
    }                                                                                                                 
                                                                                                                      
    scif_fence_signal( ep, (long)ptr, strlen(ptr), (long)remote_ptr, strlen(ptr)                                              
        , SCIF_FENCE_INIT_SELF|SCIF_SIGNAL_LOCAL|SCIF_SIGNAL_REMOTE );  &lt;/PRE&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;mic side&lt;SPAN style="line-height: 19.5120010375977px;"&gt;---------------&lt;/SPAN&gt;&lt;/P&gt;

	&lt;PRE class="brush:cpp;"&gt;    int len = 1024; 
    void *ptr;                                                                                                        
    uint32_t page_size = sysconf(_SC_PAGESIZE);                                                                                                                          
    
    posix_memalign(&amp;amp;ptr, page_size, len);                                                               
    scif_register( new_ep, ptr, len, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, 0);
                                                                                                                      
    scif_send(new_ep, &amp;amp;ptr, sizeof(void *), SCIF_SEND_BLOCK);   
    sleep(60);   
&lt;/PRE&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P style="line-height: 19.5120010375977px;"&gt;&lt;SPAN style="line-height: 19.5120010375977px; font-size: 1em;"&gt;Please give me a help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Dec 2014 05:54:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/SCIF-data-transfer/m-p/1034869#M43539</guid>
      <dc:creator>Kims_W</dc:creator>
      <dc:date>2014-12-29T05:54:58Z</dc:date>
    </item>
    <item>
      <title>I've trimmed down and</title>
      <link>https://community.intel.com/t5/Software-Archive/SCIF-data-transfer/m-p/1034870#M43540</link>
      <description>&lt;P&gt;I've trimmed down and annotated your code to highlight the most significant error I saw:&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kims.W wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;host side---------------&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;    scif_register( ep, ptr, len, /* RO_host = */ 0, SCIF_PROT_READ | SCIF_PROT_WRITE, /* note this! */ SCIF_MAP_FIXED)
    ret = scif_writeto(ep, /* RO_host */ (long)ptr, strlen(ptr), /* RO_mic */ (long)remote_ptr, 0);
    scif_fence_signal(ep, /* RO_host */ (long)ptr, strlen(ptr), /* RO_mic */ (long)remote_ptr, strlen(ptr), SCIF_FENCE_INIT_SELF|SCIF_SIGNAL_LOCAL|SCIF_SIGNAL_REMOTE);&lt;/PRE&gt;

&lt;P&gt;mic side---------------&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;    /* RO_mic = */ scif_register(new_ep, ptr, len, 0, SCIF_PROT_READ | SCIF_PROT_WRITE, 0);
&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You're casting the local and remote virtual addresses (pointer values)&amp;nbsp;to&amp;nbsp;&lt;EM&gt;long&lt;/EM&gt; and using them as the local and remote&amp;nbsp;window offsets. While it's possible to set up such a 1:1 correspondence between virtual address space and registration offset space, you haven't actually done that. Unless I've made a mistake in my quick scan of your code, the host registration offset you should be passing is 0 and the card registration offset you should be passing is the ignored return value of the card-side scif_register() call.&lt;/P&gt;

&lt;P&gt;If you haven't already, you should read the &lt;A href="http://registrationcenter.intel.com/irc_nas/5017/SCIF_UserGuide.pdf"&gt;SCIF User Guide&lt;/A&gt;. In particular, you may find the bits of the example in section 3.5.1 which are highlighted in red helpful to review.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2014 23:22:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/SCIF-data-transfer/m-p/1034870#M43540</guid>
      <dc:creator>Evan_P_Intel</dc:creator>
      <dc:date>2014-12-31T23:22:24Z</dc:date>
    </item>
  </channel>
</rss>

