← Documents Documentation/ABI/testing/sysfs-class-led-trigger-netdev GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Network device LED trigger sysfs ABI

Network device의 link·traffic·speed·duplex 상태를 LED로 표시하고 software fallback과 hardware offload의 blink timing 차이를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-class-led-trigger-netdev
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Device selection and blink timing

sysfs-class-led-trigger-netdev:1-19

감시할 network device를 선택하고 기본 50 ms interval 및 hardware offload 시 EINVAL 제약을 설명합니다.

Duplex indicators

sysfs-class-led-trigger-netdev:168-192

Half-duplex와 full-duplex link state를 동일한 0·1 규칙으로 LED normal state에 반영합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/class/leds/<led>/device_name
2 Date: Dec 2017
3 KernelVersion: 4.16
4 Contact: linux-leds@vger.kernel.org
5 Description:
6 Specifies the network device name to monitor.
7
8 What: /sys/class/leds/<led>/interval
9 Date: Dec 2017
10 KernelVersion: 4.16
11 Contact: linux-leds@vger.kernel.org
12 Description:
13 Specifies the duration of the LED blink in milliseconds.
14 Defaults to 50 ms.
15
16 When offloaded is true, the interval value MUST be set to the
17 default value and cannot be changed.
18 Trying to set any value in this specific mode will return
19 an EINVAL error.
20
21 What: /sys/class/leds/<led>/link
22 Date: Dec 2017
23 KernelVersion: 4.16
24 Contact: linux-leds@vger.kernel.org
25 Description:
26 Signal the link state of the named network device.
27
28 If set to 0 (default), the LED's normal state is off.
29
30 If set to 1, the LED's normal state reflects the link state
31 of the named network device.
32 Setting this value also immediately changes the LED state.
33
34
35 What: /sys/class/leds/<led>/tx
36 Date: Dec 2017
37 KernelVersion: 4.16
38 Contact: linux-leds@vger.kernel.org
39 Description:
40 Signal transmission of data on the named network device.
41
42 If set to 0 (default), the LED will not blink on transmission.
43
44 If set to 1, the LED will blink for the milliseconds specified
45 in interval to signal transmission.
46
47 When offloaded is true, the blink interval is controlled by
48 hardware and won't reflect the value set in interval.
49
50 What: /sys/class/leds/<led>/rx
51 Date: Dec 2017
52 KernelVersion: 4.16
53 Contact: linux-leds@vger.kernel.org
54 Description:
55 Signal reception of data on the named network device.
56
57 If set to 0 (default), the LED will not blink on reception.
58
59 If set to 1, the LED will blink for the milliseconds specified
60 in interval to signal reception.
61
62 When offloaded is true, the blink interval is controlled by
63 hardware and won't reflect the value set in interval.
64
65 What: /sys/class/leds/<led>/offloaded
66 Date: Jun 2023
67 KernelVersion: 6.5
68 Contact: linux-leds@vger.kernel.org
69 Description:
70 Communicate whether the LED trigger modes are offloaded to
71 hardware or whether software fallback is used.
72
73 If 0, the LED is using software fallback to blink.
74
75 If 1, the LED blinking in requested mode is offloaded to
76 hardware.
77
78 What: /sys/class/leds/<led>/link_10
79 Date: Jun 2023
80 KernelVersion: 6.5
81 Contact: linux-leds@vger.kernel.org
82 Description:
83 Signal the link speed state of 10Mbps of the named network device.
84
85 If set to 0 (default), the LED's normal state is off.
86
87 If set to 1, the LED's normal state reflects the link state
88 speed of 10MBps of the named network device.
89 Setting this value also immediately changes the LED state.
90
91 Present only if the named network device supports 10Mbps link speed.
92
93 What: /sys/class/leds/<led>/link_100
94 Date: Jun 2023
95 KernelVersion: 6.5
96 Contact: linux-leds@vger.kernel.org
97 Description:
98 Signal the link speed state of 100Mbps of the named network device.
99
100 If set to 0 (default), the LED's normal state is off.
101
102 If set to 1, the LED's normal state reflects the link state
103 speed of 100Mbps of the named network device.
104 Setting this value also immediately changes the LED state.
105
106 Present only if the named network device supports 100Mbps link speed.
107
108 What: /sys/class/leds/<led>/link_1000
109 Date: Jun 2023
110 KernelVersion: 6.5
111 Contact: linux-leds@vger.kernel.org
112 Description:
113 Signal the link speed state of 1000Mbps of the named network device.
114
115 If set to 0 (default), the LED's normal state is off.
116
117 If set to 1, the LED's normal state reflects the link state
118 speed of 1000Mbps of the named network device.
119 Setting this value also immediately changes the LED state.
120
121 Present only if the named network device supports 1000Mbps link speed.
122
123 What: /sys/class/leds/<led>/link_2500
124 Date: Nov 2023
125 KernelVersion: 6.8
126 Contact: linux-leds@vger.kernel.org
127 Description:
128 Signal the link speed state of 2500Mbps of the named network device.
129
130 If set to 0 (default), the LED's normal state is off.
131
132 If set to 1, the LED's normal state reflects the link state
133 speed of 2500Mbps of the named network device.
134 Setting this value also immediately changes the LED state.
135
136 Present only if the named network device supports 2500Mbps link speed.
137
138 What: /sys/class/leds/<led>/link_5000
139 Date: Nov 2023
140 KernelVersion: 6.8
141 Contact: linux-leds@vger.kernel.org
142 Description:
143 Signal the link speed state of 5000Mbps of the named network device.
144
145 If set to 0 (default), the LED's normal state is off.
146
147 If set to 1, the LED's normal state reflects the link state
148 speed of 5000Mbps of the named network device.
149 Setting this value also immediately changes the LED state.
150
151 Present only if the named network device supports 5000Mbps link speed.
152
153 What: /sys/class/leds/<led>/link_10000
154 Date: Nov 2023
155 KernelVersion: 6.8
156 Contact: linux-leds@vger.kernel.org
157 Description:
158 Signal the link speed state of 10000Mbps of the named network device.
159
160 If set to 0 (default), the LED's normal state is off.
161
162 If set to 1, the LED's normal state reflects the link state
163 speed of 10000Mbps of the named network device.
164 Setting this value also immediately changes the LED state.
165
166 Present only if the named network device supports 10000Mbps link speed.
167
168 What: /sys/class/leds/<led>/half_duplex
169 Date: Jun 2023
170 KernelVersion: 6.5
171 Contact: linux-leds@vger.kernel.org
172 Description:
173 Signal the link half duplex state of the named network device.
174
175 If set to 0 (default), the LED's normal state is off.
176
177 If set to 1, the LED's normal state reflects the link half
178 duplex state of the named network device.
179 Setting this value also immediately changes the LED state.
180
181 What: /sys/class/leds/<led>/full_duplex
182 Date: Jun 2023
183 KernelVersion: 6.5
184 Contact: linux-leds@vger.kernel.org
185 Description:
186 Signal the link full duplex state of the named network device.
187
188 If set to 0 (default), the LED's normal state is off.
189
190 If set to 1, the LED's normal state reflects the link full
191 duplex state of the named network device.
192 Setting this value also immediately changes the LED state.
193

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Monitored network device

1-6
항목한국어 전문 번역
What/sys/class/leds/<led>/device_name
Date2017년 12월
KernelVersion4.16
Contactlinux-leds@vger.kernel.org
Description감시할 network device 이름을 지정합니다.

Blink interval

8-19
항목한국어 전문 번역
What/sys/class/leds/<led>/interval
Date2017년 12월
KernelVersion4.16
Contactlinux-leds@vger.kernel.org
DescriptionLED가 blink하는 시간을 millisecond 단위로 지정하며 기본값은 50 ms입니다. offloaded가 true이면 interval 값은 반드시 기본값으로 설정되어야 하고 변경할 수 없습니다. 이 mode에서 어떤 값이든 설정하려 하면 EINVAL error를 반환합니다.
Software와 hardware blink timing
offloadedinterval 속성Blink timing
0Read/write, 기본 50 msSoftware가 interval 사용
1기본값 고정, write는 EINVALHardware가 직접 제어

offloaded 상태에 따른 interval 속성과 실제 blink timing의 관계입니다.

Transmit activity indication

35-48
항목한국어 전문 번역
What/sys/class/leds/<led>/tx
Date2017년 12월
KernelVersion4.16
Contactlinux-leds@vger.kernel.org
Description지정한 network device의 data transmission을 표시합니다. 0(기본값)이면 transmission 시 LED가 blink하지 않습니다. 1이면 transmission을 알리기 위해 interval에 지정된 millisecond 동안 LED가 blink합니다. offloaded가 true이면 blink interval은 hardware가 제어하므로 interval에 설정한 값을 반영하지 않습니다.

Receive activity indication

50-63
항목한국어 전문 번역
What/sys/class/leds/<led>/rx
Date2017년 12월
KernelVersion4.16
Contactlinux-leds@vger.kernel.org
Description지정한 network device의 data reception을 표시합니다. 0(기본값)이면 reception 시 LED가 blink하지 않습니다. 1이면 reception을 알리기 위해 interval에 지정된 millisecond 동안 LED가 blink합니다. offloaded가 true이면 blink interval은 hardware가 제어하므로 interval에 설정한 값을 반영하지 않습니다.

Hardware offload state

65-76
항목한국어 전문 번역
What/sys/class/leds/<led>/offloaded
Date2023년 6월
KernelVersion6.5
Contactlinux-leds@vger.kernel.org
DescriptionLED trigger mode가 hardware에 offload되었는지, 아니면 software fallback을 사용하는지 전달합니다. 0이면 LED가 software fallback으로 blink합니다. 1이면 요청한 mode의 LED blinking이 hardware에 offload됩니다.
Netdev LED trigger signal path
device_name으로 network device 선택link·speed·duplex가 normal LED state 결정tx·rx가 activity blink 요청offloaded=0이면 software, 1이면 hardware가 blink 수행

장치 선택부터 steady state와 activity blink, hardware offload까지의 관계입니다.

Half-duplex link indication

168-179
항목한국어 전문 번역
What/sys/class/leds/<led>/half_duplex
Date2023년 6월
KernelVersion6.5
Contactlinux-leds@vger.kernel.org
Description지정한 network device의 link half-duplex state를 표시합니다. 0(기본값)이면 LED의 normal state는 off입니다. 1이면 LED의 normal state가 지정한 network device의 link half-duplex state를 반영하며, 설정 즉시 LED state도 바뀝니다.

Full-duplex link indication

181-192
항목한국어 전문 번역
What/sys/class/leds/<led>/full_duplex
Date2023년 6월
KernelVersion6.5
Contactlinux-leds@vger.kernel.org
Description지정한 network device의 link full-duplex state를 표시합니다. 0(기본값)이면 LED의 normal state는 off입니다. 1이면 LED의 normal state가 지정한 network device의 link full-duplex state를 반영하며, 설정 즉시 LED state도 바뀝니다.
Duplex LED state
half_duplexfull_duplex
0Normal state offNormal state off
1Half-duplex state 반영Full-duplex state 반영

half_duplex와 full_duplex는 같은 boolean 규칙으로 해당 link state를 반영합니다.