Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142040353
D52369.id161466.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D52369.id161466.diff
View Options
diff --git a/FreeBSD/sys/net/iflib.c b/FreeBSD/sys/net/iflib.c
--- a/FreeBSD/sys/net/iflib.c
+++ b/FreeBSD/sys/net/iflib.c
@@ -3666,6 +3666,11 @@
bus_dmamap_unload(buf_tag, map);
DBG_COUNTER_INC(encap_txq_avail_fail);
DBG_COUNTER_INC(encap_txd_encap_fail);
+ if (ctx->ifc_sysctl_simple_tx) {
+ m_freem(*m_headp);
+ DBG_COUNTER_INC(tx_frees);
+ *m_headp = NULL;
+ }
if ((txq->ift_task.gt_task.ta_flags & TASK_ENQUEUED) == 0)
GROUPTASK_ENQUEUE(&txq->ift_task);
return (ENOBUFS);
@@ -4319,6 +4324,10 @@
ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
m_freem(m);
DBG_COUNTER_INC(tx_frees);
+ if (error == ENOBUFS)
+ if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1);
+ else
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
}
return (err);
@@ -4589,9 +4598,19 @@
static uint64_t
iflib_if_get_counter(if_t ifp, ift_counter cnt)
{
+ uint64_t rv;
if_ctx_t ctx = if_getsoftc(ifp);
- return (IFDI_GET_COUNTER(ctx, cnt));
+ rv = IFDI_GET_COUNTER(ctx, cnt);
+ switch (cnt) {
+ case IFCOUNTER_OQDROPS:
+ case IFCOUNTER_OERRORS:
+ rv += if_get_counter_default(ifp, cnt);
+ break;
+ default:
+ break;
+ }
+ return (rv);
}
/*********************************************************************
@@ -7173,6 +7192,11 @@
bytes_sent += m->m_pkthdr.len;
mcast_sent += !!(m->m_flags & M_MCAST);
(void)iflib_txd_db_check(txq, true);
+ } else {
+ if (error == ENOBUFS)
+ if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1);
+ else
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
}
(void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx));
mtx_unlock(&txq->ift_mtx);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 8:01 AM (11 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27659428
Default Alt Text
D52369.id161466.diff (1 KB)
Attached To
Mode
D52369: iflib: report output drops and handle ENOBUFS properly
Attached
Detach File
Event Timeline
Log In to Comment