Thread (26 messages) flat view 26 messages, 4 authors, 2017-02-09

Re: [PATCH net-next 0/9] mlx4: order-0 allocations and page recycling

From: Eric Dumazet <edumazet@google.com>
Date: 2017-02-09 13:31:24

On Thu, Feb 9, 2017 at 4:00 AM, Tariq Toukan [off-list ref] wrote:
Yes.
quoted hunk ↗ jump to hunk
It can be fixed with this:
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 6854a19087ed..d97ee69393f0 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -94,8 +94,8 @@ static void mlx4_en_free_frag(const struct mlx4_en_priv
*priv,
                dma_unmap_page(priv->ddev, frag->dma,
                               PAGE_SIZE, priv->dma_dir);
                put_page(frag->page);
-               frag->page = NULL;
        }
+       memset(frag, 0, sizeof(*frag));
 }
Oh nice, and this is slow path (mlx4_en_free_frag() wont be called
anymore in fast path after my patches)

Thanks a lot Tariq for tracking this down.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help