Skip to content

Commit

Permalink
Fix ST22P session creation socket ID (OpenVisualCloud#957)
Browse files Browse the repository at this point in the history
Fix ST22P create session functions ignoring
socket_id values, which causes the sessions to
allocate memory on socket 0 regardless of the
session NUMA range.

- Ensure socket_id is correctly handled during session creation.
- Prevent memory allocation on incorrect sockets.
  • Loading branch information
DawidWesierski4 authored Sep 9, 2024
1 parent bfbc7f5 commit c45c3d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/st2110/pipeline/st22_pipeline_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ st22p_rx_handle st22p_rx_create(mtl_handle mt, struct st22p_rx_ops* ops) {
}

ctx->idx = idx;
ctx->socket_id = socket;
ctx->ready = false;
ctx->ext_frame = (ops->flags & ST22P_RX_FLAG_EXT_FRAME) ? true : false;
ctx->codestream_fmt = codestream_fmt;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/st2110/pipeline/st22_pipeline_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ st22p_tx_handle st22p_tx_create(mtl_handle mt, struct st22p_tx_ops* ops) {
err("%s(%d), ctx malloc fail on socket %d\n", __func__, idx, socket);
return NULL;
}
ctx->socket_id = socket;

if (codestream_fmt == ops->input_fmt) {
ctx->derive = true;
Expand All @@ -831,6 +830,7 @@ st22p_tx_handle st22p_tx_create(mtl_handle mt, struct st22p_tx_ops* ops) {
}

ctx->idx = idx;
ctx->socket_id = socket;
ctx->codestream_fmt = codestream_fmt;
ctx->ready = false;
ctx->ext_frame = (ops->flags & ST22P_TX_FLAG_EXT_FRAME) ? true : false;
Expand Down

0 comments on commit c45c3d1

Please sign in to comment.