{
/* allocate tx buffers */
err = memif_buffer_alloc (conn, qid, c->tx_bufs, c->rx_buf_num,
- &c->tx_buf_num, 2048);
+ &c->tx_buf_num, c->buffer_size);
/* suppress full ring error MEMIF_ERR_NOBUF_RING */
if (err != MEMIF_ERR_SUCCESS && err != MEMIF_ERR_NOBUF_RING)
{
/* Done processing packets */
/* refill the queue */
- err = memif_refill_queue (conn, qid, c->tx_buf_num, 0);
+ err = memif_refill_queue (conn, qid, c->tx_buf_num, c->headroom_size);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_refill_queue: %s", memif_strerror (err));
return 0;
error:
- err = memif_refill_queue (conn, qid, c->rx_buf_num, 0);
+ err = memif_refill_queue (conn, qid, c->rx_buf_num, c->headroom_size);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_refill_queue: %s", memif_strerror (err));
}
/* refill the queue */
- err = memif_refill_queue (conn, qid, tx, 0);
+ err = memif_refill_queue (conn, qid, tx, c->headroom_size);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_refill_queue: %s", memif_strerror (err));
return 0;
error:
- err = memif_refill_queue (conn, qid, c->rx_buf_num, 0);
+ err = memif_refill_queue (conn, qid, c->rx_buf_num, c->headroom_size);
if (err != MEMIF_ERR_SUCCESS)
{
INFO ("memif_refill_queue: %s", memif_strerror (err));
c->rx_buf_num = 0;
return -1;
-}
\ No newline at end of file
+}