e1000: More transmit changes...

This commit is contained in:
K. Lange 2021-09-09 16:47:27 +09:00
parent 6dce5659ec
commit 4b21b9f1fd
2 changed files with 30 additions and 1 deletions

29
apps/upload.krk Normal file
View File

@ -0,0 +1,29 @@
#!/bin/kuroko
import socket
import fileio
import kuroko
let b
with fileio.open(kuroko.argv[1],'rb') as f:
b = f.read()
let endpoint = kuroko.argv[2]
if ':' in endpoint:
let x = endpoint.split(':')
endpoint = (x[0], int(x[1]))
print("Uploading",len(b),"byte(s) to",endpoint)
let s = socket.socket()
s.connect(endpoint)
print("Connected...")
s.send(b)
print("Done.")

View File

@ -254,7 +254,7 @@ static void send_packet(struct e1000_nic * device, uint8_t* payload, size_t payl
return; return;
} }
tx_head = read_command(device, E1000_REG_TXDESCHEAD); tx_head = read_command(device, E1000_REG_TXDESCHEAD);
} while (next_tx == tx_head); } while ((next_tx + 1) % E1000_NUM_TX_DESC == tx_head);
} }
} }