RXMon
Register an RX handler to dump received packets
- RXMon
Shortest form:
rxm.Watch packets that reach the CPU through the SDK receive (RX) layer, by registering a shell callback that logs them. With no argument it prints
Active bitmap for RX is <hex>., the DMA channels on which RX is running. Sub-commands must be written in full (case does not matter). An unknown word prints the help.The logged packets appear only after
debugmod diag rxhas been enabled;rxmon startreminds you of that.Only the bare command and
rxmon showare read-only. The other forms act on the receive layer that SONiC’ssyncduses for host traffic.Unvalidated
drivshell> rxmon- RXMon show
Print the state of the RX layer. Read-only.
Unvalidated
drivshell> rxmon show
- RXMon init
Start the RX layer with the
RXCfgsettings, without registering the logging callback. It refuses withRX is already runningif RX is already started, which is normally the case under SONiC. It also refuses whilePacketWatcherruns.Unvalidated
drivshell> rxmon init
- RXMon start
Start RX if needed, and register the logging callback for all CPU queues. Packets that the callback handles may no longer reach SONiC’s own receive handler, so this can disturb host traffic.
Unvalidated
drivshell> debugmod diag rx drivshell> rxmon start
- RXMon stop
Stop the RX layer and remove the logging callback.
Warning
This stops packet reception for the whole unit, not only for
rxmon. Under SONiC it breaks the host packet path. Do not use on a production switch.Unvalidated
drivshell> rxmon stop
- RXMon enqueue [<n>]
Make the callback hold packets and free them in batches of at least
<n>(default 1) in a separate thread.rxmon -enqueueswitches this off again.Unvalidated
drivshell> rxmon enqueue 16
Built-in help
Parameters [init|start|stop|show|[-]enqueue [n]] With no parameters, show whether or not active. init: Initialize the RX API, but don't register handler start: Call RX start with local pkt dump routine Modify the configuration with the rxcfg command stop: Call RX stop [-]enqueue [n]: Enqueue packets to be freed later in thread If n > 0, enqueue at least n pkts before freeing stop: Call RX stop show: Call RX show