From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4723FC433FE for ; Fri, 4 Dec 2020 10:20:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9CDF2251D for ; Fri, 4 Dec 2020 10:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387601AbgLDKTz (ORCPT ); Fri, 4 Dec 2020 05:19:55 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9014 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729514AbgLDKTy (ORCPT ); Fri, 4 Dec 2020 05:19:54 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CnTFD1s3hzhk8n; Fri, 4 Dec 2020 18:18:40 +0800 (CST) Received: from [10.174.177.230] (10.174.177.230) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Fri, 4 Dec 2020 18:19:03 +0800 Subject: Re: [PATCH net] xsk: Fix error return code in __xp_assign_dev() To: Magnus Karlsson CC: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Network Development , bpf , open list References: <1607071819-34127-1-git-send-email-zhangchangzhong@huawei.com> From: Zhang Changzhong Message-ID: Date: Fri, 4 Dec 2020 18:18:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.230] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Good catch! My intention here by not setting err is that it should > fall back to copy mode, which it does. The problem is that the > force_zc flag is disregarded when err is not set (see exit code below) > and your patch fixes that. If force_zc is set, we should exit out with > an error, not fall back. Could you please write about this in your > cover letter and send a v2? > Thanks for the suggestion, I have sent the v2 patch, please take another look. > BTW, what is the "Hulk Robot" that is in your Reported-by tag? It's an auto tester, here is some information: https://lwn.net/Articles/804119/ > > Thank you: Magnus > > err_unreg_xsk: > xp_disable_drv_zc(pool); > err_unreg_pool: > if (!force_zc) > err = 0; /* fallback to copy mode */ > if (err) > xsk_clear_pool_at_qid(netdev, queue_id); > return err; > >> goto err_unreg_xsk; >> } >> pool->umem->zc = true; >> -- >> 2.9.5 >> > . >