Skip to content

Commit

Permalink
Fix an issue
Browse files Browse the repository at this point in the history
Required-githooks: true

Change-Id: I92f65924f9b4b3dce6a756e01e5bfc9e584af0b6
Signed-off-by: Jeff Olivier <[email protected]>
  • Loading branch information
jolivier23 committed May 8, 2024
1 parent 3807de4 commit 369e72b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/engine/ult.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,30 +326,27 @@ static inline uint32_t
sched_ult2xs_multisocket(int xs_type, int tgt_id)
{
static __thread uint32_t offload;
uint32_t socket;
uint32_t socket = tgt_id / dss_tgt_per_numa_nr;
uint32_t base;
uint32_t target;

if (dss_tgt_offload_xs_nr == 0) {
if (xs_type == DSS_XS_IOFW && dss_forward_neighbor) {
/* Keep the old forwarding behavior, but NUMA aware */
socket = tgt_id / dss_numa_nr;
target = (socket * dss_tgt_per_numa_nr) +
(tgt_id + offload) % dss_tgt_per_numa_nr;
offload = target + 17; /* Seed next selection */
target = DSS_MAIN_XS_ID(target);
goto check;
}
return DSS_XS_SELF;
}

socket = tgt_id / dss_numa_nr;
base = dss_sys_xs_nr + dss_tgt_nr + (socket * dss_offload_per_numa_nr);
target = base + ((offload + tgt_id) % dss_offload_per_numa_nr);
offload = target + 17; /* Seed next selection */

check:
D_ASSERT(target < DSS_XS_NR_TOTAL && target >= dss_sys_xs_nr);
offload = target + 17; /* Seed next selection */
return target;
}

Expand Down

0 comments on commit 369e72b

Please sign in to comment.