Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F81969014
D12140.id32465.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D12140.id32465.diff
View Options
Index: sys/net/iflib.c
===================================================================
--- sys/net/iflib.c
+++ sys/net/iflib.c
@@ -2173,19 +2173,20 @@
CALLOUT_UNLOCK(txq);
iflib_netmap_txq_init(ctx, txq);
}
- for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) {
- MPASS(rxq->ifr_id == i);
- iflib_netmap_rxq_init(ctx, rxq);
- }
#ifdef INVARIANTS
i = if_getdrvflags(ifp);
#endif
IFDI_INIT(ctx);
MPASS(if_getdrvflags(ifp) == i);
+ if (!running && reset)
+ return;
for (i = 0, rxq = ctx->ifc_rxqs; i < sctx->isc_nrxqsets; i++, rxq++) {
/* XXX this should really be done on a per-queue basis */
- if (if_getcapenable(ifp) & IFCAP_NETMAP)
+ if (if_getcapenable(ifp) & IFCAP_NETMAP) {
+ MPASS(rxq->ifr_id == i);
+ iflib_netmap_rxq_init(ctx, rxq);
continue;
+ }
for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) {
if (iflib_fl_setup(fl)) {
device_printf(ctx->ifc_dev, "freelist setup failed - check cluster settings\n");
@@ -2474,14 +2475,6 @@
struct mbuf *m, *mh, *mt;
ifp = ctx->ifc_ifp;
-#ifdef DEV_NETMAP
- if (ifp->if_capenable & IFCAP_NETMAP) {
- u_int work = 0;
- if (netmap_rx_irq(ifp, rxq->ifr_id, &work))
- return (FALSE);
- }
-#endif
-
mh = mt = NULL;
MPASS(budget > 0);
rx_pkts = rx_bytes = 0;
@@ -3500,7 +3493,7 @@
#endif
if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))
return;
- if ((ifp->if_capenable & IFCAP_NETMAP)) {
+ if (if_getcapenable(ifp) & IFCAP_NETMAP) {
if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false))
netmap_tx_irq(ifp, txq->ift_id);
IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id);
@@ -3532,7 +3525,16 @@
DBG_COUNTER_INC(task_fn_rxs);
if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)))
return;
- if ((more = iflib_rxeof(rxq, 16 /* XXX */)) == false) {
+ more = true;
+#ifdef DEV_NETMAP
+ if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) {
+ u_int work = 0;
+ if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) {
+ more = false;
+ }
+ }
+#endif
+ if (more == false || (more = iflib_rxeof(rxq, 16 /* XXX */)) == false) {
if (ctx->ifc_flags & IFC_LEGACY)
IFDI_INTR_ENABLE(ctx);
else {
@@ -5106,7 +5108,7 @@
struct grouptask *gtask;
gtask = &ctx->ifc_admin_task;
- MPASS(gtask->gt_taskqueue != NULL);
+ MPASS(gtask != NULL && gtask->gt_taskqueue != NULL);
#endif
GROUPTASK_ENQUEUE(&ctx->ifc_admin_task);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 15, 1:43 AM (20 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9091324
Default Alt Text
D12140.id32465.diff (2 KB)
Attached To
Mode
D12140: fix iflib netmap rx
Attached
Detach File
Event Timeline
Log In to Comment