Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178281542
D62395.1796416380.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
57 KB
Referenced Files
None
Subscribers
None
D62395.1796416380.diff
View Options
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,9 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20261202: Removal of iflib mp_ring
+OLD_FILES+=usr/include/net/mp_ring.h
+
# 20261201: mbuf_test removed
OLD_FILES+=usr/tests/sys/sys/mbuf_test
diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4
--- a/share/man/man4/iflib.4
+++ b/share/man/man4/iflib.4
@@ -17,6 +17,11 @@
This allows for a shared set of
.Xr sysctl 8
names, rather than each driver naming them individually.
+.Pp
+Packets are transmitted directly while the transmit queue mutex is available.
+During contention, packets are deferred through a multi-producer
+.Xr buf_ring 9
+and drained by the mutex holder.
.Sh SYSCTL VARIABLES
These variables must be set before loading the driver, either via
.Xr loader.conf 5
@@ -64,48 +69,17 @@
core.
When set to a non-zero value, TX queues are assigned to cores following the
last RX queue.
-.It Va simple_tx
-When set to one, iflib uses a simple transmit routine that sends packets
-directly while the transmit queue mutex is available.
-During contention, packets are deferred through a multi-producer
-.Xr buf_ring 9
-and drained by the mutex holder.
-By default, iflib uses a highly optimized, lockless, transmit queue called
-mp_ring.
-This performs well when there are more CPU cores than NIC
-queues and prevents lock contention for transmit resources.
-Unfortunately, mp_ring incurs unneeded overheads on workloads where
-resource contention is not a problem (well behaved applications on
-systems where there are as many NIC queues as CPU cores).
-Note that when this is enabled, the tx_abdicate sysctl is no longer
-applicable and is ignored.
-By default, this is the inverse of
-.Va net.iflib.prefer_mpring .
-An explicitly configured value takes precedence over that global default.
.El
.Pp
These
.Xr sysctl 8
variables can be changed at any time:
.Bl -tag -width indent
-.It Va tx_abdicate
-Controls how the transmit ring is serviced.
-If set to zero, when a frame is submitted to the transmission ring, the same
-task that is submitting it will service the ring unless there's already a
-task servicing the TX ring.
-This ensures that whenever there is a pending transmission,
-the transmit ring is being serviced.
-This results in higher transmit throughput.
-If set to a non-zero value, task returns immediately and the transmit
-ring is serviced by a different task.
-This returns control to the caller faster and under high receive load,
-may result in fewer dropped RX frames.
.It Va tx_defer_mfree
Controls the threshold in packets before iflib will free the memory
(mbufs) for the packets that it has transmitted.
When this is nonzero, mbufs will be freed outside the transmit lock.
-Setting this can reduce lock contention and CPU use when using simple_tx.
-Note that this applies only when simple_tx is enabled.
+Setting this can reduce lock contention and CPU use.
.It Va tx_reclaim_thresh
Controls the threshold in packets before iflib will ask the driver
how many transmitted packets can be reclaimed.
@@ -133,37 +107,15 @@
limit.
Setting this to zero forces all contending producers to wait for the mutex.
The default is 8.
-This setting applies only when
-.Va simple_tx
-is enabled.
-.It Va net.iflib.min_tx_latency
-If this is set to a non-zero value, iflib will avoid any attempt to combine
-multiple transmits, and notify the hardware as quickly as possible of
-new descriptors.
-This will lower the maximum throughput, but will also lower transmit latency.
.It Va net.iflib.no_tx_batch
Some NICs allow processing completed transmit descriptors in batches.
Doing so usually increases the transmit throughput by reducing the number of
transmit interrupts.
Setting this to a non-zero value will disable the use of this feature.
-.It Va net.iflib.prefer_mpring
-When set, use the
-.Va mp_ring
-transmit path by default instead of the simple transmit path.
-This is a read-only tunable that must be set before
-.Nm
-is loaded.
-An explicitly configured per-device
-.Va simple_tx
-value takes precedence.
-The default is zero.
.It Va net.iflib.simple_drain_quota
Sets the maximum number of packets that the transmit task may remove from a
simple transmit deferral ring in one drain operation.
The default is 8.
-This setting applies only when
-.Va simple_tx
-is enabled.
.It Va net.iflib.simple_drain_quota_thread
Sets the maximum number of packets that a transmitting thread holding the
transmit queue mutex may remove from a simple transmit deferral ring in one
@@ -171,9 +123,6 @@
A smaller value bounds the time for which a transmitting thread can hold the
mutex while other producers replenish the ring.
The default is 65536.
-This setting applies only when
-.Va simple_tx
-is enabled.
.It Va net.iflib.simple_txbr_size
Sets the number of entries in each
.Xr buf_ring 9
@@ -183,9 +132,6 @@
This is a read-only tunable that must be set before
.Nm
is loaded.
-This setting applies only when
-.Va simple_tx
-is enabled.
.It Va net.iflib.tx_watchdog_periods
Number of consecutive
.Va net.iflib.timer_default
@@ -194,9 +140,8 @@
asks the hardware whether it has completions pending.
A queue is frozen when it holds descriptors the hardware has not reported as
completed while none are reclaimed.
-Demand persists while the outstanding descriptor count grows, the software
-queue is stalled, or the hardware descriptor ring is at its backpressure
-threshold.
+Demand persists while the outstanding descriptor count grows or the hardware
+descriptor ring is at its backpressure threshold.
If it reports none, the interface is reset.
Setting this to zero disables the check.
.El
@@ -222,31 +167,21 @@
The following are repeated for each transmit queue, where Z is the transmit
queue instance number:
.Bl -tag -width indent
-.It Va r_abdications
-Number of consumer abdications in the MP ring for this queue.
-An abdication occurs on every ring submission when tx_abdicate is true.
-.It Va r_restarts
-Number of consumer restarts in the MP ring for this queue.
-A restart occurs when an attempt to drain a non-empty ring fails,
-and the ring is already in the STALLED state.
-.It Va r_stalls
-Number of consumer stalls in the MP ring for this queue.
-A stall occurs when an attempt to drain a non-empty ring fails.
-.It Va r_starts
-Number of normal consumer starts in the MP ring for this queue.
-A start occurs when the MP ring transitions from IDLE to BUSY.
-.It Va r_drops
-Number of drops in the MP ring for this queue.
-A drop occurs when there is an attempt to add an entry to an MP ring with
-no available space.
-.It Va r_enqueues
-Number of entries which have been enqueued to the MP ring for this queue.
-.It Va ring_state
-MP (soft) ring state.
-This provides a snapshot of the current MP ring state, including the producer
-head and tail indexes, the consumer index, and the state.
-The state is one of "IDLE", "BUSY", "STALLED", "ABDICATED", or "CLOSED".
-A closed ring is empty and rejects new enqueues until initialization reopens it.
+.It Va drbr_direct
+Number of packets sent without using the deferral ring.
+.It Va drbr_stall
+Number of times draining the deferral ring stopped because no descriptors
+were available.
+.It Va drbr_deferred
+Number of packets deferred because the transmit queue mutex was unavailable.
+.It Va drbr_drops
+Number of packets dropped because the deferral ring was full.
+.It Va drbr_blocked
+Number of times a full deferral ring forced a caller to wait for the transmit
+queue mutex.
+.It Va drbr_remote
+Number of times a different last-level cache or the producer limit forced a
+caller to wait for the transmit queue mutex.
.It Va txq_cleaned
The number of transmit descriptors which have been reclaimed.
Total cleaned.
diff --git a/sys/conf/files b/sys/conf/files
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4313,7 +4313,6 @@
net/if_geneve.c optional geneve inet | geneve inet6
net/ifdi_if.m optional ether pci iflib
net/iflib.c optional ether pci iflib
-net/mp_ring.c optional ether iflib
net/mppcc.c optional netgraph_mppc_compression
net/mppcd.c optional netgraph_mppc_compression
net/netisr.c standard
diff --git a/sys/modules/iflib/Makefile b/sys/modules/iflib/Makefile
--- a/sys/modules/iflib/Makefile
+++ b/sys/modules/iflib/Makefile
@@ -1,9 +1,7 @@
.PATH: ${SRCTOP}/sys/net
KMOD= iflib
-SRCS= \
- iflib.c \
- mp_ring.c
+SRCS= iflib.c
SRCS+= ifdi_if.c
SRCS+= device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h
SRCS+= opt_acpi.h opt_inet.h opt_inet6.h opt_sched.h
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -61,7 +61,6 @@
#include <net/if_media.h>
#include <net/bpf.h>
#include <net/ethernet.h>
-#include <net/mp_ring.h>
#include <net/debugnet.h>
#include <net/pfil.h>
#include <net/vnet.h>
@@ -254,7 +253,6 @@
uint16_t ifc_sysctl_nrxqs;
uint16_t ifc_sysctl_qs_eq_override;
uint16_t ifc_sysctl_rx_budget;
- uint16_t ifc_sysctl_tx_abdicate;
uint16_t ifc_sysctl_core_offset;
#define CORE_OFFSET_UNSPECIFIED 0xffff
uint8_t ifc_sysctl_separate_txrx;
@@ -262,7 +260,6 @@
uint16_t ifc_sysctl_extra_msix_vectors;
bool ifc_cpus_are_physical_cores;
bool ifc_core_offset_ref;
- bool ifc_sysctl_simple_tx;
bool ifc_sysctl_tx_defer_mfree;
uint16_t ifc_sysctl_tx_reclaim_thresh;
uint16_t ifc_sysctl_tx_reclaim_ticks;
@@ -380,14 +377,7 @@
/* maximum number of txqs that can share an rx interrupt */
#define IFLIB_MAX_TX_SHARED_INTR 4
-/* this should really scale with ring size - this is a fairly arbitrary value */
-#define TX_BATCH_SIZE 32
-
-#define IFLIB_RESTART_BUDGET 8
-
-
#define IFC_LEGACY 0x001
-#define IFC_QFLUSH 0x002
#define IFC_MULTISEG 0x004
#define IFC_INIT_FAILED 0x008
#define IFC_SC_ALLOCATED 0x010
@@ -421,12 +411,10 @@
uint32_t ift_last_reclaim;
uint16_t ift_reclaim_thresh;
uint16_t ift_reclaim_ticks;
- uint8_t ift_txd_size[8];
uint64_t ift_processed;
uint64_t ift_cleaned;
uint64_t ift_processed_prev;
#if MEMORY_LOGGING
- uint64_t ift_enqueued;
uint64_t ift_dequeued;
#endif
uint64_t ift_no_tx_dma_setup;
@@ -448,11 +436,9 @@
volatile u_int ift_producers __aligned(CACHE_LINE_SIZE);
struct mtx ift_mtx;
- struct mtx ift_db_mtx;
/* constant values */
if_ctx_t ift_ctx;
- struct ifmp_ring *ift_br;
struct buf_ring *ift_drbr;
struct grouptask ift_task;
qidx_t ift_size;
@@ -475,9 +461,8 @@
*/
qidx_t ift_outstanding_prev;
uint16_t ift_wdog_armed;
- uint8_t ift_closed;
uint8_t ift_update_freq;
- uint8_t ift_spare1[2]; /* pad to the next pointer boundary */
+ uint8_t ift_spare1[3]; /* pad to the next pointer boundary */
struct iflib_filter_info ift_filter_info;
bus_dma_tag_t ift_buf_tag;
iflib_dma_info_t ift_ifdi;
@@ -658,13 +643,6 @@
iflib_admin_task_fail_device, sizeof(iflib_admin_task_fail_device),
"device name eligible for admin task fail points");
-/*
- * XXX need to ensure that this can't accidentally cause the head to be moved backwards
- */
-static int iflib_min_tx_latency = 0;
-SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW,
- &iflib_min_tx_latency, 0,
- "minimize transmit latency at the possible expense of throughput");
static int iflib_no_tx_batch = 0;
SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW,
&iflib_no_tx_batch, 0,
@@ -693,10 +671,6 @@
SYSCTL_INT(_net_iflib, OID_AUTO, simple_txbr_size, CTLFLAG_RDTUN,
&iflib_simple_txbr_size, 0,
"number of entries in the simple tx deferral ring");
-static bool iflib_prefer_mpring = false;
-SYSCTL_BOOL(_net_iflib, OID_AUTO, prefer_mpring, CTLFLAG_RDTUN,
- &iflib_prefer_mpring, 0,
- "prefer the mp_ring transmit path by default");
static u_int iflib_simple_drain_quota = 8;
SYSCTL_UINT(_net_iflib, OID_AUTO, simple_drain_quota, CTLFLAG_RWTUN,
&iflib_simple_drain_quota, 0,
@@ -763,17 +737,6 @@
SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills_large, CTLFLAG_RD,
&iflib_fl_refills_large, 0, "# large refills");
-static int iflib_txq_drain_flushing;
-static int iflib_txq_drain_stopped;
-static int iflib_txq_drain_notready;
-
-SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_flushing, CTLFLAG_RD,
- &iflib_txq_drain_flushing, 0, "# drain flushes");
-SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_stopped, CTLFLAG_RD,
- &iflib_txq_drain_stopped, 0, "# drains interrupted by stop");
-SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_notready, CTLFLAG_RD,
- &iflib_txq_drain_notready, 0, "# drain notready");
-
static int iflib_encap_load_mbuf_fail;
static int iflib_encap_pad_mbuf_fail;
static int iflib_encap_txq_avail_fail;
@@ -821,8 +784,6 @@
{
iflib_tx_seen = iflib_tx_sent = iflib_tx_encap = iflib_rx_allocs =
iflib_fl_refills = iflib_fl_refills_large = iflib_tx_frees =
- iflib_txq_drain_flushing = iflib_txq_drain_stopped =
- iflib_txq_drain_notready =
iflib_encap_load_mbuf_fail = iflib_encap_pad_mbuf_fail =
iflib_encap_txq_avail_fail = iflib_encap_txd_encap_fail =
iflib_task_fn_rxs = iflib_rx_intr_enables = iflib_fast_intrs =
@@ -846,11 +807,8 @@
static int iflib_qset_structures_setup(if_ctx_t ctx);
static int iflib_msix_init(if_ctx_t ctx);
static int iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filterarg, int *rid, const char *str);
-static void iflib_txq_check_drain(iflib_txq_t txq, int budget);
-static uint32_t iflib_txq_can_drain(struct ifmp_ring *);
#ifdef ALTQ
-static void iflib_altq_if_start(if_t ifp);
-static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m);
+static int iflib_altq_enqueue(if_ctx_t ctx, if_t ifp, struct mbuf *m);
#endif
static void iflib_register(if_ctx_t);
static void iflib_deregister(if_ctx_t);
@@ -859,7 +817,6 @@
static void iflib_init_locked(if_ctx_t ctx);
static void iflib_add_device_sysctl_pre(if_ctx_t ctx);
static void iflib_add_device_sysctl_post(if_ctx_t ctx);
-static uint32_t iflib_txq_drain_free(struct ifmp_ring *, uint32_t, uint32_t);
static void _iflib_pre_assert(if_softc_ctx_t scctx);
static void iflib_stop(if_ctx_t ctx);
static void iflib_if_init_locked(if_ctx_t ctx);
@@ -915,15 +872,6 @@
#endif
}
-static inline void
-prefetch2cachelines(void *x)
-{
- prefetch(x);
-#if (CACHE_LINE_SIZE < 128)
- prefetch((char *)x + CACHE_LINE_SIZE);
-#endif
-}
-
#ifdef DEV_NETMAP
#include <sys/selinfo.h>
#include <net/netmap.h>
@@ -1895,14 +1843,12 @@
err = ENOMEM;
goto fail;
}
- if (ctx->ifc_sysctl_simple_tx) {
- if (!(txq->ift_sds.ifsd_m_defer =
- (struct mbuf **) malloc(sizeof(struct mbuf *) *
- scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) {
- device_printf(dev, "Unable to allocate TX mbuf map memory\n");
- err = ENOMEM;
- goto fail;
- }
+ if (!(txq->ift_sds.ifsd_m_defer =
+ (struct mbuf **)malloc(sizeof(struct mbuf *) *
+ scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) {
+ device_printf(dev, "Unable to allocate TX mbuf map memory\n");
+ err = ENOMEM;
+ goto fail;
}
txq->ift_sds.ifsd_m_deferb = txq->ift_sds.ifsd_m_defer;
/*
@@ -1953,11 +1899,6 @@
for (int i = 0; i < txq->ift_size; i++)
iflib_txsd_destroy(ctx, txq, i);
- if (txq->ift_br != NULL) {
- ifmp_ring_free(txq->ift_br);
- txq->ift_br = NULL;
- }
-
/* Free any mbufs stranded in the deferral ring */
if (txq->ift_drbr != NULL) {
mtx_lock(&txq->ift_mtx);
@@ -2586,10 +2527,8 @@
* marking descriptors as completed indefinitely, and
* 8254x hardware does so for a quiet queue. Continue
* arming only while demand persists: the outstanding
- * count grows, the software ring is stalled, or the
- * hardware ring has reached iflib's backpressure
- * threshold. The last condition covers simple-TX, which
- * does not use the software ring. This also prevents one
+ * count grows or the hardware ring has reached iflib's
+ * backpressure threshold. This also prevents one
* mixed lockless counter sample from arming a quiet queue
* until the verdict. Act only once it has stayed frozen
* under demand for
@@ -2601,7 +2540,6 @@
sctx->isc_pause_frames == 0 &&
ctx->ifc_link_state == LINK_STATE_UP;
demand = outstanding > txq->ift_outstanding_prev ||
- ifmp_ring_is_stalled(txq->ift_br) ||
in_use + MAX_TX_DESC(ctx) >= txq->ift_size - txq->ift_pad;
if (!frozen || !demand)
txq->ift_wdog_armed = 0;
@@ -2787,11 +2725,8 @@
}
/* Open every TX queue before publishing admission to transmitters. */
for (i = 0, txq = ctx->ifc_txqs; i < scctx->isc_ntxqsets; i++, txq++) {
- if (ctx->ifc_sysctl_simple_tx)
- atomic_clear_rel_int(&txq->ift_producers,
- IFLIB_TXQ_QUIESCING);
- else
- ifmp_ring_set_enabled(txq->ift_br, true);
+ atomic_clear_rel_int(&txq->ift_producers,
+ IFLIB_TXQ_QUIESCING);
}
STATE_LOCK(ctx);
iflib_set_running(ctx, true);
@@ -2868,7 +2803,7 @@
("recursive iflib stop"));
stop_hardware = ctx->ifc_datapath_state != IFLIB_DP_STOPPED;
- if (ctx->ifc_sysctl_simple_tx && stop_hardware) {
+ if (stop_hardware) {
/* close deferral rings to new traffic */
for (i = 0; i < scctx->isc_ntxqsets; i++) {
atomic_set_int(&txq[i].ift_producers,
@@ -2921,22 +2856,18 @@
&txq->ift_task.gt_task);
/* Join inline consumers as well as the deferred TX task. */
- if (!ctx->ifc_sysctl_simple_tx) {
- ifmp_ring_set_enabled(txq->ift_br, false);
- } else {
- /* Existing producers may still be publishing to the drbr. */
- while (IFLIB_TXQ_PRODUCER(atomic_load_acq_int(
- &txq->ift_producers)) != 0)
- pause("iflibtx", 1);
- mtx_lock(&txq->ift_mtx);
- drbr_flush(NULL, txq->ift_drbr);
- mtx_unlock(&txq->ift_mtx);
- /* An inline transmitter may free mbufs after dropping mtx. */
- while (txq->ift_sds.ifsd_m_deferb != NULL &&
- atomic_load_acq_ptr((uintptr_t *)
- &txq->ift_sds.ifsd_m_defer) == 0)
- pause("iflibfree", 1);
- }
+ /* Existing producers may still be publishing to the drbr. */
+ while (IFLIB_TXQ_PRODUCER(atomic_load_acq_int(
+ &txq->ift_producers)) != 0)
+ pause("iflibtx", 1);
+ mtx_lock(&txq->ift_mtx);
+ drbr_flush(NULL, txq->ift_drbr);
+ mtx_unlock(&txq->ift_mtx);
+ /* An inline transmitter may free mbufs after dropping mtx. */
+ while (txq->ift_sds.ifsd_m_deferb != NULL &&
+ atomic_load_acq_ptr((uintptr_t *)
+ &txq->ift_sds.ifsd_m_defer) == 0)
+ pause("iflibfree", 1);
}
if (stop_hardware) {
@@ -2966,17 +2897,14 @@
else
txq->ift_cidx = txq->ift_pidx = 0;
- txq->ift_closed = txq->ift_mbuf_defrag = txq->ift_mbuf_defrag_failed = 0;
+ 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;
txq->ift_drbr_direct = txq->ift_drbr_stall = 0;
- if (ctx->ifc_sysctl_simple_tx) {
- counter_u64_zero(txq->ift_drbr_deferred);
- counter_u64_zero(txq->ift_drbr_drops);
- counter_u64_zero(txq->ift_drbr_blocked);
- counter_u64_zero(txq->ift_drbr_remote);
- }
- ifmp_ring_reset_stats(txq->ift_br);
+ counter_u64_zero(txq->ift_drbr_deferred);
+ counter_u64_zero(txq->ift_drbr_drops);
+ counter_u64_zero(txq->ift_drbr_blocked);
+ counter_u64_zero(txq->ift_drbr_remote);
for (j = 0, di = txq->ift_ifdi; j < sctx->isc_ntxqs; j++, di++)
bzero((void *)di->idi_vaddr, di->idi_size);
}
@@ -3980,15 +3908,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_headp = m_head = iflib_remove_mbuf(txq);
- m_freem(*m_headp);
- DBG_COUNTER_INC(tx_frees);
- *m_headp = NULL;
- iflib_tx_drain_schedule(txq);
- } else if ((txq->ift_task.gt_task.ta_flags &
- TASK_ENQUEUED) == 0)
- GROUPTASK_ENQUEUE(&txq->ift_task);
+ *m_headp = m_head = iflib_remove_mbuf(txq);
+ m_freem(*m_headp);
+ DBG_COUNTER_INC(tx_frees);
+ *m_headp = NULL;
+ iflib_tx_drain_schedule(txq);
return (ENOBUFS);
}
}
@@ -4063,9 +3987,6 @@
}
goto defrag_failed;
}
- /* mp_ring assumes ENOBUFS means we didn't consume the mbuf */
- if (err == ENOBUFS && !ctx->ifc_sysctl_simple_tx)
- err = ENOMEM;
goto out_with_error;
}
/*
@@ -4185,179 +4106,14 @@
_iflib_completed_tx_reclaim(txq, NULL, reclaim);
}
-static struct mbuf **
-_ring_peek_one(struct ifmp_ring *r, int cidx, int offset, int remaining)
-{
- int next, size;
- struct mbuf **items;
-
- size = r->size;
- next = (cidx + CACHE_PTR_INCREMENT) & (size - 1);
- items = __DEVOLATILE(struct mbuf **, &r->items[0]);
-
- prefetch(items[(cidx + offset) & (size - 1)]);
- if (remaining > 1) {
- prefetch2cachelines(&items[next]);
- prefetch2cachelines(items[(cidx + offset + 1) & (size - 1)]);
- prefetch2cachelines(items[(cidx + offset + 2) & (size - 1)]);
- prefetch2cachelines(items[(cidx + offset + 3) & (size - 1)]);
- }
- return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size - 1)]));
-}
-
-static void
-iflib_txq_check_drain(iflib_txq_t txq, int budget)
-{
-
- ifmp_ring_check_drainage(txq->ift_br, budget);
-}
-
-static uint32_t
-iflib_txq_can_drain(struct ifmp_ring *r)
-{
- iflib_txq_t txq = r->cookie;
- if_ctx_t ctx = txq->ift_ctx;
-
- /*
- * This runs without consumer ownership. Leave all hardware accesses
- * to iflib_txq_drain(), which reclaims completions after taking BUSY.
- */
- return (!iflib_is_running(ctx) || LINK_ACTIVE(ctx));
-}
-
-static uint32_t
-iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx)
-{
- iflib_txq_t txq = r->cookie;
- if_ctx_t ctx = txq->ift_ctx;
- if_t ifp = ctx->ifc_ifp;
- struct mbuf *m, **mp;
- int avail, bytes_sent, consumed, count, err, i;
- int mcast_sent, pkt_sent, reclaimed;
- bool do_prefetch, rang, ring;
-
- /* Discard outstanding reservations while stop closes the ring. */
- if (__predict_false(!iflib_is_running(ctx)))
- return (iflib_txq_drain_free(r, cidx, pidx));
- if (__predict_false(!LINK_ACTIVE(ctx))) {
- DBG_COUNTER_INC(txq_drain_notready);
- return (0);
- }
- reclaimed = iflib_completed_tx_reclaim(txq, NULL);
- rang = iflib_txd_db_check(txq, reclaimed && txq->ift_db_pending);
- avail = IDXDIFF(pidx, cidx, r->size);
-
- if (__predict_false(ctx->ifc_flags & IFC_QFLUSH)) {
- /*
- * The driver is unloading so we need to free all pending packets.
- */
- DBG_COUNTER_INC(txq_drain_flushing);
- for (i = 0; i < avail; i++) {
- if (__predict_true(r->items[(cidx + i) & (r->size - 1)] != (void *)txq))
- m_freem(r->items[(cidx + i) & (r->size - 1)]);
- r->items[(cidx + i) & (r->size - 1)] = NULL;
- }
- return (avail);
- }
-
- if (__predict_false(!iflib_is_running(ctx))) {
- CALLOUT_LOCK(txq);
- callout_stop(&txq->ift_timer);
- CALLOUT_UNLOCK(txq);
- DBG_COUNTER_INC(txq_drain_stopped);
- return (0);
- }
-
- consumed = mcast_sent = bytes_sent = pkt_sent = 0;
- count = MIN(avail, TX_BATCH_SIZE);
-#ifdef INVARIANTS
- if (iflib_verbose_debug)
- printf("%s avail=%d ifc_flags=%x txq_avail=%d ", __func__,
- avail, ctx->ifc_flags, TXQ_AVAIL(txq));
-#endif
- do_prefetch = (ctx->ifc_flags & IFC_PREFETCH);
- err = 0;
- for (i = 0; i < count && TXQ_AVAIL(txq) >= MAX_TX_DESC(ctx); i++) {
- int rem = do_prefetch ? count - i : 0;
-
- mp = _ring_peek_one(r, cidx, i, rem);
- MPASS(mp != NULL && *mp != NULL);
-
- /*
- * Completion interrupts will use the address of the txq
- * as a sentinel to enqueue _something_ in order to acquire
- * the lock on the mp_ring (there's no direct lock call).
- * We obviously whave to check for these sentinel cases
- * and skip them.
- */
- if (__predict_false(*mp == (struct mbuf *)txq)) {
- consumed++;
- continue;
- }
- err = iflib_encap(txq, mp, &bytes_sent, &pkt_sent);
- if (__predict_false(err)) {
- /* no room - bail out */
- if (err == ENOBUFS)
- break;
- consumed++;
- /* we can't send this packet - skip it */
- continue;
- }
- consumed++;
- m = *mp;
- DBG_COUNTER_INC(tx_sent);
- mcast_sent += !!(m->m_flags & M_MCAST);
-
- if (__predict_false(!iflib_is_running(ctx)))
- break;
- ETHER_BPF_MTAP(ifp, m);
- rang = iflib_txd_db_check(txq, false);
- }
-
- /* deliberate use of bitwise or to avoid gratuitous short-circuit */
- ring = rang ? false : (iflib_min_tx_latency | err | (!!txq->ift_reclaim_thresh));
- iflib_txd_db_check(txq, ring);
- if_inc_counter(ifp, IFCOUNTER_OBYTES, bytes_sent);
- if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent);
- if (mcast_sent)
- if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast_sent);
-#ifdef INVARIANTS
- if (iflib_verbose_debug)
- printf("consumed=%d\n", consumed);
-#endif
- return (consumed);
-}
-
-static uint32_t
-iflib_txq_drain_free(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx)
-{
- int i, avail;
- struct mbuf **mp;
- iflib_txq_t txq;
-
- txq = r->cookie;
-
- avail = IDXDIFF(pidx, cidx, r->size);
- for (i = 0; i < avail; i++) {
- mp = _ring_peek_one(r, cidx, i, avail - i);
- if (__predict_false(*mp == (struct mbuf *)txq))
- continue;
- m_freem(*mp);
- DBG_COUNTER_INC(tx_frees);
- }
- MPASS(ifmp_ring_is_stalled(r) == 0);
- return (avail);
-}
-
static void
_task_fn_tx(void *context)
{
iflib_txq_t txq = context;
if_ctx_t ctx = txq->ift_ctx;
-#if defined(DEV_NETMAP) || defined(ALTQ)
+#ifdef DEV_NETMAP
if_t ifp = ctx->ifc_ifp;
#endif
- int abdicate = ctx->ifc_sysctl_tx_abdicate;
#ifdef IFLIB_DIAGNOSTICS
txq->ift_cpu_exec_count[curcpu]++;
@@ -4367,27 +4123,13 @@
#ifdef DEV_NETMAP
if ((if_getcapenable(ifp) & IFCAP_NETMAP) &&
netmap_tx_irq(ifp, txq->ift_id))
- goto skip_ifmp;
+ goto skip_tx;
#endif
- if (ctx->ifc_sysctl_simple_tx) {
- iflib_simple_txq_drain(txq);
- goto skip_ifmp;
- }
-#ifdef ALTQ
- if (if_altq_is_enabled(ifp))
- iflib_altq_if_start(ifp);
-#endif
- if (txq->ift_db_pending)
- ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE, abdicate);
- else if (!abdicate)
- ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
- /*
- * When abdicating, we always need to check drainage, not just when we don't enqueue
- */
- if (abdicate)
- ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
+ iflib_simple_txq_drain(txq);
-skip_ifmp:
+#ifdef DEV_NETMAP
+skip_tx:
+#endif
if (ctx->ifc_flags & IFC_LEGACY)
IFDI_INTR_ENABLE(ctx);
else
@@ -4502,7 +4244,7 @@
if (LINK_ACTIVE(ctx) == 0)
return;
for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++)
- iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET);
+ GROUPTASK_ENQUEUE(&txq->ift_task);
}
static void
@@ -4566,144 +4308,7 @@
CTX_UNLOCK(ctx);
}
-static int
-iflib_if_transmit(if_t ifp, struct mbuf *m)
-{
- if_ctx_t ctx = if_getsoftc(ifp);
- iflib_txq_t txq;
- int err, qidx;
- int abdicate;
-
- if (__predict_false(!iflib_is_running(ctx) || !LINK_ACTIVE(ctx))) {
- DBG_COUNTER_INC(tx_frees);
- m_freem(m);
- return (ENETDOWN);
- }
-
- MPASS(m->m_nextpkt == NULL);
- /* ALTQ-enabled interfaces always use queue 0. */
- qidx = 0;
- /* Use driver-supplied queue selection method if it exists */
- if (ctx->isc_txq_select_v2) {
- struct if_pkt_info pi;
- uint64_t early_pullups = 0;
- memset(&pi, 0, sizeof(pi));
-
- err = iflib_parse_header_partial(&pi, &m, &early_pullups);
- if (__predict_false(err != 0)) {
- /* Assign pullups for bad pkts to default queue */
- ctx->ifc_txqs[0].ift_pullups += early_pullups;
- DBG_COUNTER_INC(encap_txd_encap_fail);
- return (err);
- }
- /* Let driver make queueing decision */
- qidx = ctx->isc_txq_select_v2(ctx->ifc_softc, m, &pi);
- ctx->ifc_txqs[qidx].ift_pullups += early_pullups;
- }
- /* Backwards compatibility w/ simpler queue select */
- else if (ctx->isc_txq_select)
- qidx = ctx->isc_txq_select(ctx->ifc_softc, m);
- /* If not, use iflib's standard method */
- else if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m) && !if_altq_is_enabled(ifp))
- qidx = QIDX(ctx, m);
-
- /* Set TX queue */
- txq = &ctx->ifc_txqs[qidx];
-
-#ifdef DRIVER_BACKPRESSURE
- if (txq->ift_closed) {
- while (m != NULL) {
- next = m->m_nextpkt;
- m->m_nextpkt = NULL;
- m_freem(m);
- DBG_COUNTER_INC(tx_frees);
- m = next;
- }
- return (ENOBUFS);
- }
-#endif
-#ifdef notyet
- qidx = count = 0;
- mp = marr;
- next = m;
- do {
- count++;
- next = next->m_nextpkt;
- } while (next != NULL);
-
- if (count > nitems(marr))
- if ((mp = malloc(count * sizeof(struct mbuf *), M_IFLIB, M_NOWAIT)) == NULL) {
- /* XXX check nextpkt */
- m_freem(m);
- /* XXX simplify for now */
- DBG_COUNTER_INC(tx_frees);
- return (ENOBUFS);
- }
- for (next = m, i = 0; next != NULL; i++) {
- mp[i] = next;
- next = next->m_nextpkt;
- mp[i]->m_nextpkt = NULL;
- }
-#endif
- DBG_COUNTER_INC(tx_seen);
- abdicate = ctx->ifc_sysctl_tx_abdicate;
-
- err = ifmp_ring_enqueue(txq->ift_br, (void **)&m, 1, TX_BATCH_SIZE, abdicate);
- if (__predict_false(err != 0)) {
- if (err != ENETDOWN) {
- GROUPTASK_ENQUEUE(&txq->ift_task);
-#ifdef DRIVER_BACKPRESSURE
- txq->ift_closed = TRUE;
-#endif
- ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
- if_inc_counter(ifp, err == ENOBUFS ?
- IFCOUNTER_OQDROPS : IFCOUNTER_OERRORS, 1);
- }
- m_freem(m);
- DBG_COUNTER_INC(tx_frees);
- } else if (abdicate)
- GROUPTASK_ENQUEUE(&txq->ift_task);
-
- return (err);
-}
-
#ifdef ALTQ
-/*
- * The overall approach to integrating iflib with ALTQ is to continue to use
- * the iflib mp_ring machinery between the ALTQ queue(s) and the hardware
- * ring. Technically, when using ALTQ, queueing to an intermediate mp_ring
- * is redundant/unnecessary, but doing so minimizes the amount of
- * ALTQ-specific code required in iflib. It is assumed that the overhead of
- * redundantly queueing to an intermediate mp_ring is swamped by the
- * performance limitations inherent in using ALTQ.
- *
- * When ALTQ support is compiled in, all iflib drivers will use a transmit
- * routine, iflib_altq_if_transmit(), that checks if ALTQ is enabled for the
- * given interface. If ALTQ is enabled for an interface, then all
- * transmitted packets for that interface will be submitted to the ALTQ
- * subsystem via iflib_altq_enqueue(). We don't use the legacy if_transmit()
- * implementation because it uses IFQ_HANDOFF(), which will duplicatively
- * update stats that the iflib machinery handles, and which is sensitve to
- * the disused IFF_DRV_OACTIVE flag. Additionally, iflib_altq_if_start()
- * will be installed as the start routine for use by ALTQ facilities that
- * need to trigger queue drains on a scheduled basis.
- *
- */
-static void
-iflib_altq_if_start(if_t ifp)
-{
- struct ifaltq *ifq = &ifp->if_snd; /* XXX - DRVAPI */
- struct mbuf *m;
-
- IFQ_LOCK(ifq);
- IFQ_DEQUEUE_NOLOCK(ifq, m);
- while (m != NULL) {
- iflib_if_transmit(ifp, m);
- IFQ_DEQUEUE_NOLOCK(ifq, m);
- }
- IFQ_UNLOCK(ifq);
-}
-
static int
iflib_altq_enqueue(if_ctx_t ctx, if_t ifp, struct mbuf *m)
{
@@ -4723,15 +4328,6 @@
if_start(ifp);
return (err);
}
-
-static int
-iflib_altq_if_transmit(if_t ifp, struct mbuf *m)
-{
-
- if (ALTQ_IS_ENABLED(&ifp->if_snd))
- return (iflib_altq_enqueue(if_getsoftc(ifp), ifp, m));
- return (iflib_if_transmit(ifp, m));
-}
#endif /* ALTQ */
static void
@@ -4741,22 +4337,11 @@
iflib_txq_t txq = ctx->ifc_txqs;
int i;
- STATE_LOCK(ctx);
- ctx->ifc_flags |= IFC_QFLUSH;
- STATE_UNLOCK(ctx);
for (i = 0; i < NTXQSETS(ctx); i++, txq++) {
- if (txq->ift_drbr != NULL) {
- mtx_lock(&txq->ift_mtx);
- drbr_flush(ifp, txq->ift_drbr);
- mtx_unlock(&txq->ift_mtx);
- continue;
- }
- while (!(ifmp_ring_is_idle(txq->ift_br) || ifmp_ring_is_stalled(txq->ift_br)))
- iflib_txq_check_drain(txq, 0);
+ mtx_lock(&txq->ift_mtx);
+ drbr_flush(ifp, txq->ift_drbr);
+ mtx_unlock(&txq->ift_mtx);
}
- STATE_LOCK(ctx);
- ctx->ifc_flags &= ~IFC_QFLUSH;
- STATE_UNLOCK(ctx);
/*
* When ALTQ is enabled, this will also take care of purging the
@@ -5561,12 +5146,6 @@
scctx = &ctx->ifc_softc_ctx;
ifp = ctx->ifc_ifp;
- if (ctx->ifc_sysctl_simple_tx) {
- /* if_start drives the same drbr drain when ALTQ is active. */
- if_settransmitfn(ifp, iflib_simple_transmit);
- if_setstartfn(ifp, iflib_simple_if_start);
- device_printf(dev, "using simple transmit\n");
- }
iflib_reset_qvalues(ctx);
CTX_LOCK(ctx);
IFLIB_REGISTER_FAIL_POINT(dev, register_before_attach_pre, err,
@@ -5585,14 +5164,12 @@
* than testing for optional methods for every packet. Prefer v2 when
* the driver provides both methods.
*/
- if (ctx->ifc_sysctl_simple_tx) {
- if (ctx->isc_txq_select_v2 != NULL)
- if_settransmitfn(ifp,
- iflib_simple_transmit_txq_select_v2);
- else if (ctx->isc_txq_select != NULL)
- if_settransmitfn(ifp,
- iflib_simple_transmit_txq_select);
- }
+ if (ctx->isc_txq_select_v2 != NULL)
+ if_settransmitfn(ifp,
+ iflib_simple_transmit_txq_select_v2);
+ else if (ctx->isc_txq_select != NULL)
+ if_settransmitfn(ifp,
+ iflib_simple_transmit_txq_select);
MPASS(scctx->isc_dma_width <= flsll(BUS_SPACE_MAXADDR));
@@ -6187,7 +5764,7 @@
CTX_UNLOCK(ctx);
if (running) {
for (int i = 0; i < NTXQSETS(ctx); i++, txq++)
- iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET);
+ GROUPTASK_ENQUEUE(&txq->ift_task);
}
child_error = bus_generic_resume(dev);
@@ -6451,12 +6028,11 @@
/* VF status describes children of an SR-IOV PF. */
if (!CTX_IS_VF(ctx))
if_setvfstatusfn(ifp, iflib_if_vf_status);
+ /* if_start drives the same drbr drain when ALTQ is active. */
+ if_setstartfn(ifp, iflib_simple_if_start);
+ if_settransmitfn(ifp, iflib_simple_transmit);
#ifdef ALTQ
- if_setstartfn(ifp, iflib_altq_if_start);
- if_settransmitfn(ifp, iflib_altq_if_transmit);
if_setsendqready(ifp);
-#else
- if_settransmitfn(ifp, iflib_if_transmit);
#endif
if_setqflushfn(ifp, iflib_if_qflush);
if_setgetcounterfn(ifp, iflib_if_get_counter);
@@ -6582,7 +6158,6 @@
err = ENOMEM;
goto err_tx_desc;
}
- txq->ift_txd_size[j] = scctx->isc_txd_size[j];
bzero((void *)ifdip->idi_vaddr, txqsizes[j]);
}
txq->ift_ctx = ctx;
@@ -6612,21 +6187,12 @@
txq->ift_netmap_timer.c_cpu = cpu;
#endif /* DEV_NETMAP */
- err = ifmp_ring_alloc(&txq->ift_br, 2048, txq, iflib_txq_drain,
- iflib_txq_can_drain, M_IFLIB, M_WAITOK);
- if (err) {
- /* XXX free any allocated rings */
- device_printf(dev, "Unable to allocate buf_ring\n");
- goto err_tx_desc;
- }
- if (ctx->ifc_sysctl_simple_tx) {
- txq->ift_drbr = buf_ring_alloc(iflib_simple_txbr_size,
- M_IFLIB, M_WAITOK, &txq->ift_mtx);
- txq->ift_drbr_deferred = counter_u64_alloc(M_WAITOK);
- txq->ift_drbr_drops = counter_u64_alloc(M_WAITOK);
- txq->ift_drbr_blocked = counter_u64_alloc(M_WAITOK);
- txq->ift_drbr_remote = counter_u64_alloc(M_WAITOK);
- }
+ txq->ift_drbr = buf_ring_alloc(iflib_simple_txbr_size,
+ M_IFLIB, M_WAITOK, &txq->ift_mtx);
+ txq->ift_drbr_deferred = counter_u64_alloc(M_WAITOK);
+ txq->ift_drbr_drops = counter_u64_alloc(M_WAITOK);
+ txq->ift_drbr_blocked = counter_u64_alloc(M_WAITOK);
+ txq->ift_drbr_remote = counter_u64_alloc(M_WAITOK);
txq->ift_reclaim_thresh = ctx->ifc_sysctl_tx_reclaim_thresh;
}
@@ -7434,39 +7000,6 @@
return (vectors);
}
-static const char * const ring_states[] = {
- "IDLE", "BUSY", "STALLED", "ABDICATED", "CLOSED"
-};
-
-static int
-mp_ring_state_handler(SYSCTL_HANDLER_ARGS)
-{
- int rc;
- uint16_t *state = ((uint16_t *)oidp->oid_arg1);
- uint16_t flags;
- struct sbuf *sb;
- const char *ring_state = "UNKNOWN";
-
- /* XXX needed ? */
- rc = sysctl_wire_old_buffer(req, 0);
- MPASS(rc == 0);
- if (rc != 0)
- return (rc);
- sb = sbuf_new_for_sysctl(NULL, NULL, 80, req);
- MPASS(sb != NULL);
- if (sb == NULL)
- return (ENOMEM);
- flags = state[3];
- if (flags < nitems(ring_states))
- ring_state = ring_states[flags];
-
- sbuf_printf(sb, "pidx_head: %04hd pidx_tail: %04hd cidx: %04hd state: %s",
- state[0], state[1], state[2], ring_state);
- rc = sbuf_finish(sb);
- sbuf_delete(sb);
- return (rc);
-}
-
enum iflib_ndesc_handler {
IFLIB_NTXD_HANDLER,
IFLIB_NRXD_HANDLER,
@@ -7638,10 +7171,6 @@
"tx_watchdog_events", CTLFLAG_RD, &ctx->ifc_tx_watchdog_events, 0,
"TX watchdog resets initiated by iflib");
- ctx->ifc_sysctl_simple_tx = !iflib_prefer_mpring;
- SYSCTL_ADD_BOOL(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "simple_tx",
- CTLFLAG_RDTUN, &ctx->ifc_sysctl_simple_tx, 0,
- "use simple tx ring");
SYSCTL_ADD_U16(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "override_ntxqs",
CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0,
"# of txqs to use, 0 => use default #");
@@ -7656,9 +7185,6 @@
"disable MSI-X (default 0)");
SYSCTL_ADD_U16(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "rx_budget",
CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, "set the RX budget");
- SYSCTL_ADD_U16(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "tx_abdicate",
- CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0,
- "cause TX to abdicate instead of running to completion");
ctx->ifc_sysctl_core_offset = CORE_OFFSET_UNSPECIFIED;
SYSCTL_ADD_U16(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "core_offset",
CTLFLAG_RDTUN, &ctx->ifc_sysctl_core_offset, 0,
@@ -7738,8 +7264,6 @@
#if MEMORY_LOGGING
SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued",
CTLFLAG_RD, &txq->ift_dequeued, "total mbufs freed");
- SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued",
- CTLFLAG_RD, &txq->ift_enqueued, "total mbufs enqueued");
#endif
SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag",
CTLFLAG_RD, &txq->ift_mbuf_defrag,
@@ -7776,30 +7300,6 @@
"descriptors procesed for clean");
SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned",
CTLFLAG_RD, &txq->ift_cleaned, "total cleaned");
- SYSCTL_ADD_PROC(ctx_list, queue_list, OID_AUTO, "ring_state",
- CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT,
- __DEVOLATILE(uint64_t *, &txq->ift_br->state), 0,
- mp_ring_state_handler, "A", "soft ring state");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_enqueues", CTLFLAG_RD, &txq->ift_br->enqueues,
- "# of enqueues to the mp_ring for this queue");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_drops", CTLFLAG_RD, &txq->ift_br->drops,
- "# of drops in the mp_ring for this queue");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_starts", CTLFLAG_RD, &txq->ift_br->starts,
- "# of normal consumer starts in mp_ring for this queue");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_stalls", CTLFLAG_RD, &txq->ift_br->stalls,
- "# of consumer stalls in the mp_ring for this queue");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_restarts", CTLFLAG_RD, &txq->ift_br->restarts,
- "# of consumer restarts in the mp_ring for this queue");
- SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO,
- "r_abdications", CTLFLAG_RD, &txq->ift_br->abdications,
- "# of consumer abdications in the mp_ring for this queue");
- if (txq->ift_drbr == NULL)
- continue;
SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO,
"drbr_direct", CTLFLAG_RD, &txq->ift_drbr_direct,
"# of packets sent without touching the deferral ring");
diff --git a/sys/net/mp_ring.h b/sys/net/mp_ring.h
deleted file mode 100644
--- a/sys/net/mp_ring.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * Copyright (c) 2014 Chelsio Communications, Inc.
- * All rights reserved.
- * Written by: Navdeep Parhar <np@FreeBSD.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef __NET_MP_RING_H
-#define __NET_MP_RING_H
-
-#ifndef _KERNEL
-#error "no user-serviceable parts inside"
-#endif
-
-struct ifmp_ring;
-typedef u_int (*mp_ring_drain_t)(struct ifmp_ring *, u_int, u_int);
-typedef u_int (*mp_ring_can_drain_t)(struct ifmp_ring *);
-typedef void (*mp_ring_serial_t)(struct ifmp_ring *);
-
-#if defined(__powerpc__)
-#define MP_RING_NO_64BIT_ATOMICS
-#endif
-
-struct ifmp_ring {
- volatile uint64_t state __aligned(CACHE_LINE_SIZE);
-
- int size __aligned(CACHE_LINE_SIZE);
- void * cookie;
- struct malloc_type * mt;
- mp_ring_drain_t drain;
- mp_ring_can_drain_t can_drain; /* called without consumer ownership */
- counter_u64_t enqueues;
- counter_u64_t drops;
- counter_u64_t starts;
- counter_u64_t stalls;
- counter_u64_t restarts; /* recovered after stalling */
- counter_u64_t abdications;
-#ifdef MP_RING_NO_64BIT_ATOMICS
- struct mtx lock;
-#endif
- void * volatile items[] __aligned(CACHE_LINE_SIZE);
-};
-
-int ifmp_ring_alloc(struct ifmp_ring **, int, void *, mp_ring_drain_t,
- mp_ring_can_drain_t, struct malloc_type *, int);
-void ifmp_ring_free(struct ifmp_ring *);
-int ifmp_ring_enqueue(struct ifmp_ring *, void **, int, int, int);
-void ifmp_ring_check_drainage(struct ifmp_ring *, int);
-void ifmp_ring_set_enabled(struct ifmp_ring *, bool);
-void ifmp_ring_reset_stats(struct ifmp_ring *);
-int ifmp_ring_is_idle(struct ifmp_ring *);
-int ifmp_ring_is_stalled(struct ifmp_ring *r);
-#endif
diff --git a/sys/net/mp_ring.c b/sys/net/mp_ring.c
deleted file mode 100644
--- a/sys/net/mp_ring.c
+++ /dev/null
@@ -1,612 +0,0 @@
-/*-
- * Copyright (c) 2014 Chelsio Communications, Inc.
- * All rights reserved.
- * Written by: Navdeep Parhar <np@FreeBSD.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/counter.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/malloc.h>
-#include <machine/cpu.h>
-#include <net/mp_ring.h>
-
-union ring_state {
- struct {
- uint16_t pidx_head;
- uint16_t pidx_tail;
- uint16_t cidx;
- uint16_t flags;
- };
- uint64_t state;
-};
-
-enum {
- IDLE = 0, /* consumer ran to completion, nothing more to do. */
- BUSY, /* consumer is running already, or will be shortly. */
- STALLED, /* consumer stopped due to lack of resources. */
- ABDICATED, /* consumer stopped even though there was work to be
- done because it wants another thread to take over. */
- CLOSED, /* empty; new producer reservations are rejected. */
-};
-
-/*
- * No items are published (tail == cidx). Reserve all space (head one
- * slot behind cidx) so producers take the existing ring-full path.
- */
-static const union ring_state closed = {
- .pidx_head = 0, .pidx_tail = 1, .cidx = 1, .flags = CLOSED,
-};
-
-static inline uint16_t
-space_available(struct ifmp_ring *r, union ring_state s)
-{
- uint16_t x = r->size - 1;
-
- if (s.cidx == s.pidx_head)
- return (x);
- else if (s.cidx > s.pidx_head)
- return (s.cidx - s.pidx_head - 1);
- else
- return (x - s.pidx_head + s.cidx);
-}
-
-static inline uint16_t
-increment_idx(struct ifmp_ring *r, uint16_t idx, uint16_t n)
-{
- int x = r->size - idx;
-
- MPASS(x > 0);
- return (x > n ? idx + n : n - x);
-}
-
-/* Consumer is about to update the ring's state to s */
-static inline uint16_t
-state_to_flags(union ring_state s, int abdicate)
-{
-
- if (s.cidx == s.pidx_tail)
- return (IDLE);
- else if (abdicate && s.pidx_tail != s.pidx_head)
- return (ABDICATED);
-
- return (BUSY);
-}
-
-#ifdef MP_RING_NO_64BIT_ATOMICS
-static void
-drain_ring_locked(struct ifmp_ring *r, union ring_state os, uint16_t prev, int budget)
-{
- union ring_state ns;
- int n, pending, total;
- uint16_t cidx = os.cidx;
- uint16_t pidx = os.pidx_tail;
-
- MPASS(os.flags == BUSY);
- MPASS(cidx != pidx);
-
- if (prev == IDLE)
- counter_u64_add(r->starts, 1);
- pending = 0;
- total = 0;
-
- while (cidx != pidx) {
- /* Items from cidx to pidx are available for consumption. */
- n = r->drain(r, cidx, pidx);
- if (n == 0) {
- os.state = ns.state = r->state;
- ns.cidx = cidx;
- ns.flags = STALLED;
- r->state = ns.state;
- if (prev != STALLED)
- counter_u64_add(r->stalls, 1);
- else if (total > 0) {
- counter_u64_add(r->restarts, 1);
- counter_u64_add(r->stalls, 1);
- }
- break;
- }
- cidx = increment_idx(r, cidx, n);
- pending += n;
- total += n;
-
- /*
- * We update the cidx only if we've caught up with the pidx, the
- * real cidx is getting too far ahead of the one visible to
- * everyone else, or we have exceeded our budget.
- */
- if (cidx != pidx && pending < 64 && total < budget)
- continue;
-
- os.state = ns.state = r->state;
- ns.cidx = cidx;
- ns.flags = state_to_flags(ns, total >= budget);
- r->state = ns.state;
-
- if (ns.flags == ABDICATED)
- counter_u64_add(r->abdications, 1);
- if (ns.flags != BUSY) {
- /* Wrong loop exit if we're going to stall. */
- MPASS(ns.flags != STALLED);
- if (prev == STALLED) {
- MPASS(total > 0);
- counter_u64_add(r->restarts, 1);
- }
- break;
- }
-
- /*
- * The acquire style atomic above guarantees visibility of items
- * associated with any pidx change that we notice here.
- */
- pidx = ns.pidx_tail;
- pending = 0;
- }
-}
-#else
-/*
- * Caller passes in a state, with a guarantee that there is work to do and that
- * all items up to the pidx_tail in the state are visible.
- */
-static void
-drain_ring_lockless(struct ifmp_ring *r, union ring_state os, uint16_t prev, int budget)
-{
- union ring_state ns;
- int n, pending, total;
- uint16_t cidx = os.cidx;
- uint16_t pidx = os.pidx_tail;
-
- MPASS(os.flags == BUSY);
- MPASS(cidx != pidx);
-
- if (prev == IDLE)
- counter_u64_add(r->starts, 1);
- pending = 0;
- total = 0;
-
- while (cidx != pidx) {
- /* Items from cidx to pidx are available for consumption. */
- n = r->drain(r, cidx, pidx);
- if (n == 0) {
- critical_enter();
- os.state = r->state;
- do {
- ns.state = os.state;
- ns.cidx = cidx;
- ns.flags = STALLED;
- } while (atomic_fcmpset_rel_64(&r->state, &os.state,
- ns.state) == 0);
- critical_exit();
- if (prev != STALLED)
- counter_u64_add(r->stalls, 1);
- else if (total > 0) {
- counter_u64_add(r->restarts, 1);
- counter_u64_add(r->stalls, 1);
- }
- break;
- }
- cidx = increment_idx(r, cidx, n);
- pending += n;
- total += n;
-
- /*
- * We update the cidx only if we've caught up with the pidx, the
- * real cidx is getting too far ahead of the one visible to
- * everyone else, or we have exceeded our budget.
- */
- if (cidx != pidx && pending < 64 && total < budget)
- continue;
- /* Publish completed consumer work before releasing ownership. */
- atomic_thread_fence_rel();
- critical_enter();
- os.state = r->state;
- do {
- ns.state = os.state;
- ns.cidx = cidx;
- ns.flags = state_to_flags(ns, total >= budget);
- } while (atomic_fcmpset_acq_64(&r->state, &os.state,
- ns.state) == 0);
- critical_exit();
-
- if (ns.flags == ABDICATED)
- counter_u64_add(r->abdications, 1);
- if (ns.flags != BUSY) {
- /* Wrong loop exit if we're going to stall. */
- MPASS(ns.flags != STALLED);
- if (prev == STALLED) {
- MPASS(total > 0);
- counter_u64_add(r->restarts, 1);
- }
- break;
- }
-
- /*
- * The acquire style atomic above guarantees visibility of items
- * associated with any pidx change that we notice here.
- */
- pidx = ns.pidx_tail;
- pending = 0;
- }
-}
-#endif
-
-int
-ifmp_ring_alloc(struct ifmp_ring **pr, int size, void *cookie, mp_ring_drain_t drain,
- mp_ring_can_drain_t can_drain, struct malloc_type *mt, int flags)
-{
- struct ifmp_ring *r;
-
- /* All idx are 16b so size can be 65536 at most */
- if (pr == NULL || size < 2 || size > 65536 || drain == NULL ||
- can_drain == NULL)
- return (EINVAL);
- *pr = NULL;
- flags &= M_NOWAIT | M_WAITOK;
- MPASS(flags != 0);
-
- r = malloc(__offsetof(struct ifmp_ring, items[size]), mt, flags | M_ZERO);
- if (r == NULL)
- return (ENOMEM);
- r->size = size;
- r->cookie = cookie;
- r->mt = mt;
- r->drain = drain;
- r->can_drain = can_drain;
- r->enqueues = counter_u64_alloc(flags);
- r->drops = counter_u64_alloc(flags);
- r->starts = counter_u64_alloc(flags);
- r->stalls = counter_u64_alloc(flags);
- r->restarts = counter_u64_alloc(flags);
- r->abdications = counter_u64_alloc(flags);
- if (r->enqueues == NULL || r->drops == NULL || r->starts == NULL ||
- r->stalls == NULL || r->restarts == NULL ||
- r->abdications == NULL) {
- ifmp_ring_free(r);
- return (ENOMEM);
- }
-
- *pr = r;
-#ifdef MP_RING_NO_64BIT_ATOMICS
- mtx_init(&r->lock, "mp_ring lock", NULL, MTX_DEF);
-#endif
- return (0);
-}
-
-void
-ifmp_ring_free(struct ifmp_ring *r)
-{
-
- if (r == NULL)
- return;
-
- if (r->enqueues != NULL)
- counter_u64_free(r->enqueues);
- if (r->drops != NULL)
- counter_u64_free(r->drops);
- if (r->starts != NULL)
- counter_u64_free(r->starts);
- if (r->stalls != NULL)
- counter_u64_free(r->stalls);
- if (r->restarts != NULL)
- counter_u64_free(r->restarts);
- if (r->abdications != NULL)
- counter_u64_free(r->abdications);
-
- free(r, r->mt);
-}
-
-/*
- * Enqueue n items and maybe drain the ring for some time.
- *
- * Returns ENETDOWN if the ring is closed, or ENOBUFS if it is full.
- * On either error the caller retains ownership of the items.
- */
-#ifdef MP_RING_NO_64BIT_ATOMICS
-int
-ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget, int abdicate)
-{
- union ring_state os, ns;
- uint16_t pidx_start, pidx_stop;
- int i;
-
- MPASS(items != NULL);
- MPASS(n > 0);
-
- mtx_lock(&r->lock);
- /*
- * Reserve room for the new items. Our reservation, if successful, is
- * from 'pidx_start' to 'pidx_stop'.
- */
- os.state = r->state;
- if (n >= space_available(r, os)) {
- if (os.flags == CLOSED) {
- mtx_unlock(&r->lock);
- return (ENETDOWN);
- }
- counter_u64_add(r->drops, n);
- MPASS(os.flags != IDLE);
- mtx_unlock(&r->lock);
- if (os.flags == STALLED)
- ifmp_ring_check_drainage(r, 0);
- return (ENOBUFS);
- }
- ns.state = os.state;
- ns.pidx_head = increment_idx(r, os.pidx_head, n);
- r->state = ns.state;
- pidx_start = os.pidx_head;
- pidx_stop = ns.pidx_head;
-
- /*
- * Wait for other producers who got in ahead of us to enqueue their
- * items, one producer at a time. It is our turn when the ring's
- * pidx_tail reaches the beginning of our reservation (pidx_start).
- */
- while (ns.pidx_tail != pidx_start) {
- cpu_spinwait();
- ns.state = r->state;
- }
-
- /* Now it is our turn to fill up the area we reserved earlier. */
- i = pidx_start;
- do {
- r->items[i] = *items++;
- if (__predict_false(++i == r->size))
- i = 0;
- } while (i != pidx_stop);
-
- /*
- * Update the ring's pidx_tail. The release style atomic guarantees
- * that the items are visible to any thread that sees the updated pidx.
- */
- os.state = ns.state = r->state;
- ns.pidx_tail = pidx_stop;
- if (abdicate) {
- if (os.flags == IDLE)
- ns.flags = ABDICATED;
- } else
- ns.flags = BUSY;
- r->state = ns.state;
- counter_u64_add(r->enqueues, n);
-
- if (!abdicate) {
- /*
- * Turn into a consumer if some other thread isn't active as a consumer
- * already.
- */
- if (os.flags != BUSY)
- drain_ring_locked(r, ns, os.flags, budget);
- }
-
- mtx_unlock(&r->lock);
- return (0);
-}
-#else
-int
-ifmp_ring_enqueue(struct ifmp_ring *r, void **items, int n, int budget, int abdicate)
-{
- union ring_state os, ns;
- uint16_t pidx_start, pidx_stop;
- int i;
-
- MPASS(items != NULL);
- MPASS(n > 0);
-
- /*
- * Reserve room for the new items. Our reservation, if successful, is
- * from 'pidx_start' to 'pidx_stop'.
- */
- os.state = r->state;
- for (;;) {
- if (n >= space_available(r, os)) {
- if (os.flags == CLOSED)
- return (ENETDOWN);
- counter_u64_add(r->drops, n);
- MPASS(os.flags != IDLE);
- if (os.flags == STALLED)
- ifmp_ring_check_drainage(r, 0);
- return (ENOBUFS);
- }
- ns.state = os.state;
- ns.pidx_head = increment_idx(r, os.pidx_head, n);
- critical_enter();
- if (atomic_fcmpset_64(&r->state, &os.state, ns.state))
- break;
- critical_exit();
- cpu_spinwait();
- }
- pidx_start = os.pidx_head;
- pidx_stop = ns.pidx_head;
-
- /*
- * Wait for other producers who got in ahead of us to enqueue their
- * items, one producer at a time. It is our turn when the ring's
- * pidx_tail reaches the beginning of our reservation (pidx_start).
- */
- while (ns.pidx_tail != pidx_start) {
- cpu_spinwait();
- ns.state = r->state;
- }
-
- /* Now it is our turn to fill up the area we reserved earlier. */
- i = pidx_start;
- do {
- r->items[i] = *items++;
- if (__predict_false(++i == r->size))
- i = 0;
- } while (i != pidx_stop);
-
- /*
- * Update the ring's pidx_tail. The release style atomic guarantees
- * that the items are visible to any thread that sees the updated pidx.
- */
- os.state = r->state;
- do {
- ns.state = os.state;
- ns.pidx_tail = pidx_stop;
- if (abdicate) {
- if (os.flags == IDLE)
- ns.flags = ABDICATED;
- } else
- ns.flags = BUSY;
- } while (atomic_fcmpset_rel_64(&r->state, &os.state, ns.state) == 0);
- critical_exit();
- counter_u64_add(r->enqueues, n);
-
- if (!abdicate) {
- /*
- * Turn into a consumer if some other thread isn't active as a consumer
- * already.
- */
- if (os.flags != BUSY) {
- /* Acquire the preceding consumer or waiter's stores. */
- atomic_thread_fence_acq();
- drain_ring_lockless(r, ns, os.flags, budget);
- }
- }
-
- return (0);
-}
-#endif
-
-void
-ifmp_ring_check_drainage(struct ifmp_ring *r, int budget)
-{
- union ring_state os, ns;
-
- os.state = r->state;
- if ((os.flags != STALLED && os.flags != ABDICATED) || // Only continue in STALLED and ABDICATED
- os.pidx_head != os.pidx_tail || // Require work to be available
- (os.flags != ABDICATED && r->can_drain(r) == 0)) // Can either drain, or everyone left
- return;
-
- MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */
- ns.state = os.state;
- ns.flags = BUSY;
-
-#ifdef MP_RING_NO_64BIT_ATOMICS
- mtx_lock(&r->lock);
- if (r->state != os.state) {
- mtx_unlock(&r->lock);
- return;
- }
- r->state = ns.state;
- drain_ring_locked(r, ns, os.flags, budget);
- mtx_unlock(&r->lock);
-#else
- /*
- * The acquire style atomic guarantees visibility of items associated
- * with the pidx that we read here.
- */
- if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state))
- return;
-
- drain_ring_lockless(r, ns, os.flags, budget);
-#endif
-}
-
-/*
- * To disable the ring, the caller must stop new traffic and arrange for the
- * consumer to discard outstanding items. Reserve the empty ring in the
- * same transition that observes it idle. Enable only after disabling it.
- * The caller serializes these operations and keeps the ring allocated.
- * May sleep.
- */
-void
-ifmp_ring_set_enabled(struct ifmp_ring *r, bool enabled)
-{
- union ring_state s;
- uint64_t target;
- bool idle;
-
- target = enabled ? 0 : closed.state;
-#ifndef MP_RING_NO_64BIT_ATOMICS
- /* Publish initialization to consumers acquiring the reopened ring. */
- atomic_thread_fence_rel();
-#endif
- for (;;) {
-#ifdef MP_RING_NO_64BIT_ATOMICS
- mtx_lock(&r->lock);
- s.state = r->state;
-#else
- s.state = atomic_load_acq_64(&r->state);
-#endif
- MPASS(!enabled || s.flags == CLOSED);
- idle = s.flags == CLOSED || (s.flags == IDLE &&
- s.pidx_head == s.pidx_tail && s.pidx_tail == s.cidx);
-#ifdef MP_RING_NO_64BIT_ATOMICS
- if (idle)
- r->state = target;
- mtx_unlock(&r->lock);
- if (idle)
- return;
-#else
- if (idle && atomic_cmpset_acq_64(&r->state, s.state, target))
- return;
-#endif
- ifmp_ring_check_drainage(r, r->size);
- pause("ifmpring", 1);
- }
-}
-
-void
-ifmp_ring_reset_stats(struct ifmp_ring *r)
-{
-
- counter_u64_zero(r->enqueues);
- counter_u64_zero(r->drops);
- counter_u64_zero(r->starts);
- counter_u64_zero(r->stalls);
- counter_u64_zero(r->restarts);
- counter_u64_zero(r->abdications);
-}
-
-int
-ifmp_ring_is_idle(struct ifmp_ring *r)
-{
- union ring_state s;
-
- s.state = r->state;
- if (s.flags == CLOSED)
- return (1);
- if (s.pidx_head == s.pidx_tail && s.pidx_tail == s.cidx &&
- s.flags == IDLE)
- return (1);
-
- return (0);
-}
-
-int
-ifmp_ring_is_stalled(struct ifmp_ring *r)
-{
- union ring_state s;
-
- s.state = r->state;
- if (s.pidx_head == s.pidx_tail && s.flags == STALLED)
- return (1);
-
- return (0);
-}
diff --git a/tools/build/test-includes/badfiles.inc b/tools/build/test-includes/badfiles.inc
--- a/tools/build/test-includes/badfiles.inc
+++ b/tools/build/test-includes/badfiles.inc
@@ -150,7 +150,6 @@
net/if_vlan_var.h \
net/iflib.h \
net/ifq.h \
- net/mp_ring.h \
net/mppc.h \
net/netisr.h \
net/netisr_internal.h \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 4, 8:33 PM (23 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42212733
Default Alt Text
D62395.1796416380.diff (57 KB)
Attached To
Mode
D62395: iflib: remove mp_ring
Attached
Detach File
Event Timeline