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 6514D43DF1; Thu, 4 Apr 2024 01:41:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28967402E2; Thu, 4 Apr 2024 01:41:47 +0200 (CEST) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by mails.dpdk.org (Postfix) with ESMTP id 3BFDB402D1 for ; Thu, 4 Apr 2024 01:41:46 +0200 (CEST) Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3bbbc6e51d0so184776b6e.3 for ; Wed, 03 Apr 2024 16:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712187705; x=1712792505; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=e7Q988IjK6nHtHc5CLEm/x3b8dbGGc/4wjHY6LhhS4s=; b=ojhD2EOPN4YPQsTxWtvrwveBs+mUMtOH4grgWL7BCDh2fzbtvV9FzXxfr4oPxF+XLa kffXMhMX6VW5tQf8AciB7LvAQmPDaQtee6GT5q6GTYx+12t1XFc17L1lmr+HCHmFX1bQ Iq1EfmQ8ozOJYIyHYKyn0nyOSSJwWnRMTOUQkRh2s7CQxs/GiXkrQ+Hwn1nTxauZ3yoN KVVrq2NGmPyJyCBQw0A29AmF7nDRnYDw/0e4ICXIXzDzyDKcpDinxOfgUfJqmrV6zcIB 3rLruab0Bvi5IbfRmHkl60ioohlnmQlNMlYswAZazbAye0TQfN3NPBtU6wHnrTRF6Rw0 xn5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712187705; x=1712792505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e7Q988IjK6nHtHc5CLEm/x3b8dbGGc/4wjHY6LhhS4s=; b=cwJ9KwNwKXbhZs6EuvEF4BpvRqBdeTDJ/tGcvNaTUlaL+APNgkxdPYqt2olrlPU4ol YuabOKvI0P7I8aG9+sAq7IWSyBJISo+w1gmEK4dwL294pHTg8LhyYw2bC77uDj66yNb/ 8CjaoE2+YKTxWwDJ36R5bLVJw9NeWJoZCZeshK42eXdFEu2gEMtmp2who8VbxRo8Q1x9 7ouPY+gZPIcqtJ6sQUB5xRGIfgxy0MGrYDtES441kRgAWUxKWyBT5BDOmyywmA0oYXxg 1Ifg3qgisq1+WVTQ9ck7dpBJzyWP/rZeadUg+Zs7u9At7N3gIQTe2Z983qTWjdCOod6w YMuA== X-Gm-Message-State: AOJu0YybVkGmA5h3fUmpNvya/qN10H1rYy+wzG/T4lxkqh8NDJEhUxQH a5By3z8ZBOMptLfTextB3YGqOwQbXmFv0AXpAMnjXVk81GVhyf8Dyyya1IqzBZdanqeKv2gxpt8 c9kY= X-Google-Smtp-Source: AGHT+IFH1uIwQsle+Skiq/c8KzeHbb2cnjveV8JEwAJ1YEnBW/Nao/ThIc4g56FrxIfgWHEHzoF3tQ== X-Received: by 2002:a05:6808:648f:b0:3c4:1520:e280 with SMTP id fh15-20020a056808648f00b003c41520e280mr1098079oib.9.1712187705434; Wed, 03 Apr 2024 16:41:45 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id kp5-20020a056a00464500b006ecc858b67fsm3804022pfb.175.2024.04.03.16.41.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 16:41:45 -0700 (PDT) Date: Wed, 3 Apr 2024 16:41:43 -0700 From: Stephen Hemminger To: Luca Boccassi Cc: dev@dpdk.org Subject: Re: [PATCH v5 7/8] net/tap: use libbpf to load new BPF program Message-ID: <20240403164143.0ddabc53@hermes.local> In-Reply-To: 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> 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 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 Not all distros are providing vmlinux.h. And some like Ubuntu haven't figured out how to package bpftool and libbpf correctly.