Just to avoid copy/paste */
| 6052 | |
| 6053 | /* Just to avoid copy/paste */ |
| 6054 | static inline int |
| 6055 | iflib_irq_set_affinity(if_ctx_t ctx, if_irq_t irq, iflib_intr_type_t type, |
| 6056 | int qid, struct grouptask *gtask, struct taskqgroup *tqg, void *uniq, |
| 6057 | const char *name) |
| 6058 | { |
| 6059 | device_t dev; |
| 6060 | int co, cpuid, err, tid; |
| 6061 | |
| 6062 | dev = ctx->ifc_dev; |
| 6063 | co = ctx->ifc_sysctl_core_offset; |
| 6064 | if (ctx->ifc_sysctl_separate_txrx && type == IFLIB_INTR_TX) |
| 6065 | co += ctx->ifc_softc_ctx.isc_nrxqsets; |
| 6066 | cpuid = find_nth(ctx, qid + co); |
| 6067 | tid = get_core_offset(ctx, type, qid); |
| 6068 | if (tid < 0) { |
| 6069 | device_printf(dev, "get_core_offset failed\n"); |
| 6070 | return (EOPNOTSUPP); |
| 6071 | } |
| 6072 | cpuid = find_close_core(cpuid, tid); |
| 6073 | err = taskqgroup_attach_cpu(tqg, gtask, uniq, cpuid, dev, irq->ii_res, |
| 6074 | name); |
| 6075 | if (err) { |
| 6076 | device_printf(dev, "taskqgroup_attach_cpu failed %d\n", err); |
| 6077 | return (err); |
| 6078 | } |
| 6079 | #ifdef notyet |
| 6080 | if (cpuid > ctx->ifc_cpuid_highest) |
| 6081 | ctx->ifc_cpuid_highest = cpuid; |
| 6082 | #endif |
| 6083 | return (0); |
| 6084 | } |
| 6085 | |
| 6086 | int |
| 6087 | iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, |
no test coverage detected