History

net: udp: introduce UDP_MIB_MEMERRORS for udp_mem

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

Menglong Dong committed 6 years ago

Commit a3ce2b11 parent bff6f1d5 files · +10 −0Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/snmp.h+1−0
@@ -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_MAX163 __UDP_MIB_MAX
163};164};
164 165