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 DD6D143DFB; Thu, 4 Apr 2024 18:11:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5132402E8; Thu, 4 Apr 2024 18:11:49 +0200 (CEST) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by mails.dpdk.org (Postfix) with ESMTP id A7EDE402BC for ; Thu, 4 Apr 2024 18:11:48 +0200 (CEST) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-617bea532f0so6620457b3.3 for ; Thu, 04 Apr 2024 09:11:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712247108; x=1712851908; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K/a24USOgoDPbKzbfIslSJtdtnEkcEvLY4kirEha5PM=; b=kGPFsdmJz6kuh3axiRnByaHs9kjZJRHNbY4RxHhivqqqUzMLgOmJCNXGvzX3ssRhvV lYXzrDltSDp4Dp7JdJWG66xebU1yKkKWCYDJY6CFekanJOu8k3UX15U31cLRoPthannx SA2W3oJpTfNfOPDbCarIGlqFXLLm4l+mJn1t523388XDtL1zJo6xHatZbBM6/oF1xY8C 1E7sxra9zMZAdI7PKf0XBeYK3AdG0STUrfDG/0gToCyICLV7uE132W1pD3ti8o/QetzU p6/h0jFry2ZdluBCpFSmH/Q2vJZ8YhoCBbhPvuETJDp4nOB62V3pF76xLe8MUDmGr+7X +K0A== X-Gm-Message-State: AOJu0Yz6HgdIegPyCBd50ybYhxnG2+pRWtd1UxYCdvh6hFRjJJqxclNi fm7Yes8npymOnuRIXDYLW/cs36sXJWaQzBodIb7a+KqSLNTnQdhWktR7J2/HJ4o= X-Google-Smtp-Source: AGHT+IE6Ht6Spg1tohsKHzNzovN95qGYReWAAtYxYCF7y2wUMc+6YMAX+y1VAspZiuHszfru85/OVA== X-Received: by 2002:a0d:ca02:0:b0:615:8174:61a2 with SMTP id m2-20020a0dca02000000b00615817461a2mr3015893ywd.8.1712247106387; Thu, 04 Apr 2024 09:11:46 -0700 (PDT) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id z17-20020a81ac51000000b00615081a4bc3sm1759942ywj.139.2024.04.04.09.11.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Apr 2024 09:11:46 -0700 (PDT) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-616909c32cdso8308097b3.0 for ; Thu, 04 Apr 2024 09:11:46 -0700 (PDT) X-Received: by 2002:a25:f50f:0:b0:dd9:2a67:f470 with SMTP id a15-20020a25f50f000000b00dd92a67f470mr2747338ybe.25.1712247105984; Thu, 04 Apr 2024 09:11:45 -0700 (PDT) MIME-Version: 1.0 References: <20240130034925.44869-1-stephen@networkplumber.org> <20240402171751.138324-1-stephen@networkplumber.org> <20240402171751.138324-8-stephen@networkplumber.org> <8794e9c209bc8b3888ef19452b1cfd3d3c48b9b3.camel@debian.org> <20240403085523.706151b6@hermes.local> <20240404083058.1fc6884d@hermes.local> In-Reply-To: <20240404083058.1fc6884d@hermes.local> From: Luca Boccassi Date: Thu, 4 Apr 2024 17:11:34 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 7/8] net/tap: use libbpf to load new BPF program To: Stephen Hemminger Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" 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 On Thu, 4 Apr 2024 at 16:31, Stephen Hemminger wrote: > > On Wed, 3 Apr 2024 22:19:20 +0100 > Luca Boccassi wrote: > > > On Wed, 3 Apr 2024 at 16:55, Stephen Hemminger > > wrote: > > > > > > On Wed, 03 Apr 2024 12:50:35 +0100 > > > Luca Boccassi wrote: > > > > > > > Using bpftool to generate the header at build time is a bit icky, > > > > because it will look at sysfs on the build system, which is from the > > > > running kernel. But a build system's kernel might be some ancient LTS, > > > > and even be a completely different kconfig/build/distro from the actual > > > > runtime one. > > > > > > One other option would be to ship a pre-built skeleton file. > > > Which is what the method the old code did. > > > But that creates an implied dependency on the developers machine build environment. > > > > That's what the distro-provided vmlinux.h should help with - by > > #include'ing that, it should be possible to build a co-re bpf program, > > no other artifacts needed. You can try it out locally by generating it > > from the local running kernel on your dev machine: > > > > bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h > > What about Ubuntu with borked installation of bpftool? Yeah that's a bit confusing, the way to do it is to install linux-tools-generic and then here's logic to find the right one: https://git.launchpad.net/ubuntu/+source/xdp-tools/tree/debian/rules#n34 But I wouldn't bother with it in upstream projects, let the integrators deal with it