Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17790757rwd; Tue, 27 Jun 2023 07:37:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6h+00X0k8GS/LxNnWqyI3JlVAWjLv7VVqz1Ceb+UaSrmqJxHgU5KfRC1SHO6PjT1UPIBHM X-Received: by 2002:a05:6a20:3d1a:b0:125:713e:2980 with SMTP id y26-20020a056a203d1a00b00125713e2980mr18095887pzi.48.1687876644241; Tue, 27 Jun 2023 07:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687876644; cv=none; d=google.com; s=arc-20160816; b=tANG/9Ky2XB8eA39Ba2mIQAmKnWJmtOlukY1CV5UJtcH6jPZbUmLv0zgPInCgptLZl GMlfHMrBJxVJqEpa1E9xUqQsm7PfQwlgb7GQgjAXfZch0pyuMVVtfshrYsvVFLKgG0c7 8A0ZLWBmKqlb6gkE7Hv2kDM6Mrp5qBbZvUKPULWnVCl647n1JUVFMmY9mWABcwLfUdc/ DfPTGs3HJmu2kryxoobUNJUxxwT3lga4CyhsJULvNznFPOP1lsE0UcyNNg5Gl2OHW0Kg qahchr+M+rRXJ6qnYCxn8m6oFb+nAvh9uPOoS/c8e2gVbigGK/Pm9iiMCX75MnCjIQW4 pUMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=vGSc4mdTDNNjtXngrQkAE2Vk0OODhwWQe551QFWP1tI=; fh=QifOR6ymImLaxPb/S0TqvsuyEPFoJPz1xXFlzyQozVs=; b=H2p8amKg47suztdrIdBzgeHnjAclzgq0yyZPe3cqjgnYdN5gwUDEItLFksjZgDefQ8 v1RFh1ivIG4fdySdqMP1MQ0sKbu3lGscvMNkZSUOa3VQotQgmEvYB142Fi/NUnD3mYnU BKM4R7iY2ZgutVusDqYPfznaVAYeZ9/kQ6JvCmb58LUxl1/yCB9FFEScZBgNdAfhjKhJ h89tg80XHp3exj+Ala/dGsoqw//zOhiP3RfwCABVlsK7kig6XNGmDds7B6SRoTx3xNNQ 3AtDZprKRH7r0ALtVh6Dx6bFua1gmhp00m+CaodLjupChBKeonDE2VtVNOs9dg/kQ6NT KgIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EVkoLytF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w70-20020a638249000000b0055acc7f8086si4976727pgd.821.2023.06.27.07.37.12; Tue, 27 Jun 2023 07:37:24 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EVkoLytF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231485AbjF0O00 (ORCPT + 99 others); Tue, 27 Jun 2023 10:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbjF0O0V (ORCPT ); Tue, 27 Jun 2023 10:26:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0712726 for ; Tue, 27 Jun 2023 07:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687875930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vGSc4mdTDNNjtXngrQkAE2Vk0OODhwWQe551QFWP1tI=; b=EVkoLytFYy0mqJNyHjPP134Jtenk6/4ws5mh3ON6tJw/nBSuZt6fnH1TyBjT9V2MwyY0xx v/PKnG2HbClxx6YTmZ4MndPBl1cnqemCzCVS/xl8/T1CfXaBJfauywm7XoiBlUa5z8ao7O KAgJV73IAtI0EKTdVgDkwYMnSc17i4M= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-132-QHwrs4MWNLqzQbNk9xZKBw-1; Tue, 27 Jun 2023 10:25:19 -0400 X-MC-Unique: QHwrs4MWNLqzQbNk9xZKBw-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a348facbbso273769766b.1 for ; Tue, 27 Jun 2023 07:25:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687875915; x=1690467915; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vGSc4mdTDNNjtXngrQkAE2Vk0OODhwWQe551QFWP1tI=; b=Wpa1gO1FJ69uOBwAYUeflVtO33ypMlO4L6YYAfJU2hC71QHDa33BaGf6tihtWkJJ2j NkBs+s3fcbfazvIOfidkKEuQ4wW3eXiXHXVWKPg3cG9Rh//F2PhgyIQo1/IDX/tF0/ek pQOH8QoOEfVQNUjsLMV0PeuwsjaBaU1PznpQMRughKSjOSZpqJ6DnG6ocBCl9rbkrIUZ C50WdTyz+G5+SWfZ7mRoXO9nrKiz/k148J789oRM5srgsJSyaSMEjM0YRO5uWZBPMJjA NpSmzUJgkm9G+RdoTkSrkdMNpgWSZLgcKyyzBm9EkHgS5oAS8l5XjkOnTnuyXw+m8AjC 7E3w== X-Gm-Message-State: AC+VfDwJdfVS5wpFMPb4V822eHzH2dzA6r+Vh52PAUL9x6UfdV4x33sV hhYL4+hLx48qPmeBEyWRz+eSQqAZf5Adt3zDjz9epHWrLd/95JioizRB4M7cGCNEWQBuk64cEcv MuM+7C+FZOwz4ETvt6p2jmbcF X-Received: by 2002:a17:906:da8b:b0:982:26c5:6525 with SMTP id xh11-20020a170906da8b00b0098226c56525mr32188641ejb.60.1687875914703; Tue, 27 Jun 2023 07:25:14 -0700 (PDT) X-Received: by 2002:a17:906:da8b:b0:982:26c5:6525 with SMTP id xh11-20020a170906da8b00b0098226c56525mr32188620ejb.60.1687875914199; Tue, 27 Jun 2023 07:25:14 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id qn1-20020a170907210100b0098e42bef731sm3234766ejb.169.2023.06.27.07.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 07:25:13 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 2921ABBFF6C; Tue, 27 Jun 2023 16:25:13 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Daniel Xu , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, fw@strlen.de, daniel@iogearbox.net Cc: dsahern@kernel.org Subject: Re: [PATCH bpf-next 0/7] Support defragmenting IPv(4|6) packets in BPF In-Reply-To: References: X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 27 Jun 2023 16:25:13 +0200 Message-ID: <874jmthtiu.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 > The basic idea is we bump a refcnt on the netfilter defrag module and > then run the bpf prog after the defrag module runs. This allows bpf > progs to transparently see full, reassembled packets. The nice thing > about this is that progs don't have to carry around logic to detect > fragments. One high-level comment after glancing through the series: Instead of allocating a flag specifically for the defrag module, why not support loading (and holding) arbitrary netfilter modules in the UAPI? If we need to allocate a new flag every time someone wants to use a netfilter module along with BPF we'll run out of flags pretty quickly :) -Toke