Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
NIC Driver Controller
The driver controller (bin/driver_ctrl) is a user-space utility for issuing commands to the driver. Its original purpose was to facilitate driver testing via the command-line, though it evolved much over time as features were added and has become a general purpose method of issuing commands to the driver.
At the time of writing the commands that can be issued to the driver include performing DMA transactions, reading and writing registers, and controlling the receiving of packets. To see the full list of commands and how to use them, simply issue the following at the command line in the driver's root directory after you've compiled everything:
At the time of writing, the output of this command is the following:
driver_ctrl: NetFPGA-10G Ethernet driver management, control, and testing utility usage: driver_ctrl [OPTIONS] COMMAND [ARG...] echo STRING Send STRING to driver, driver echoes it back. dma_tx STRING [OPCODE] Transmit STRING to the hardware via DMA w/ optional OPCODE. dma_rx Pull out what's next in the DMA RX buffer and print it. reg_rd ADDR Read register at address ADDR. reg_wr ADDR VAL Write VAL to register at address ADDR. napi_enable Enable driver polling for RX packets. napi_disable Disable driver polling for RX packets. help Print this help message.