From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 00BCA4384D;
	Sat,  6 Jan 2024 19:16:17 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 7A0F2402C7;
	Sat,  6 Jan 2024 19:16:17 +0100 (CET)
Received: from mail-il1-f176.google.com (mail-il1-f176.google.com
 [209.85.166.176])
 by mails.dpdk.org (Postfix) with ESMTP id 126734027C
 for <dev@dpdk.org>; Sat,  6 Jan 2024 19:16:15 +0100 (CET)
Received: by mail-il1-f176.google.com with SMTP id
 e9e14a558f8ab-35d82fb7e86so2386055ab.2
 for <dev@dpdk.org>; Sat, 06 Jan 2024 10:16:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1704564975;
 x=1705169775; 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=eGUumcs8HZDsrCP3GreQvhNxcQA++BlBOF5yuxG1GQ0=;
 b=MC4f1U4hF5KUIxOaMbU7kEHjHEjmHhRGLuUksCbJ+CyuRSZnIU+DRclYCtrtJ4Xi7v
 ZA++ap5+UQX2Hxu3UiW2xBUSW1OnRU88iKbJ6Npo4IGZIZVb2/prI9mcMXJx+fvbFd0J
 daigRY5KWBMB5OXjucUl0XI/8qVdhk5DrpkwJ7iEJouAe2T+Og1V44RoCdN96Hv/irpX
 RrKDiA3D0QbLdhhfpDXylC6G7cqeqaVG4pG2/gMh703EyMR/C4gTPFWnr67dA4MCYJQh
 k731rY3JXTil1/NzFycvva0TjdJAaXms6EXwU1a33O0R1MOLiHmS4pqfLiDReLObfEXc
 aw8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1704564975; x=1705169775;
 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=eGUumcs8HZDsrCP3GreQvhNxcQA++BlBOF5yuxG1GQ0=;
 b=VyaW8TStCoEK+OPw32PDZuR+3S0h/fbISS0cA8yWWcA9yR5I1x5jRm/PYBe86ttg5O
 smHXc/YElUiT5+7JXBdX7W3a9jKe56rzz3R5MwJcbcynczJLGhz8hjYKYW6zRWWvu2cI
 O+upfCvSzwlbGqQoMoFn9Zp7pzQ7mvgmC1+W9fw73R5JwTtytpu9Zp717nBgCNAXYDsu
 WfFODXPoLG6b+GgSp9uJHKWcmTqeQTDFarI7NzbxCrgUIzySWBgRCBVW1hXW7NpIBKFZ
 sPnfndlGsL/62va9Igbb3ZbFR7zub1xWBv7XSoLJTry9USMN5nGhu91DMRRCsgSTqRUw
 7naQ==
X-Gm-Message-State: AOJu0YytKTbS8F+8mpeS/JpwvHRibUYEsFmfVmRl52ePv2+WiwM7QpYT
 BozALzmSSfqYrs+/wlxVXFP5z70jFGtmVQ==
X-Google-Smtp-Source: AGHT+IGkmRNPd9bs27i3K8jYS6R5kfhgs/T61EWDLyj1SKCf+9pJNDJ23NTbB/M2GjGf6PrYo48DxA==
X-Received: by 2002:a05:6e02:15c5:b0:35f:ea7e:d341 with SMTP id
 q5-20020a056e0215c500b0035fea7ed341mr2069118ilu.57.1704564975060; 
 Sat, 06 Jan 2024 10:16:15 -0800 (PST)
Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])
 by smtp.gmail.com with ESMTPSA id
 n6-20020a170902e54600b001d495ec2cdfsm3340110plf.33.2024.01.06.10.16.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 06 Jan 2024 10:16:14 -0800 (PST)
Date: Sat, 6 Jan 2024 10:16:11 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Madhuker Mythri <madhuker.mythri@oracle.com>
Cc: "ferruh.yigit@amd.com" <ferruh.yigit@amd.com>, "dev@dpdk.org"
 <dev@dpdk.org>
Subject: Re: [External] : Re: [PATCH] net/tap: Modified TAP BPF program as
 per the new Kernel-version upgrade requirements.
Message-ID: <20240106101611.5efb89b0@hermes.local>
In-Reply-To: <SJ0PR10MB4798881DBFDE262426F7287397652@SJ0PR10MB4798.namprd10.prod.outlook.com>
References: <20240104172756.2213-1-madhuker.mythri@oracle.com>
 <20240105113055.54190838@hermes.local>
 <SJ0PR10MB47987058D8F21945B8E2F8E897652@SJ0PR10MB4798.namprd10.prod.outlook.com>
 <SJ0PR10MB4798881DBFDE262426F7287397652@SJ0PR10MB4798.namprd10.prod.outlook.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Sat, 6 Jan 2024 10:23:57 +0000
Madhuker Mythri <madhuker.mythri@oracle.com> wrote:

> Hi Stephen,
> 
> The new Kernel expects the BPF maps in BTF format: https://www.kernel.org/doc/html/v5.4/bpf/btf.html.
> So, we need to compile with "-g" option as follows:
> ==============================
> clang -O2 -target bpf -c tap_bpf_program.c  -g  -o  tap_bpf_program.o
> =============================
> 
> I had cross check this functionality with DPDK-22.11 and as the BPF C-program is same had modified just the C-program and submitted for review.
> I will update the Makefile changes also and will publish for code-review once again w.r.t DPDK-23.11.
> 
> Thanks,

Makefile needs something like this (from libbpf) to find clang includes.

And bpf extract program then needs to change as well.


# Get Clang's default includes on this system. We'll explicitly add these dirs
# to the includes list when compiling with `-target bpf` because otherwise some
# architecture-specific dirs will be "missing" on some architectures/distros -
# headers such as asm/types.h, asm/byteorder.h, asm/socket.h, asm/sockios.h,
# sys/cdefs.h etc. might be missing.
#
# Use '-idirafter': Don't interfere with include mechanics except where the
# build would have failed anyways.
CLANG_BPF_SYS_INCLUDES ?= $(shell $(CLANG) -v -E - </dev/null 2>&1 \
	| sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')