요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=========================
TC queue based filtering
=========================
TC can be used for directing traffic to either a set of queues or
to a single queue on both the transmit and receive side.
On the transmit side:
1) TC filter directing traffic to a set of queues is achieved
using the action skbedit priority for Tx priority selection,
the priority maps to a traffic class (set of queues) when
the queue-sets are configured using mqprio.
2) TC filter directs traffic to a transmit queue with the action
skbedit queue_mapping $tx_qid. The action skbedit queue_mapping
for transmit queue is executed in software only and cannot be
offloaded.
Likewise, on the receive side, the two filters for selecting set of
queues and/or a single queue are supported as below:
1) TC flower filter directs incoming traffic to a set of queues using
the 'hw_tc' option.
hw_tc $TCID - Specify a hardware traffic class to pass matching
packets on to. TCID is in the range 0 through 15.
2) TC filter with action skbedit queue_mapping $rx_qid selects a
receive queue. The action skbedit queue_mapping for receive queue
is supported only in hardware. Multiple filters may compete in
the hardware for queue selection. In such case, the hardware
pipeline resolves conflicts based on priority. On Intel E810
devices, TC filter directing traffic to a queue have higher
priority over flow director filter assigning a queue. The hash
filter has lowest priority.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
송수신 queue 선택 개요
1-8이 문서는 GPL-2.0 라이선스를 따르며 TC를 사용해 송신과 수신 양쪽에서 traffic을 queue 집합 또는 단일 queue로 보내는 방법을 설명합니다.
.. SPDX-License-Identifier: GPL-2.0
=========================
TC queue based filtering
=========================
TC can be used for directing traffic to either a set of queues or
to a single queue on both the transmit and receive side.
송신 queue 집합과 단일 queue
9-20송신 측 queue 선택은 다음 두 방식입니다.
1. TC filter가 traffic을 queue 집합으로 보내려면 TX priority 선택을 위해 `skbedit priority` action을 사용합니다. `mqprio`로 queue 집합을 구성하면 이 priority가 하나의 traffic class, 즉 queue 집합에 대응합니다.
2. TC filter가 단일 transmit queue로 traffic을 보내려면 `skbedit queue_mapping $tx_qid` action을 사용합니다. Transmit queue용 `skbedit queue_mapping`은 software에서만 실행되며 offload할 수 없습니다.
Queue 집합과 단일 queue의 실행 위치가 다릅니다.
On the transmit side:
1) TC filter directing traffic to a set of queues is achieved
using the action skbedit priority for Tx priority selection,
the priority maps to a traffic class (set of queues) when
the queue-sets are configured using mqprio.
2) TC filter directs traffic to a transmit queue with the action
skbedit queue_mapping $tx_qid. The action skbedit queue_mapping
for transmit queue is executed in software only and cannot be
offloaded.
수신 queue 선택과 우선순위
21-37수신 측도 queue 집합과 단일 queue를 선택하는 두 filter를 지원합니다.
1. TC flower filter는 `hw_tc` option으로 incoming traffic을 queue 집합에 보냅니다. `hw_tc $TCID`는 일치한 packet을 넘길 hardware traffic class를 지정하며 `TCID` 범위는 0부터 15까지입니다.
2. `skbedit queue_mapping $rx_qid` action을 사용하는 TC filter는 receive queue 하나를 선택합니다. Receive queue용 `skbedit queue_mapping`은 hardware에서만 지원됩니다.
Hardware에서 여러 filter가 queue 선택을 두고 경쟁할 수 있으며, 이때 hardware pipeline이 priority에 따라 충돌을 해결합니다. Intel E810 device에서는 queue를 직접 지정하는 TC filter가 Flow Director의 queue 할당 filter보다 우선하고, hash filter의 priority가 가장 낮습니다.
Hardware queue assignment의 상대 priority를 보존합니다.
Likewise, on the receive side, the two filters for selecting set of
queues and/or a single queue are supported as below:
1) TC flower filter directs incoming traffic to a set of queues using
the 'hw_tc' option.
hw_tc $TCID - Specify a hardware traffic class to pass matching
packets on to. TCID is in the range 0 through 15.
2) TC filter with action skbedit queue_mapping $rx_qid selects a
receive queue. The action skbedit queue_mapping for receive queue
is supported only in hardware. Multiple filters may compete in
the hardware for queue selection. In such case, the hardware
pipeline resolves conflicts based on priority. On Intel E810
devices, TC filter directing traffic to a queue have higher
priority over flow director filter assigning a queue. The hash
filter has lowest priority.
요약·해설
tc-queue-filters.rst:1-37Queue 집합은 TX에서 `skbedit priority`와 `mqprio`, RX에서 flower의 `hw_tc`로 선택합니다. 단일 queue는 양쪽 모두 `skbedit queue_mapping`을 쓰지만 TX는 software 전용이고 RX는 hardware 전용이라는 차이가 있습니다.
여러 RX filter가 경쟁하면 hardware priority가 결과를 결정합니다. Intel E810의 순서는 직접 queue를 지정하는 TC filter, Flow Director, hash filter 순입니다.