Page MenuHomeFreeBSD

D30728.id90731.diff
No OneTemporary

D30728.id90731.diff

Index: sys/net/iflib.h
===================================================================
--- sys/net/iflib.h
+++ sys/net/iflib.h
@@ -397,6 +397,10 @@
* emulating ethernet
*/
#define IFLIB_PSEUDO_ETHER 0x80000
+/*
+ * Interface needs to preserve TX ring indices across restarts.
+ */
+#define IFLIB_PRESERVE_TX_INDICES 0x100000
/*
* Interface has an admin completion queue
Index: sys/net/iflib.c
===================================================================
--- sys/net/iflib.c
+++ 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

Mime Type
text/plain
Expires
Sun, Jan 12, 3:52 PM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15770837
Default Alt Text
D30728.id90731.diff (1 KB)

Event Timeline