From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1DFDA42E9D; Mon, 17 Jul 2023 17:30:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A427040DFD; Mon, 17 Jul 2023 17:30:36 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id B9A3940A80 for ; Mon, 17 Jul 2023 17:30:35 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-666ecf9a081so4724169b3a.2 for ; Mon, 17 Jul 2023 08:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1689607835; x=1692199835; h=content-transfer-encoding:mime-version:message-id:subject:cc:to :from:date:from:to:cc:subject:date:message-id:reply-to; bh=VP7pTL2OE0IH/afQn6g8HZvGtQriE0CIK8lunae4fmM=; b=UxIU7LPs0XFLjGeMca2zD6bNtfIRmNU9sD9MLEQ6R+3mPgM6/5Wr8dDckD8K5aNKaE qrcfNzHdPNnTJPO3CdNFUgeWZ5qr6SFuKO6qirL9ftdMy+GP/eXQQBOgK8ODYz5VNBid 3obczdd8g2/Oq2yvnO2qx7Vqg3HsaCTwdEQy0K9wBQtL8+L1EYyPCekTHOEk/HOC7w/B 93u7DcNHnw5LPIcLV1Qx3A+bveOqusEau4SVXCk0Pjzz8tNC8homgL/l9g69pBWy2c74 NAc/L5rl1CVSwJBd5XKygLgDgYByuD8hQ0JggbKVOp2D3mO5jAcBooX9ZhrcapTy3U80 sVLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689607835; x=1692199835; h=content-transfer-encoding:mime-version:message-id:subject:cc:to :from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VP7pTL2OE0IH/afQn6g8HZvGtQriE0CIK8lunae4fmM=; b=JeqaOByf1F4tMDnumNLCRGktBIym1sKW50619N3yST4Z2tjYf3a5msFRmCiAUoxOpI pu8Kc6LhtzhfFIeOZ2teIARGW+4I7+1Mcg1w3lMSNFERhTSq+BwQg8uKWF08hg3yQbSt yXpcPOB6NZ/cDmC/Yu7/gVgKpqV4UDNAcwoRCtd8bQvdyhaHW+kPHUH5FVrqw7oDkK+l o7fQPFCHGcGbjkde7BncUgREIJ6NjxwXB37pOZ1WpQ9trQTK5FXii18m/DJNtMeRppq7 ObwXlnqMmYpuoUnQAh6L6mvvfpvSRSER9MmNzeN5rR3QeUwpo1/WUylQzZL+NfAy3P+f eXFA== X-Gm-Message-State: ABy/qLY+i5EpjDpylC1GoDCBO9z/dV9qn1lZQI/+NWHNO+p1sjWSu1Kp BdFcOq6dwoQ9DW8TH6KAyC2DUQ== X-Google-Smtp-Source: APBJJlG/FXgpLUJFLS04iLhq8UvBsCkxuBPFCHU/zHbw+I4gF1SYVXxPR5r/9XrGsb/SBUU9SouFGQ== X-Received: by 2002:a05:6a20:7da7:b0:133:f5c1:57c7 with SMTP id v39-20020a056a207da700b00133f5c157c7mr10680237pzj.50.1689607834885; Mon, 17 Jul 2023 08:30:34 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id i19-20020aa787d3000000b0063b7f3250e9sm12035281pfo.7.2023.07.17.08.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 08:30:34 -0700 (PDT) Date: Mon, 17 Jul 2023 08:30:32 -0700 From: Stephen Hemminger To: Bruce Richardson , olivier.matz@6wind.com, ophirmu@nvidia.com, shahafs@nvidia.com, thomas@monjalon.net Cc: dev@dpdk.org Subject: TAP device BPF build process broken Message-ID: <20230717083032.072b12c5@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The current way the BPF code is handled in the TAP driver is a mess. 1. The source is provided with partial instructions in the documentation. No script or automated build process. And it should get tested. 2. No longer builds without modification. The header file is missing. You have to manually go copy it out of iproute2 source. Commit ef5baf3486e0 (replace packed attributes, 2020-02-09) broke the build step. 3. The source is based on the old legacy model of tc-bpf. The newer libbpf based model used BTF and is not compatible. 4. The resulting object file needs to get transformed into an array by some awkward steps poorly described in the doc. Go take the source out of iproute2 modify and use that is what it says. 5. The algorithm used is incorrect for fragmented packets and uses slower version of Toeplitz. Is there a way to have a make style rule in meson? I.e if file A.c is newer that file A.o then use this clang invocation to make A.o. It should be possible to skip the transform to array in source by linking the ELF object file of the eBPF code into the tap driver and using dlopen introspection to find it. Alternatively, the tap driver could use libbpf as a loading mechanism.