Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2460565rwl; Fri, 6 Jan 2023 06:47:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXsM5vD6twc728Wx/QALsydPXarQPRRwtQvnDTy3pxkjvOUL0I5qZbBPG0Jb+WoyGpQIYFq5 X-Received: by 2002:aa7:cf05:0:b0:48e:a96d:38e with SMTP id a5-20020aa7cf05000000b0048ea96d038emr13795057edy.41.1673016450309; Fri, 06 Jan 2023 06:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673016450; cv=none; d=google.com; s=arc-20160816; b=V1kepK8xKBnPyUrglgA50Rp81nkB6TepfLA489jffHMrh/vEVGmPg/IJTx2KJ4FJQu 3XTFR0rEXkpBsrhabJ6FsvxVEI5QLFtWuvCbw0VvTCbT+UNo8dRNND6RjkYDzqIaywyq uELBXAcZORifm65wbsbTiUyExc3dGpRmjEBeJV8FHfM5ioWbhFRXGUTpN2mApCut3ETV SWrBRavxADoToCgPq/yuemVIswuyvins2zFqsQL2PwQDhJ9TBnk7ZCYYpgvFiowH8T2v jhBqmY9YElqcADgIgTLNs+2cLRszMBYgm/m08b438wF3G+++0VJLsvs8bK8iqpuSMOYv J0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=Eg1y5dbpzwfCtwlwX1btgRfPn/IkfSux1Z66HOw6FuE=; b=Hu3eptrfab9k4MkGGkh+6R/FHJE8jRpBGLXcPndBWRrLvvga10wP7rJ/UtNPlsIO3w Okmizv+J3uFUUp+UY2ct5Grm1M3n40vK6H5ncSII414DDeySpNPAZsCuP7mtn3y0hVZi pc4H1y2pzNT47v3Y1I7HPWrwgsvCkYy/25XBVU82IpmTjlBj4uTlxBxN4CtO1FHsaxQU 9eMQlEgySxQMuxHwVJONIapC515vr7rCneFodZc16oolODnw/Y6h2afUotxJ7rXUbpp2 ClOGuZxvz0NrNUIfGZEXw4wSFir3uO9XPKg2/4vGzSmyR0AjP3u7iE7YEA0F9Pb7ld3F bX8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a056402051000b00494239f76f0si1547166edv.558.2023.01.06.06.47.16; Fri, 06 Jan 2023 06:47:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232680AbjAFOVX (ORCPT + 54 others); Fri, 6 Jan 2023 09:21:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbjAFOVU (ORCPT ); Fri, 6 Jan 2023 09:21:20 -0500 Received: from 3.mo619.mail-out.ovh.net (3.mo619.mail-out.ovh.net [46.105.36.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CED497A90F for ; Fri, 6 Jan 2023 06:21:16 -0800 (PST) Received: from ex4.mail.ovh.net (unknown [10.108.4.137]) by mo619.mail-out.ovh.net (Postfix) with ESMTPS id E39B22288D; Fri, 6 Jan 2023 14:15:14 +0000 (UTC) Received: from [192.168.1.125] (37.65.8.229) by DAG10EX1.indiv4.local (172.16.2.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 6 Jan 2023 15:15:12 +0100 Message-ID: Date: Fri, 6 Jan 2023 15:15:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH bpf-next v3 00/16] bpfilter To: Alexei Starovoitov CC: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mykola Lysenko , Shuah Khan , Dmitrii Banshchikov , , , , , Kernel Team , References: <20221224000402.476079-1-qde@naccy.de> <20221227182242.ozkc6u2lbwneoi4r@macbook-pro-6.dhcp.thefacebook.com> Content-Language: fr From: Quentin Deslandes In-Reply-To: <20221227182242.ozkc6u2lbwneoi4r@macbook-pro-6.dhcp.thefacebook.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.65.8.229] X-ClientProxiedBy: CAS11.indiv4.local (172.16.1.11) To DAG10EX1.indiv4.local (172.16.2.91) X-Ovh-Tracer-Id: 3239214032702926553 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -85 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrkedtgdeivdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepkfffgggfuffvvehfhfgjtgfgihesthekredttdefjeenucfhrhhomhepsfhuvghnthhinhcuffgvshhlrghnuggvshcuoehquggvsehnrggttgihrdguvgeqnecuggftrfgrthhtvghrnhephfeuieffudeutdfgkeelffehtefhueeuudegteeghfetgfeutdejhfefhfdtgedtnecuffhomhgrihhnpegsrhgvrghkphhoihhnthdrtggtnecukfhppeduvdejrddtrddtrddupdefjedrieehrdekrddvvdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoqhguvgesnhgrtggthidruggvqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegrlhgvgigvihdrshhtrghrohhvohhithhovhesghhmrghilhdrtghomhdpnhgvthguvghvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhlihhnuhigqdhkshgvlhhfthgvshhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdgsphhfsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdpmhgvsehusghiqhhuvgdrshhpsgdrrh hupdhshhhurghhsehkvghrnhgvlhdrohhrghdpmhihkhholhgrlhesfhgsrdgtohhmpdhprggsvghnihesrhgvughhrghtrdgtohhmpdhkuhgsrgeskhgvrhhnvghlrdhorhhgpdgvughumhgriigvthesghhoohhglhgvrdgtohhmpdhkvghrnhgvlhdqthgvrghmsehmvghtrgdrtghomhdpuggrvhgvmhesuggrvhgvmhhlohhfthdrnhgvthdphhgrohhluhhosehgohhoghhlvgdrtghomhdpshgufhesghhoohhglhgvrdgtohhmpdhkphhsihhnghhhsehkvghrnhgvlhdrohhrghdpjhhohhhnrdhfrghsthgrsggvnhgusehgmhgrihhlrdgtohhmpdihhhhssehfsgdrtghomhdpshhonhhgsehkvghrnhgvlhdrohhrghdpmhgrrhhtihhnrdhlrghusehlihhnuhigrdguvghvpdgrnhgurhhiiheskhgvrhhnvghlrdhorhhgpdgurghnihgvlhesihhoghgvrghrsghogidrnhgvthdprghstheskhgvrhhnvghlrdhorhhgpdhjohhlshgrsehkvghrnhgvlhdrohhrghdpfhifsehsthhrlhgvnhdruggvpdfovfetjfhoshhtpehmoheiudelpdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 27/12/2022 à 19:22, Alexei Starovoitov a écrit : > On Sat, Dec 24, 2022 at 01:03:46AM +0100, Quentin Deslandes wrote: >> >> Due to poor hardware availability on my side, I've not been able to >> benchmark those changes. I plan to get some numbers for the next iteration. > > Yeah. Performance numbers would be my main question :) Hardware is on the way! :) >> FORWARD filter chain is now supported, however, it's attached to >> TC INGRESS along with INPUT filter chain. This is due to XDP not supporting >> multiple programs to be attached. I could generate a single program >> out of both INPUT and FORWARD chains, but that would prevent another >> BPF program to be attached to the interface anyway. If a solution >> exists to attach both those programs to XDP while allowing for other >> programs to be attached, it requires more investigation. In the meantime, >> INPUT and FORWARD filtering is supported using TC. > > I think we can ignore XDP chaining for now assuming that Daniel's bpf_link-tc work > will be applicable to XDP as well, so we'll have a simple chaining > for XDP eventually. > > As far as attaching to TC... I think it would be great to combine bpfilter > codegen and attach to Florian's bpf hooks exactly at netfilter. > See > https://git.breakpoint.cc/cgit/fw/nf-next.git/commit/?h=nf_hook_jit_bpf_29&id=0c1ec06503cb8a142d3ad9f760b72d94ea0091fa > With nf_hook_ingress() calling either into classic iptable or into bpf_prog_run_nf > which is either generated by Florian's optimizer of nf chains or into > bpfilter generated code would be ideal. That sounds interesting. If my understanding is correct, Florian's work doesn't yet allow for userspace-generated programs to be attached, which will be required for bpfilter.