Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1790362ybn; Thu, 26 Sep 2019 02:12:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAdPUpcAYr933wH7z6Fp9sQ4R0yz1ZCTK7jjJ/g9w1WsXrDUVlluplDUxB1zlC/LITiexX X-Received: by 2002:a50:eb03:: with SMTP id y3mr2467398edp.194.1569489144630; Thu, 26 Sep 2019 02:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569489144; cv=none; d=google.com; s=arc-20160816; b=E+CGey+ENpWxWiIjoPCbQkXiV8awoZSarKl95wpKFeDlEk+AXdXAiyc/i8CxnMWCVo kMTR8VOMHutX1whB8xsRjxRR32TK9zLilnAyEYo5wgxS1y3aOKRi0vjODCEoIRtF54zs XKaQwqiBnX2x3KO+NqzZjGOvEK6F39IWrsUGEkvzDVWB8jBwsw8RrmRHXmInAIa37e7f XpwATlNorEW+gQ/Ev3LBhu5AqExvb5JLIG7AjItFVh3YWLYOMNoas3dtget682w5WkZc 8FCbVj7eOFv1vfNp0r+1cGbkjG8jfFSRhkushFk6hi50nLC4AJrfEBcOG5AE3msOQDPW 2VgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/mFiDvlA0gQPTLFA5iFdZWpQ11QWmMlmV+hTtrTnIIQ=; b=FRV1I2pS1iZZg4BR6NXKKstyy8cdITY/rNSdNFlkPT/J2dFaqEUt7vFPpIrZll6RwF 3fxfhXKOajTWGLnFlv+7YzuStWmRsKWnclhvrxq4VBSO+oYLLt1U3+gFGEK5le9Dt9c5 Cy8y4MfsgqPTtdcMuQoUZcMmxowUZxAVrGkpdnxlWNUphieZ7SICoSLONtmMxj2KVC8+ 1Vn0Y0IRD7Gov+a//mrMzbMHYxePCXPtbLf9WzY0itJgJCVhBHhfUQ4UWJ1SER3GPtkm wKE/5kTc2+eW21L23tTafIlHcEUmhlwmpkupvjyzII/5KcA8IjDhqqo2sK21rmRmbtB6 +YHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si876547eda.222.2019.09.26.02.12.01; Thu, 26 Sep 2019 02:12:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633879AbfIYEI2 (ORCPT + 99 others); Wed, 25 Sep 2019 00:08:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387842AbfIYEI1 (ORCPT ); Wed, 25 Sep 2019 00:08:27 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 178DA308A98C; Wed, 25 Sep 2019 04:08:27 +0000 (UTC) Received: from [10.72.12.148] (ovpn-12-148.pek2.redhat.com [10.72.12.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BE1F19C58; Wed, 25 Sep 2019 04:08:13 +0000 (UTC) Subject: Re: [PATCH net-next] tuntap: Fallback to automq on TUNSETSTEERINGEBPF prog negative return To: Matt Cover Cc: "Michael S. Tsirkin" , davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, Eric Dumazet , Stanislav Fomichev , Matthew Cover , mail@timurcelik.de, pabeni@redhat.com, Nicolas Dichtel , wangli39@baidu.com, lifei.shirley@bytedance.com, tglx@linutronix.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <20190920185843.4096-1-matthew.cover@stackpath.com> <20190922080326-mutt-send-email-mst@kernel.org> <20190922162546-mutt-send-email-mst@kernel.org> <7d3abb5d-c5a7-9fbd-f82e-88b4bf717a0b@redhat.com> From: Jason Wang Message-ID: <76a19f4a-90de-3904-28e2-653dfb6da495@redhat.com> Date: Wed, 25 Sep 2019 12:08:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 25 Sep 2019 04:08:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/24 上午12:31, Matt Cover wrote: >> I think it's better to safe to just drop the packet instead of trying to >> workaround it. >> > This patch aside, dropping the packet here > seems like the wrong choice. Loading a > prog at this hookpoint "configures" > steering. The action of configuring > steering should not result in dropped > packets. > > Suboptimal delivery is generally preferable > to no delivery. Leaving the behavior as-is > (i.e. relying on netdev_cap_txqueue()) or > making any return which doesn't fit in a > u16 simply use queue 0 would be highly > preferable to dropping the packet. > >> Thanks It leaves a choice for steering ebpf program to drop the packet that it can't classify. But consider we have already had socket filter, it probably not a big problem since we can drop packets there. Thanks