요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
NTB sizes and aggregation timer
sysfs-class-net-cdc_ncm:41-87Device-dependent RX·TX maximum과 0 또는 5~4000000 µs aggregation timer, GetNtbParameters 출처를 제공합니다.
Read-only IN parameters
sysfs-class-net-cdc_ncm:89-127지원 NTB format bit와 IN maximum size·divisor·remainder·alignment modulus를 정의합니다.
Read-only OUT parameters
sysfs-class-net-cdc_ncm:129-168OUT maximum size·alignment field와 단일 NTB의 maximum datagram 수를 정의합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/net/<iface>/cdc_ncm/min_tx_pkt
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
The driver will pad NCM Transfer Blocks (NTBs) longer
than this to tx_max, allowing the device to receive
tx_max sized frames with no terminating short
packet. NTBs shorter than this limit are transmitted
as-is, without any padding, and are terminated with a
short USB packet.
Padding to tx_max allows the driver to transmit NTBs
back-to-back without any interleaving short USB
packets. This reduces the number of short packet
interrupts in the device, and represents a tradeoff
between USB bus bandwidth and device DMA optimization.
Set to 0 to pad all frames. Set greater than tx_max to
disable all padding.
What: /sys/class/net/<iface>/cdc_ncm/ndp_to_end
Date: Dec 2015
KernelVersion: 4.5
Contact: Bjørn Mork <[email protected]>
Description:
Boolean attribute showing the status of the "NDP to
end" quirk. Defaults to 'N', except for devices
already known to need it enabled.
The "NDP to end" quirk makes the driver place the NDP
(the packet index table) after the payload. The NCM
specification does not mandate this, but some devices
are known to be more restrictive. Write 'Y' to this
attribute for temporary testing of a suspect device
failing to work with the default driver settings.
A device entry should be added to the driver if this
quirk is found to be required.
What: /sys/class/net/<iface>/cdc_ncm/rx_max
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
The maximum NTB size for RX. Cannot exceed the
maximum value supported by the device. Must allow at
least one max sized datagram plus headers.
The actual limits are device dependent. See
dwNtbInMaxSize.
Note: Some devices will silently ignore changes to
this value, resulting in oversized NTBs and
corresponding framing errors.
What: /sys/class/net/<iface>/cdc_ncm/tx_max
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
The maximum NTB size for TX. Cannot exceed the
maximum value supported by the device. Must allow at
least one max sized datagram plus headers.
The actual limits are device dependent. See
dwNtbOutMaxSize.
What: /sys/class/net/<iface>/cdc_ncm/tx_timer_usecs
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
Datagram aggregation timeout in µs. The driver will
wait up to 3 times this timeout for more datagrams to
aggregate before transmitting an NTB frame.
Valid range: 5 to 4000000
Set to 0 to disable aggregation.
The following read-only attributes all represent fields of the
structure defined in section 6.2.1 "GetNtbParameters" of "Universal
Serial Bus Communications Class Subclass Specifications for Network
Control Model Devices" (CDC NCM), Revision 1.0 (Errata 1), November
24, 2010 from USB Implementers Forum, Inc. The descriptions are
quoted from table 6-3 of CDC NCM: "NTB Parameter Structure".
What: /sys/class/net/<iface>/cdc_ncm/bmNtbFormatsSupported
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
- Bit 0: 16-bit NTB supported (set to 1)
- Bit 1: 32-bit NTB supported
- Bits 2 – 15: reserved (reset to zero; must be ignored by host)
What: /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
IN NTB Maximum Size in bytes
What: /sys/class/net/<iface>/cdc_ncm/wNdpInDivisor
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
Divisor used for IN NTB Datagram payload alignment
What: /sys/class/net/<iface>/cdc_ncm/wNdpInPayloadRemainder
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
Remainder used to align input datagram payload within
the NTB: (Payload Offset) mod (wNdpInDivisor) =
wNdpInPayloadRemainder
What: /sys/class/net/<iface>/cdc_ncm/wNdpInAlignment
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
NDP alignment modulus for NTBs on the IN pipe. Shall
be a power of 2, and shall be at least 4.
What: /sys/class/net/<iface>/cdc_ncm/dwNtbOutMaxSize
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
OUT NTB Maximum Size
What: /sys/class/net/<iface>/cdc_ncm/wNdpOutDivisor
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
OUT NTB Datagram alignment modulus
What: /sys/class/net/<iface>/cdc_ncm/wNdpOutPayloadRemainder
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
Remainder used to align output datagram payload
offsets within the NTB: Padding, shall be transmitted
as zero by function, and ignored by host. (Payload
Offset) mod (wNdpOutDivisor) = wNdpOutPayloadRemainder
What: /sys/class/net/<iface>/cdc_ncm/wNdpOutAlignment
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
NDP alignment modulus for use in NTBs on the OUT
pipe. Shall be a power of 2, and shall be at least 4.
What: /sys/class/net/<iface>/cdc_ncm/wNtbOutMaxDatagrams
Date: May 2014
KernelVersion: 3.16
Contact: Bjørn Mork <[email protected]>
Description:
Maximum number of datagrams that the host may pack
into a single OUT NTB. Zero means that the device
imposes no limit.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Minimum padded TX packet
1-20| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/min_tx_pkt |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | 이 값보다 긴 NCM Transfer Block(NTB)은 driver가 tx_max까지 padding합니다. 그러면 device가 terminating short packet 없이 tx_max 크기 frame을 받을 수 있습니다. 이 limit보다 짧은 NTB는 padding 없이 그대로 전송하고 short USB packet으로 끝냅니다. |
tx_max까지 padding하면 driver가 중간에 short USB packet을 넣지 않고 NTB를 back-to-back으로 전송할 수 있습니다. Device의 short packet interrupt 수를 줄이며 USB bus bandwidth와 device DMA optimization 사이의 tradeoff를 나타냅니다.
0으로 설정하면 모든 frame을 padding합니다. tx_max보다 큰 값으로 설정하면 모든 padding을 disable합니다.
NTB length와 특수 설정값에 따른 padding 및 termination 동작입니다.
NDP-to-end quirk
22-39| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/ndp_to_end |
| Date | 2015년 12월 |
| KernelVersion | 4.5 |
| Contact | Bjørn Mork <[email protected]> |
| Description | NDP to end quirk 상태를 표시하는 boolean 속성입니다. 이미 enable이 필요한 것으로 알려진 device를 제외하면 기본값은 N입니다. |
NDP to end quirk는 driver가 packet index table인 NDP를 payload 뒤에 배치하게 합니다. NCM specification은 이를 의무화하지 않지만 일부 device는 더 제한적입니다. Default driver setting으로 동작하지 않는 것으로 의심되는 device를 임시로 test하려면 이 속성에 Y를 씁니다.
이 quirk가 필요한 것으로 확인되면 device entry를 driver에 추가해야 합니다.
Default와 temporary quirk test 동작입니다.
Maximum RX NTB size
41-55| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/rx_max |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | RX의 maximum NTB size입니다. Device가 지원하는 maximum 값을 넘을 수 없고 header를 포함한 maximum-size datagram 하나 이상을 허용해야 합니다. |
실제 limit은 device에 따라 다릅니다. dwNtbInMaxSize를 참조하십시오.
일부 device는 이 값의 변경을 조용히 무시할 수 있으며, 그 결과 oversized NTB와 이에 대응하는 framing error가 발생합니다.
Maximum TX NTB size
57-67| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/tx_max |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | TX의 maximum NTB size입니다. Device가 지원하는 maximum 값을 넘을 수 없고 header를 포함한 maximum-size datagram 하나 이상을 허용해야 합니다. |
실제 limit은 device에 따라 다릅니다. dwNtbOutMaxSize를 참조하십시오.
RX와 TX limit 및 대응하는 read-only device parameter입니다.
TX datagram aggregation timer
69-87| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/tx_timer_usecs |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | Datagram aggregation timeout을 µs 단위로 지정합니다. Driver는 NTB frame을 전송하기 전에 aggregation할 datagram이 더 들어오기를 이 timeout의 최대 3배까지 기다립니다. |
유효 범위는 5부터 4000000입니다. 0으로 설정하면 aggregation을 disable합니다.
뒤따르는 read-only 속성은 모두 USB Implementers Forum, Inc.가 2010년 11월 24일 발행한 Universal Serial Bus Communications Class Subclass Specifications for Network Control Model Devices(CDC NCM), Revision 1.0(Errata 1)의 6.2.1절 GetNtbParameters에 정의된 structure field를 나타냅니다. 설명은 CDC NCM table 6-3 NTB Parameter Structure에서 인용한 것입니다.
Aggregation enable과 wait limit을 정리합니다.
Supported NTB formats
89-96| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/bmNtbFormatsSupported |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | 지원하는 NTB format bitfield입니다. Bit 0은 16-bit NTB 지원이며 1로 설정됩니다. Bit 1은 32-bit NTB 지원입니다. Bit 2~15는 reserved이며 0으로 reset하고 host가 무시해야 합니다. |
원문 bullet의 NTB format bit 정의입니다.
IN NTB maximum size
98-103| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | IN NTB의 maximum size를 byte 단위로 제공합니다. |
IN payload alignment divisor
105-110| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpInDivisor |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | IN NTB datagram payload alignment에 사용하는 divisor입니다. |
IN payload alignment remainder
112-119| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpInPayloadRemainder |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | NTB 내부 input datagram payload를 align하는 데 사용하는 remainder입니다. |
(Payload Offset) mod (wNdpInDivisor) = wNdpInPayloadRemainder
IN NDP alignment modulus
121-127| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpInAlignment |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | IN pipe의 NTB에 사용하는 NDP alignment modulus입니다. 2의 거듭제곱이어야 하고 4 이상이어야 합니다. |
GetNtbParameters의 IN 방향 maximum size와 alignment field입니다.
OUT NTB maximum size
129-134| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/dwNtbOutMaxSize |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | OUT NTB maximum size입니다. |
OUT datagram alignment modulus
136-141| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpOutDivisor |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | OUT NTB datagram alignment modulus입니다. |
OUT payload alignment remainder
143-151| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpOutPayloadRemainder |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | NTB 내부 output datagram payload offset을 align하는 데 사용하는 remainder입니다. Function은 padding을 0으로 전송해야 하며 host는 이를 무시합니다. |
(Payload Offset) mod (wNdpOutDivisor) = wNdpOutPayloadRemainder
OUT NDP alignment modulus
153-159| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNdpOutAlignment |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | OUT pipe의 NTB에 사용하는 NDP alignment modulus입니다. 2의 거듭제곱이어야 하고 4 이상이어야 합니다. |
Maximum datagrams per OUT NTB
161-168| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/net/<iface>/cdc_ncm/wNtbOutMaxDatagrams |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Contact | Bjørn Mork <[email protected]> |
| Description | Host가 하나의 OUT NTB에 pack할 수 있는 datagram의 maximum 개수입니다. 0은 device가 limit을 두지 않음을 뜻합니다. |
GetNtbParameters의 OUT 방향 maximum size, alignment와 datagram limit입니다.
TX padding and NDP layout
sysfs-class-net-cdc_ncm:1-39min_tx_pkt threshold에 따른 tx_max padding과 payload 뒤 NDP를 배치하는 temporary quirk를 설명합니다.