Page MenuHomeFreeBSD

D38064.diff
No OneTemporary

D38064.diff

diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -4329,8 +4329,10 @@
mbq_unlock(q);
done:
- if (m)
+ if (m) {
+ if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1);
m_freem(m);
+ }
/* unconditionally wake up listeners */
kring->nm_notify(kring, 0);
/* this is normally netmap_notify(), but for nics
diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c
--- a/sys/dev/netmap/netmap_generic.c
+++ b/sys/dev/netmap/netmap_generic.c
@@ -837,8 +837,10 @@
* support RX scatter-gather. */
nm_prlim(2, "Warning: driver pushed up big packet "
"(size=%d)", (int)MBUF_LEN(m));
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
m_freem(m);
} else if (unlikely(mbq_len(&kring->rx_queue) > na->num_rx_desc)) {
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
m_freem(m);
} else {
mbq_safe_enqueue(&kring->rx_queue, m);

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 1, 4:53 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16387850
Default Alt Text
D38064.diff (931 B)

Event Timeline