Chapter XVIII. Classification and Filtering
Chelsio T5/T4 Unified Wire For Linux Page 248
3.1.1. Examples
Drop action
[root@host]# cxgbtool ethX filter 496 action drop lip 102.1.1.1 fip
102.1.1.2 lport 12865 fport 20000 hitcnts 1 cap maskless iport 1 proto 17
The above filter rule will drop all UDP packets matching above 4 tuple coming on chelsio port 1.
Pass action
[root@host]# cxgbtool ethX filter 496 action pass lip 102.2.2.1 fip
102.2.2.2 lport 12865 fport 12000 hitcnts 1 cap maskless proto 6
The above filter rule will pass all TCP packets matching above 4 tuple.
Switch action
[root@host]# cxgbtool ethX filter 496 action switch lip 102.3.3.1 fip
102.3.3.2 lport 5001 fport 16000 iport 0 eport 1 hitcnts 1 cap maskless
The above filter rule will switch all the packets matching above 4 tuple from chelsio port 0 to
chelsio port 1.
3.2. Listing Filter Rules
To list the Hash/DDR filters set, run the following command:
[root@host]# cat /proc/drivers/cxgb4/<bus-id>/hash_filters
“source IP”, “destination IP”, “source port” and “destination port” are mandatory
parameters. “cap maskless” parameter should be appended in order to create
Hash/DDR filter rules. Otherwise the above command will create LE-TCAM filter
rules. Filter index provided for creating DDR filter is ignored.
For more information on additional parameters, refer cxgbtool manual by running
the man cxgbtool command.
Comments to this Manuals