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 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 ; Sat, 6 Jan 2024 19:16:15 +0100 (CET) Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-35d82fb7e86so2386055ab.2 for ; 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 To: Madhuker Mythri Cc: "ferruh.yigit@amd.com" , "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: References: <20240104172756.2213-1-madhuker.mythri@oracle.com> <20240105113055.54190838@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 Sat, 6 Jan 2024 10:23:57 +0000 Madhuker Mythri 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 - &1 \ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')