Skip to content

Commit

Permalink
POZ: increase size of output buffer for multiple ffdc
Browse files Browse the repository at this point in the history
For POZ SBE can queue n number of FFDC packets till the
maximum size is reached, modified to read upto 32KB of data.

Change-Id: I3a73a605119968645e87154e91bfff0d3c4842d5
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
  • Loading branch information
devenrao committed Apr 16, 2024
1 parent 547b3c5 commit 5bc25b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libsbefifo/operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "libsbefifo.h"
#include "sbefifo_private.h"

static const uint16_t SBEFIFO_MAX_FFDC_SIZE = 0x8000;

static int sbefifo_read(struct sbefifo_context *sctx, void *buf, size_t *buflen)
{
ssize_t n;
Expand Down Expand Up @@ -156,10 +158,10 @@ int sbefifo_operation(struct sbefifo_context *sctx,
return ENOTCONN;

/*
* Allocate extra memory for FFDC (SBEFIFO_MAX_FFDC_SIZE = 0x2000)
* Allocate extra memory for FFDC (SBEFIFO_MAX_FFDC_SIZE = 0x8000)32kb
* Use *out_len as a hint to expected reply length
*/
buflen = (*out_len + 0x2000 + 3) & ~(uint32_t)3;
buflen = (*out_len + SBEFIFO_MAX_FFDC_SIZE + 3) & ~(uint32_t)3;
buf = malloc(buflen);
if (!buf)
return ENOMEM;
Expand Down

0 comments on commit 5bc25b2

Please sign in to comment.