/**Created by Alan Wang*/ /**Modified by Alan Wang*/ #include #include #include #include #include #include #include #include #include "commIpcApi.h" #include "ibStress.h" unsigned int g_ibHIC_TestMap=0; unsigned int g_ibHIC_PeerInitReady=0; unsigned int g_ibHIC_PeerEchoMap=0; void ibHIC_InfoPeerInitREADY(void) { EIPC_MSG msg; // ipcEthernetRegister(IPC_APP_IBHIC_PeerInitReady, NULL); /* send information */ msg.hdr.app = IPC_APP_IBHIC_PeerInitReady; msg.hdr.flag = IPC_APP_REQUEST; msg.hdr.len = 0; ipcEthernetSend((EIPC_MSG*) &msg); // ipcEthernetDeregister(IPC_APP_IBHIC_PeerInitReady); // printk("\n"); printk("== InfiniBand HIC Initialization Ready Send!! (through IPC Protocol) == \n"); // printk("\n"); } void ibHIC_InfoPeerTestStart(unsigned int Ch_map) { EIPC_MSG msg; // ipcEthernetRegister(IPC_APP_Peer_IBHIC_GetChMap, NULL); /* send information */ msg.hdr.app = IPC_APP_IBHIC_PeerTestStart; msg.hdr.flag = IPC_APP_REQUEST; msg.hdr.len = sizeof(unsigned int); memcpy(&msg.body[0], &Ch_map, sizeof(unsigned int)); ipcEthernetSend((EIPC_MSG*) &msg); // ipcEthernetDeregister(IPC_APP_Peer_IBHIC_GetChMap); // printk("\n"); printk("== InfiniBand HIC Send Test Channel Map(0x%08x)!! (through IPC Protocol) == \n", Ch_map); // printk("\n"); } void ibHIC_PeerAnsReady4Test(unsigned int Ch_map) { EIPC_MSG msg; // ipcEthernetRegister(IPC_APP_IBHIC_PeerReady4Test, NULL); /* send information */ msg.hdr.app = IPC_APP_IBHIC_PeerReady4Test; msg.hdr.flag = IPC_APP_REQUEST; msg.hdr.len = sizeof(unsigned int); memcpy(&msg.body[0], &Ch_map, sizeof(unsigned int)); ipcEthernetSend((EIPC_MSG*) &msg); // ipcEthernetDeregister(IPC_APP_IBHIC_PeerReady4Test); // printk("\n"); printk("== Controller A InfiniBand HIC Initialization Ready for Test!! (through IPC Protocol) == \n"); // printk("\n"); } INT32 ibHIC_InfoPeerTestStop(unsigned int kind) { EIPC_MSG msg; msg.hdr.app = IPC_APP_IBHIC_PeerTestStop; msg.hdr.flag = IPC_APP_REQUEST; msg.hdr.len = sizeof(unsigned int); memcpy(&msg.body[0], &kind, sizeof(unsigned int)); ipcEthernetSend((EIPC_MSG*) &msg); // printk("\n"); printk("== Request Controller A to Stop IB test!! (through IPC Protocol) == \n"); // printk("\n"); } MODULE_AUTHOR( "will.lee@netapp.com" ); MODULE_DESCRIPTION( "NetApp Infiniband Stress Code" ); MODULE_LICENSE( "GPL" ); MODULE_VERSION( "0.1" );