"...composable_kernel_rocm.git" did not exist on "bfc997a7e69de42ac471f56c001725c9c438ac20"
Commit 4b89b515 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

corundum: send packets out via ethernet protocol

parent b13660a5
......@@ -562,6 +562,20 @@ class EthernetTx {
void packet_done()
{
volatile union cosim_eth_proto_d2n *msg = nicsim_d2n_alloc();
volatile struct cosim_eth_proto_d2n_send *send;
if (!msg)
throw "completion alloc failed";
send = &msg->send;
memcpy((void *) send->data, packet_buf, packet_len);
send->len = packet_len;
//WMB();
send->own_type = COSIM_ETH_PROTO_D2N_MSG_SEND |
COSIM_ETH_PROTO_D2N_OWN_NET;
std::cerr << "packet len=" << std::hex << packet_len << " ";
for (size_t i = 0; i < packet_len; i++) {
std::cerr << (unsigned) packet_buf[i] << " ";
......@@ -610,7 +624,9 @@ int main(int argc, char *argv[])
di.pci_revision = 0x00;
di.pci_msi_nvecs = 32;
if (nicsim_init(&di, "/tmp/cosim-pci", NULL, "/dev/shm/dummy_nic_shm")) {
if (nicsim_init(&di, "/tmp/cosim-pci", "/tmp/cosim-eth",
"/dev/shm/dummy_nic_shm"))
{
return EXIT_FAILURE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment