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 807A443DF0; Wed, 3 Apr 2024 23:19:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 483CC40272; Wed, 3 Apr 2024 23:19:35 +0200 (CEST) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) by mails.dpdk.org (Postfix) with ESMTP id 43E5C40269 for ; Wed, 3 Apr 2024 23:19:33 +0200 (CEST) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-607c5679842so3089397b3.2 for ; Wed, 03 Apr 2024 14:19:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712179172; x=1712783972; 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=ElAnQjP+u8wf/Q7B4vIARLcmWpWkbgkk0858b7mlM9g=; b=Fi7Jkrzk2ZTS0kAVMptGGcajKlcyCja5cBDRCFp5cQdHcWpf4vUlUCncXceBmREHGn wMTKEIiAh2EZ5MQa3C6hGsYfMJ2uVc2Oe+ctygZrjzu7o1efNBG5iK2wGuOb2gaZzL5C mzb0ZJqAET4d/EiZgUMc9dj4DDvohiztJq4TAigvh4jaCby9F9FD7IvE+0SkF5phQRTc IiionFz3McmaltDDBKE6mFDGDgAgFsaZnydnqMO+9P3iFmw4JjdORI3cWxgLeVaa3OaT o31g68qkhGA2LqcHpKw3m9Qc3BlXJ18a2JXa6kUHmybwXyLnBYFFfNRI1ON6fNtE482W rM+Q== X-Gm-Message-State: AOJu0YypILcYrvmVB91p1UhehzpLDXOfmADPDCGlrSx16MBM8Vd5lfy7 Bfufax2Ffj9zrPr8cl2pLTDUFDRRU1i6ZWGaXI52sYSsFgUXsgFjySQhGx+pUv8= X-Google-Smtp-Source: AGHT+IHC6bJAu2ebXYsK/HkAtOq8Q24UxEi6jY2Kfooe0Sg/NRoPBCTMfusf3fOsDffh61ihTS2yiA== X-Received: by 2002:a81:910c:0:b0:60a:cd0:1a8e with SMTP id i12-20020a81910c000000b0060a0cd01a8emr708453ywg.3.1712179172426; Wed, 03 Apr 2024 14:19:32 -0700 (PDT) Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id k11-20020a81ff0b000000b00614f506874dsm1453988ywn.73.2024.04.03.14.19.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 14:19:32 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-61495e769bdso3590837b3.0 for ; Wed, 03 Apr 2024 14:19:31 -0700 (PDT) X-Received: by 2002:a0d:e291:0:b0:615:fb2:1e61 with SMTP id l139-20020a0de291000000b006150fb21e61mr731630ywe.4.1712179171685; Wed, 03 Apr 2024 14:19:31 -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> In-Reply-To: <20240403085523.706151b6@hermes.local> From: Luca Boccassi Date: Wed, 3 Apr 2024 22:19:20 +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 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