Re: USER_SDMA
"Reese Faucette" <[email protected]> Wed, 14 Jul 2004 14:30:28 -0700
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <04d701c469e9$c93b7530$58c31fac@BART> |
> I am changing Myrinet NIC firmware to copy a data from NIC memory to NIC
> memory, instead of using DMA.
> Especially, I take a look into "gm_sdma.c" and "gm_user_dma.h".
> In "gm_user_dma.h", there is a "USER_SDMA" macro.
> As I understand, USER_SDMA is performing SDMA to bring a data from a
> main memory into a NIC memory.
> Would you explain what USER_SDMA really does?
>
> So, I just commented USER_SDMA macro, and then, copy some data from NIC
> memory to NIC memory.
> It does not work.
> Do you have any idea about what I missed?
Gyu-
It is not possible for us to debug your situation with only the information
provided. You may find it helpful to use prints in your MCP and then you
can debug it like any other C program. The easiest way to do prints from
the MCP is using _GM_NOTE(). e.g.:
_GM_NOTE(("i = %d\n", i)); /* note the double parens */
Although I do see one thing in the code snippet you mailed out earlier -
Look up the definition of USER_SDMA in mcp/gm_user_dma.h. You will notice
that the first argument, "payload" is an output, not an input. I think you
want to change:
gm_bcopy(port->cache, payload,send_len) ;
to be:
payload = (gm_lp_t)(h+1);
gm_bcopy(port->cache, payload,send_len) ;
otherwise, you are copying your data into random memry locations.
the functions in GM are not that mysterious. Just track down the definition
of any function you have a question about and you should be able to tell
what it does.
-reese