Skip to content

NIC Driver Controller

mshahbaz edited this page Jul 16, 2012 · 3 revisions

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:

./bin/driver_ctrl help

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.
Clone this wiki locally
You can’t perform that action at this time.