[Q] two questions...
Moon-Sang Lee <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <[email protected]> |
Hello. I'm developing a new MCP on M2L-PCI64B NIC. And I'm facing two problems right now. 1. lanai-gcc is suspected to have a bug. I spent lots of time to find where my bug lives and finally arrived here. A pointer operation used in my MCP shows very strange result. To simplfy my question, I list some parts of my code below. int gap; mem_info_t mem_table[MAX]; mem_info_t *mem_ptr; mem_ptr = &mem_table[index]; gap = mem_ptr-&mem_table[0]; // (a) gap = gap / 16; // (b) After line (a) is executed, the variable 'gap' shows 17. But after line (b) is executed the variable 'gap' shows 4 (not 1). ;-) By shifting 'gap' 4 bits instead of dividing by 16, (gap = gap >> 4), I can continue to work(fortunately the divisor is in the power of 2.). I'm using lanai-gcc version 2.95.2..1.4. In fact I don't think the lanai-gcc has a bug, but I can not understatnd this result. If my word is discourteous I apologize to Myricom team. 2. loopback packet is not received. I expect that a packet sent from node A to itself is received to verify that a switch is still alive. I filled up all the bytes in the routing header with 0x80 and set SA to 7. (I'm using 8 bytes routing header in my MCP.) But no packet is received. I have no problem for communication among different nodes. A packet sent from node A is received by node B. (node A should not be the same node as node B.) But a loopback packet is not received. How can I solve this problem? Any comments and suggestions will be appreciated. Thanks in advance... ------------Korea Advanced Institute of Science and Technology------------- Moon-Sang Lee [email protected] CS dept. KAIST +82-42-869-5552@calab Western Dorm. 6118 +82-42-879-6617@dormitory Homepage URL http://camars.kaist.ac.kr/~mslee ---------------------Computer Architecture Laboratory----------------------