MCPcopy Create free account
hub / github.com/F-Stack/f-stack / iflib_irq_set_affinity

Function iflib_irq_set_affinity

freebsd/net/iflib.c:6054–6084  ·  view source on GitHub ↗

Just to avoid copy/paste */

Source from the content-addressed store, hash-verified

6052
6053/* Just to avoid copy/paste */
6054static inline int
6055iflib_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
6086int
6087iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,

Callers 2

iflib_irq_alloc_genericFunction · 0.85

Calls 5

find_nthFunction · 0.85
get_core_offsetFunction · 0.85
device_printfFunction · 0.85
find_close_coreFunction · 0.85
taskqgroup_attach_cpuFunction · 0.85

Tested by

no test coverage detected