Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp253226pxu; Fri, 4 Dec 2020 02:23:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIHk0GtAcWfn7ZCk/QDhThuESdoIN2FgW/by/3c3ZXLN2KmCLMctM9VRsBZgTpDf3qXiBG X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr6753422edb.189.1607077421430; Fri, 04 Dec 2020 02:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607077421; cv=none; d=google.com; s=arc-20160816; b=tkQR3EyRhukuGTQrbekm+DuykUa7UTkSP60/2F6CO3W/WbM2Si+cjF2VfXCvnKcSr4 CKuuautk+RsnQIkc8cO7Pn6flsT0avJWyS7mvfnEVaUvuPF1UeiFMLgZdQbIdn+pj1Kx S2noazT6US19a842Y6WDUbR+D33hn+Vm/8e3F2PqfURwk+oXQLVm1vO0EJu38rA/WCOQ KO7Ct76WLPOQFHaAbfT/9bmG0uH7P/sRJIikEPUc6kb1CBPTYpXlTJVaYmG9WieQEZ5X fgQ3/ShvbbEpC/0L9cg8vcyR5wiDiGsy1HxWZ3IQDFLf7lXhvu0GyC91Wckqk6eFQcWr BXSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=8gzPr38vp88BUcfpTt0OPldXOb9MJWhHgcGYi4JelsY=; b=uUjbRCGEghrohX+/EbPtFE3XlMJioYxq3RwIfTQsMA+RsC7pO9+YNPhxqea3jHFnJm RZfTHBTwSAl0hoop/2SqKkg/qQPWyVZxQnCzfT+VexoyC9UauRFaAFcGC32HGLlJvIF9 TXDMKd/7o9ErNQcuM2uK0vqgpzaj01ncjYeSdhLXzMgIRB0+PXIkQvyga/bIJE6aYfBK DRnJHVhJCT92vzlgZk9kwSJrJy28Cl9LMe7rCygTrfFRxB9PttsSOG73hyfrKCFPDp7u cmud///FfV33APVtZFoxQTOpP5TcxbPnKb7ZUztVO3be8wnCN9+MU9GaUHrnwqqlH43s 9Kfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si1033179ejt.331.2020.12.04.02.23.18; Fri, 04 Dec 2020 02:23:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387473AbgLDKTz (ORCPT + 99 others); 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 >> > . >