Skip to content

Commit

Permalink
initialize allocated packets with LCII_POOLID_LOCAL
Browse files Browse the repository at this point in the history
  • Loading branch information
JiakunYan committed Jun 23, 2024
1 parent 687cf6e commit 7de6856
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion lci/runtime/memory_registration.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ LCI_error_t LCI_mbuffer_alloc(LCI_device_t device, LCI_mbuffer_t* mbuffer)
if (packet == NULL)
// no packet is available
return LCI_ERR_RETRY;
packet->context.poolid = LCII_POOLID_LOCAL;

mbuffer->address = packet->data.address;
mbuffer->length = LCI_MEDIUM_SIZE;
Expand Down
1 change: 1 addition & 0 deletions lci/runtime/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static inline LCII_packet_t* LCII_alloc_packet_nb(struct LCII_pool_t* pool)
LCII_packet_t* packet = LCII_pool_get_nb(pool);
if (packet != NULL) {
LCII_PCOUNTER_ADD(packet_get, 1);
packet->context.poolid = LCII_POOLID_LOCAL;
#ifdef LCI_DEBUG
LCI_DBG_Assert(packet->context.isInPool,
"This packet has already been allocated!\n");
Expand Down

0 comments on commit 7de6856

Please sign in to comment.