Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107199919
D30728.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
D30728.diff
View Options
diff --git a/sys/net/iflib.h b/sys/net/iflib.h
--- a/sys/net/iflib.h
+++ b/sys/net/iflib.h
@@ -402,6 +402,10 @@
* Interface has an admin completion queue
*/
#define IFLIB_HAS_ADMINCQ 0x100000
+/*
+ * Interface needs to preserve TX ring indices across restarts.
+ */
+#define IFLIB_PRESERVE_TX_INDICES 0x200000
/*
* These enum values are used in iflib_needs_restart to indicate to iflib
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -2604,7 +2604,12 @@
iflib_txsd_free(ctx, txq, j);
}
txq->ift_processed = txq->ift_cleaned = txq->ift_cidx_processed = 0;
- txq->ift_in_use = txq->ift_gen = txq->ift_cidx = txq->ift_pidx = txq->ift_no_desc_avail = 0;
+ txq->ift_in_use = txq->ift_gen = txq->ift_no_desc_avail = 0;
+ if (sctx->isc_flags & IFLIB_PRESERVE_TX_INDICES)
+ txq->ift_cidx = txq->ift_pidx;
+ else
+ txq->ift_cidx = txq->ift_pidx = 0;
+
txq->ift_closed = txq->ift_mbuf_defrag = txq->ift_mbuf_defrag_failed = 0;
txq->ift_no_tx_dma_setup = txq->ift_txd_encap_efbig = txq->ift_map_failed = 0;
txq->ift_pullups = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 1:55 PM (12 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15769910
Default Alt Text
D30728.diff (1 KB)
Attached To
Mode
D30728: iflib: Add a new quirk
Attached
Detach File
Event Timeline
Log In to Comment