Page MenuHomeFreeBSD

D62437.1796512233.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D62437.1796512233.diff

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -3327,13 +3327,15 @@
{
qidx_t notify_count = TXD_NOTIFY_COUNT(txq);
qidx_t minthresh = txq->ift_size / 8;
+
+ /*
+ * Whoever holds the queue lock rings the doorbell before releasing
+ * it, so descriptors may wait on a lightly used ring too: a run of
+ * packets sent under one hold shares a doorbell.
+ */
if (in_use > 4 * minthresh)
return (notify_count);
- if (in_use > 2 * minthresh)
- return (notify_count >> 1);
- if (in_use > minthresh)
- return (notify_count >> 3);
- return (0);
+ return (notify_count >> 1);
}
static inline qidx_t
@@ -3371,8 +3373,8 @@
qidx_t dbval, max;
/*
- * Nothing has been queued since the last doorbell. The threshold is
- * zero for a lightly used ring, so the test below would not catch this.
+ * Nothing has been queued since the last doorbell. The threshold can
+ * be zero, so the test below would not catch this.
*/
if (txq->ift_db_pending == 0)
return (false);

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 5, 11:10 PM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42234514
Default Alt Text
D62437.1796512233.diff (1 KB)

Event Timeline