When udp_memory_allocated is at the limit, __udp_enqueue_schedule_skb will return a -ENOBUFS, and skb will be dropped in __udp_queue_rcv_skb without any counters being done. It's hard to find out what happened once this happen. So we introduce a UDP_MIB_MEMERRORS to do this job. Well, this change looks friendly to the existing users, such as netstat: $ netstat -u -s Udp: 0 packets received 639 packets to unknown port received. 158689 packet receive errors 180022 packets sent RcvbufErrors: 20930 MemErrors: 137759 UdpLite: IpExt: InOctets: 257426235 OutOctets: 257460598 InNoECTPkts: 181177 v2: - Fix some alignment problems
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -159,6 +159,7 @@ enum · 158 unmodified lines | |||
| 159 | UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ | 159 | UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ |
| 160 | UDP_MIB_CSUMERRORS, /* InCsumErrors */ | 160 | UDP_MIB_CSUMERRORS, /* InCsumErrors */ |
| 161 | UDP_MIB_IGNOREDMULTI, /* IgnoredMulti */ | 161 | UDP_MIB_IGNOREDMULTI, /* IgnoredMulti */ |
| 162 | UDP_MIB_MEMERRORS, /* MemErrors */ | ||
| 162 | __UDP_MIB_MAX | 163 | __UDP_MIB_MAX |
| 163 | }; | 164 | }; |
| 164 | 165 | ||