Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150025932
D25253.id73060.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
D25253.id73060.diff
View Options
Index: sys/net/iflib.c
===================================================================
--- sys/net/iflib.c
+++ sys/net/iflib.c
@@ -1229,7 +1229,9 @@
uint16_t txqid;
txqid = txq->ift_id;
- kring = NA(ctx->ifc_ifp)->tx_rings[txqid];
+ kring = netmap_kring_on(NA(ctx->ifc_ifp), txqid, NR_TX);
+ if (kring == NULL)
+ return;
if (kring->nr_hwcur != nm_next(kring->nr_hwtail, kring->nkr_num_slots - 1)) {
bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map,
@@ -2260,8 +2262,7 @@
txq->ift_cleaned_prev = txq->ift_cleaned;
}
#ifdef DEV_NETMAP
- if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP)
- iflib_netmap_timer_adjust(ctx, txq, &reset_on);
+ iflib_netmap_timer_adjust(ctx, txq, &reset_on);
#endif
/* handle any laggards */
if (txq->ift_db_pending)
@@ -3753,17 +3754,8 @@
if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))
return;
#ifdef DEV_NETMAP
- if (if_getcapenable(ifp) & IFCAP_NETMAP) {
- bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map,
- BUS_DMASYNC_POSTREAD);
- if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false))
- netmap_tx_irq(ifp, txq->ift_id);
- if (ctx->ifc_flags & IFC_LEGACY)
- IFDI_INTR_ENABLE(ctx);
- else
- IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id);
- return;
- }
+ if (netmap_tx_irq(ifp, txq->ift_id))
+ goto skip_ifmp;
#endif
#ifdef ALTQ
if (ALTQ_IS_ENABLED(&ifp->if_snd))
@@ -3778,6 +3770,9 @@
*/
if (abdicate)
ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
+#ifdef DEV_NETMAP
+skip_ifmp:
+#endif
if (ctx->ifc_flags & IFC_LEGACY)
IFDI_INTR_ENABLE(ctx);
else
@@ -3868,8 +3863,7 @@
for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) {
#ifdef DEV_NETMAP
reset_on = hz / 2;
- if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP)
- iflib_netmap_timer_adjust(ctx, txq, &reset_on);
+ iflib_netmap_timer_adjust(ctx, txq, &reset_on);
#endif
callout_reset_on(&txq->ift_timer, reset_on, iflib_timer, txq, txq->ift_timer.c_cpu);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 8:15 PM (3 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30552449
Default Alt Text
D25253.id73060.diff (1 KB)
Attached To
Mode
D25253: iflib: netmap: add per-tx-queue netmap support
Attached
Detach File
Event Timeline
Log In to Comment