I ran into an issue where the mlx4 driver stops receiving packets when mbuf allocation fails in mlx4_rx_burst().
This issue appears to be caused because the code doesn't recycle the existing mbuf to the sges array when mbuf allocation fails as is done in the code right above it which handles the (wc.status != IBV_WC_SUCCESS) case. Copying the code from the above case before jumping to repost fixes the issue for me. Signed-off-by: Charles Myers <[email protected]> --- drivers/net/mlx4/mlx4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index aff9155..59d26fe 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -3169,6 +3169,9 @@ struct txq_mp2mr_mbuf_check_data { /* Increase out of memory counters. */ ++rxq->stats.rx_nombuf; ++rxq->priv->dev->data->rx_mbuf_alloc_failed; + + /* Add SGE to array for repost. */ + sges[i] = elt->sge; goto repost; } -- 1.7.9.5

