Commit e1a8cc8
authored
hb_rf_eth: use dev_err_ratelimited to prevent kernel log flooding (#563)
When the HB-RF-ETH device becomes unreachable, the send thread continues
attempting to transmit packets while the receive thread enters a reconnection
loop. Each failed send attempt logs "Error sending packet, not connected"
with no rate limiting.
In production, this was observed to generate thousands of kernel messages
per second, causing:
- journald to report "Missed 3020 kernel messages"
- System becoming unresponsive
- VM requiring hard restart
This patch applies dev_err_ratelimited() to all error messages that could
potentially be triggered in rapid succession:
- "No free send buffers" (queue overflow)
- "Received to small UDP packet" (malformed packets)
- "Received UDP packet with invalid checksum" (corruption)
- "Error %d on receiving packet" (receive failures)
- "Error sending packet, not connected" (disconnection - critical)
The kernel's default rate limiting (typically 10 messages per 5 seconds)
prevents log flooding while still providing diagnostic information.1 parent f46a8ea commit e1a8cc8
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
0 commit comments