Chapter XX. Classification and Filtering
3.8.
Packet Tracing and Hit Counters
For T5/T6 LE-TCAM and T6 Hash/DDR filters, hit counters will work simply by adding hitcnts 1
parameter to the filter rule. However, for T5 Hash/DDR filters, you will have to make use of tracing
feature and RSS queues. Here's a step-by-step guide to enable packet tracing and hit counters
for T5 Hash/DDR filter rules:
i.
Load network driver with the following parameters:
[root@host~]# modprobe cxgb4 use_ddr_filters=1 enable_traceq=1
ii. Configure the required filter rules.
iii. Enable tracing on T5 adapter.
[root@host~]# cxgbtool ethX reg 0x09800=0x13
iv. Setup a trace filter
[root@host~]# echo tx1 snaplen=40 > /sys/kernel/debug/cxgb4/<bus_id>/trace0
Here, snaplen is the length in bytes to be captured.
Use "snaplen=60" in case of IPV6.
Note
The above step will trace all the packets transmitting from port1(tx1) to trace filter 0.
v. Configure RSS Queue to send trace packets. Determine the RspQ ID of the queues by
looking at Trace QType in /sys/kernel/debug/cxgb4/<bus-id>/sge_qinfo file
[root@host~]# cxgbtool ethX reg 0x0a00c=<Trace Queue0-RspQ ID>
Now the traced packets can be seen in tcpdump and the hit counters will also increment.
•
Multi-tracing
To enable packet capture or hit counters for multiple chelsio ports in Tx/Rx direction enable
Multi-tracing. Using this we can configure 4 different RSS Queues separately corresponding to
4 trace-filters.
Chelsio Unified Wire for Linux
294
Need help?
Do you have a question about the Terminator Series and is the answer not in the manual?
Questions and answers