[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKUeBu2N2qwCzqNFdapK8LLE-8tCLEzCQT8y4aqyMzFmQ@mail.gmail.com>
Date: Thu, 9 Feb 2017 05:31:23 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Tariq Toukan <ttoukan.linux@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...lanox.com>,
Martin KaFai Lau <kafai@...com>,
Willem de Bruijn <willemb@...gle.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Brenden Blanco <bblanco@...mgrid.com>,
Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH net-next 0/9] mlx4: order-0 allocations and page recycling
On Thu, Feb 9, 2017 at 4:00 AM, Tariq Toukan <ttoukan.linux@...il.com> wrote:
> Yes.
>
> 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.
Powered by blists - more mailing lists