hyperv/hn: When short of mbufs on the RX path, don't spam the console.
Instead, increase the IQDROPS counter. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5693
This commit is contained in:
parent
59526d4ac7
commit
2e4dba97bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297182
@ -1260,8 +1260,10 @@ netvsc_recv(struct hv_vmbus_channel *chan, netvsc_packet *packet,
|
||||
return (0);
|
||||
} else if (packet->tot_data_buf_len <= MHLEN) {
|
||||
m_new = m_gethdr(M_NOWAIT, MT_DATA);
|
||||
if (m_new == NULL)
|
||||
if (m_new == NULL) {
|
||||
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
|
||||
return (0);
|
||||
}
|
||||
memcpy(mtod(m_new, void *), packet->data,
|
||||
packet->tot_data_buf_len);
|
||||
m_new->m_pkthdr.len = m_new->m_len = packet->tot_data_buf_len;
|
||||
@ -1281,7 +1283,7 @@ netvsc_recv(struct hv_vmbus_channel *chan, netvsc_packet *packet,
|
||||
|
||||
m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size);
|
||||
if (m_new == NULL) {
|
||||
if_printf(ifp, "alloc mbuf failed.\n");
|
||||
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user