mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
xsk: Return error code if force_zc is set
If force_zc is set, we should exit out with an error, not fall back to
copy mode.
Fixes: 921b68692a
("xsk: Enable sharing of dma mappings")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/1607077277-41995-1-git-send-email-zhangchangzhong@huawei.com
This commit is contained in:
parent
3413f04141
commit
12c8a8ca11
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user