Hints on optimizing the tc rule table – RuggedCom RuggedRouter RX1100 User Manual
Page 143
![background image](/manuals/199656/143/background.png)
15. Traffic Control
Revision 1.14.3
143
RX1000/RX1100™
specified in the / field, to apply to both marks prior to comparison. Mark and mask may be in the range
1..255 in decimal or hex.
The Length field specifies the packet length or length range to match.
The TOS field specifies the packet TOS value to match. A TOS value may be selected from the list,
or may be specified in decimal or hex by selecting "Other". It may take on one of the following values:
• Minimize-Delay (16 / 0x10)
• Maximize-Throughput (8 / 0x08)
• Maximize-Reliability (4 / 0x04)
• Minimize-Cost (2 / 0x02)
• Normal-Service (0 / 0x00)
15.2.3.1. Hints on optimizing the TC Rule table
Every rule is processed in table order for every packet, unless a CONTINUE rule is matched, in which
case processing stops. This can be used to improve efficiency in combination with the SAVE and
RESTORE rules. For example, consider a TC Rules table organized roughly as follows (and in the
same order):
• A RESTORE rule is used to restore the connection's mark to a matching, unmarked packet
• A CONTINUE if the mark is non zero
• Specific rules to check criteria to assign a mark, and finally
• A SAVE mark to connection if the mark is non zero (ie a match was found above)
Using the above structure for the TC Rules table, only the first packet of any tcp or udp connection
will have to go through all the rules, while every following packet will have its mark restored by the first
rule, and then CONTINUE, skipping potentially many matching rules in the remainder of the table.