[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ8uoz19OhNMTZTyUrZoaSdUMuZk90HES_Z0i9UJ2Dis9HJvUw@mail.gmail.com>
Date: Fri, 4 Dec 2020 11:37:53 +0100
From: Magnus Karlsson <magnus.karlsson@...il.com>
To: Zhang Changzhong <zhangchangzhong@...wei.com>
Cc: Björn Töpel <bjorn.topel@...el.com>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v2] xsk: Return error code if force_zc is set
On Fri, Dec 4, 2020 at 11:18 AM Zhang Changzhong
<zhangchangzhong@...wei.com> wrote:
>
> If force_zc is set, we should exit out with an error, not fall back to
> copy mode.
>
> Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
> ---
> net/xdp/xsk_buff_pool.c | 1 +
> 1 file changed, 1 insertion(+)
Thank you Changzhong!
Acked-by: Magnus Karlsson <magnus.karlsson@...el.com>
> diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
> index 9287edd..d5adeee 100644
> --- a/net/xdp/xsk_buff_pool.c
> +++ b/net/xdp/xsk_buff_pool.c
> @@ -175,6 +175,7 @@ static int __xp_assign_dev(struct xsk_buff_pool *pool,
>
> if (!pool->dma_pages) {
> WARN(1, "Driver did not DMA map zero-copy buffers");
> + err = -EINVAL;
> goto err_unreg_xsk;
> }
> pool->umem->zc = true;
> --
> 2.9.5
>
Powered by blists - more mailing lists