| 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | ========================= |
| 4 | TC queue based filtering |
| 5 | ========================= |
| 6 | |
| 7 | TC can be used for directing traffic to either a set of queues or |
| 8 | to a single queue on both the transmit and receive side. |
| 9 | |
| 10 | On the transmit side: |
| 11 | |
| 12 | 1) TC filter directing traffic to a set of queues is achieved |
| 13 | using the action skbedit priority for Tx priority selection, |
| 14 | the priority maps to a traffic class (set of queues) when |
| 15 | the queue-sets are configured using mqprio. |
| 16 | |
| 17 | 2) TC filter directs traffic to a transmit queue with the action |
| 18 | skbedit queue_mapping $tx_qid. The action skbedit queue_mapping |
| 19 | for transmit queue is executed in software only and cannot be |
| 20 | offloaded. |
| 21 | |
| 22 | Likewise, on the receive side, the two filters for selecting set of |
| 23 | queues and/or a single queue are supported as below: |
| 24 | |
| 25 | 1) TC flower filter directs incoming traffic to a set of queues using |
| 26 | the 'hw_tc' option. |
| 27 | hw_tc $TCID - Specify a hardware traffic class to pass matching |
| 28 | packets on to. TCID is in the range 0 through 15. |
| 29 | |
| 30 | 2) TC filter with action skbedit queue_mapping $rx_qid selects a |
| 31 | receive queue. The action skbedit queue_mapping for receive queue |
| 32 | is supported only in hardware. Multiple filters may compete in |
| 33 | the hardware for queue selection. In such case, the hardware |
| 34 | pipeline resolves conflicts based on priority. On Intel E810 |
| 35 | devices, TC filter directing traffic to a queue have higher |
| 36 | priority over flow director filter assigning a queue. The hash |
| 37 | filter has lowest priority. |