| 6029 | #endif |
| 6030 | |
| 6031 | static int |
| 6032 | get_core_offset(if_ctx_t ctx, iflib_intr_type_t type, int qid) |
| 6033 | { |
| 6034 | switch (type) { |
| 6035 | case IFLIB_INTR_TX: |
| 6036 | /* TX queues get cores which share at least an L2 cache with the corresponding RX queue */ |
| 6037 | /* XXX handle multiple RX threads per core and more than two core per L2 group */ |
| 6038 | return qid / CPU_COUNT(&ctx->ifc_cpus) + 1; |
| 6039 | case IFLIB_INTR_RX: |
| 6040 | case IFLIB_INTR_RXTX: |
| 6041 | /* RX queues get the specified core */ |
| 6042 | return qid / CPU_COUNT(&ctx->ifc_cpus); |
| 6043 | default: |
| 6044 | return -1; |
| 6045 | } |
| 6046 | } |
| 6047 | #else |
| 6048 | #define get_core_offset(ctx, type, qid) CPU_FIRST() |
| 6049 | #define find_close_core(cpuid, tid) CPU_FIRST() |
no outgoing calls
no test coverage detected