Skip to content

Commit

Permalink
when deciding whether or not to call tqg attach_cpu reference rid dir…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
Matt Macy committed Oct 14, 2016
1 parent 106518e commit c9b47b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sys/net/iflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4336,6 +4336,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
void *q;

info = &ctx->ifc_filter_info;
tqrid = rid;

switch (type) {
/* XXX merge tx/rx for netmap? */
Expand All @@ -4344,23 +4345,20 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
info = &ctx->ifc_txqs[qid].ift_filter_info;
gtask = &ctx->ifc_txqs[qid].ift_task;
tqg = qgroup_if_io_tqg;
tqrid = irq->ii_rid;
fn = _task_fn_tx;
break;
case IFLIB_INTR_RX:
q = &ctx->ifc_rxqs[qid];
info = &ctx->ifc_rxqs[qid].ifr_filter_info;
gtask = &ctx->ifc_rxqs[qid].ifr_task;
tqg = qgroup_if_io_tqg;
tqrid = irq->ii_rid;
fn = _task_fn_rx;
break;
case IFLIB_INTR_ADMIN:
q = ctx;
info = &ctx->ifc_filter_info;
gtask = &ctx->ifc_admin_task;
tqg = qgroup_if_config_tqg;
tqrid = -1;
fn = _task_fn_admin;
break;
default:
Expand All @@ -4384,8 +4382,8 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
taskqgroup_attach_cpu(tqg, gtask, q, cpuid, irq->ii_rid, name);
} else {
taskqgroup_attach(tqg, gtask, q, tqrid, name);
DPRINTF("%s attached to gtask->gt_cpu=%d\n", __FUNCTION__, gtask->gt_cpu);
}
DPRINTF("%s attached to gtask->gt_cpu=%d\n", __FUNCTION__, gtask->gt_cpu);

return (0);
}
Expand Down

0 comments on commit c9b47b4

Please sign in to comment.