Message ID | 1607077277-41995-1-git-send-email-zhangchangzhong@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 12c8a8ca117f3d734babc3fba131fdaa329d2163 |
Delegated to: | BPF |
Headers | show |
Series | [net,v2] xsk: Return error code if force_zc is set | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Fri, Dec 4, 2020 at 11:18 AM Zhang Changzhong <zhangchangzhong@huawei.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@huawei.com> > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> > --- > net/xdp/xsk_buff_pool.c | 1 + > 1 file changed, 1 insertion(+) Thank you Changzhong! Acked-by: Magnus Karlsson <magnus.karlsson@intel.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 >
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Fri, 4 Dec 2020 18:21:16 +0800 you 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@huawei.com> > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> > > [...] Here is the summary with links: - [net,v2] xsk: Return error code if force_zc is set https://git.kernel.org/bpf/bpf/c/12c8a8ca117f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
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;
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@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> --- net/xdp/xsk_buff_pool.c | 1 + 1 file changed, 1 insertion(+)