Skip to content

Commit

Permalink
Fix LDMS rail max_mgs
Browse files Browse the repository at this point in the history
rail->max_msg() shall return the maximum length of data the application
can send. Thus, it is underlying zap max_msg less the size of LDMS
message header.
  • Loading branch information
narategithub committed Sep 13, 2024
1 parent 67a1828 commit c11a809
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ldms/src/core/ldms_rail.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,8 @@ static int __rail_send(ldms_t _r, char *msg_buf, size_t msg_len)
static size_t __rail_msg_max(ldms_t _r)
{
ldms_rail_t r = (ldms_rail_t)_r;
return r->max_msg;
return r->max_msg - (sizeof(struct ldms_request_hdr) +
sizeof(struct ldms_send_cmd_param));
}

/* interposer */
Expand Down

0 comments on commit c11a809

Please sign in to comment.