From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CE4128DCC for ; Fri, 26 Jul 2024 16:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722013143; cv=none; b=mTGjTj88LJ0zNO5xk+ssgCQ5dRU1EOeIer20pye9WoblxUPhY0wDUHG0Hr4tsMHTZp3ln9jCOTGyqXl/LMz85baRQXQZkg83krTGjMpKLxULfuEBUu3ICmHJZN1w8sMVrCdRAeP/7LRPFYpYovzLr76eI7tP497PQC6kW5Duw1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722013143; c=relaxed/simple; bh=ckFjhxBtKaQbq8JRIVByyXVebct9aJJ1dpU0RfTlqWU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=YY5X2cD4FhFCI3Bk+m6PjUFlmxZpqVd+o1Lw7XPIgYh7l6J/c4X186llwKLzw0d3BFhCEw6dtiW5wT8YEOqEGpTJhwj1v882SjFz5zLWLt3G6FVhjVma4yNgQJkGUzHUgBnbDxa5WWkXOfPCsdUNt/CngXfB0rkmLP9W8Z5LbHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=V5i8zv2C; arc=none smtp.client-ip=95.215.58.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V5i8zv2C" Message-ID: <7ab6fbc6-2f05-4bb1-9596-855f276ab997@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1722013138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ckFjhxBtKaQbq8JRIVByyXVebct9aJJ1dpU0RfTlqWU=; b=V5i8zv2CmuZ0/rB9t2ZcP4FQ9J50yEUpNzXIcgWO7yUBqyk3+AnWvIIQW8yZJlLctzN7s4 Ku3Y5WepsoSoyfKNkvpwXl84AmhyPFWcdQt0dgPK3n1lXVdE8wDUoxI9Hwn+nrVbk/+FER 5KzXg79KMbWDD0KvMV2A3yvi2xbZTbs= Date: Fri, 26 Jul 2024 09:58:52 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: perf_event_output payload capture flags? Content-Language: en-GB To: Michael Agun , "bpf@vger.kernel.org" , "bpf@ietf.org" References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 7/25/24 6:42 PM, Michael Agun wrote: > Are the perf_event_output flags (and what the event blob looks like) documented? Especially for the program type specific perf_event_output functions. The documentation is in uapi/linux/bpf.h header. https://github.com/torvalds/linux/blob/master/include/uapi/linux/bpf.h#L2353-L2397  *         The *flags* are used to indicate the index in *map* for which  *         the value must be put, masked with **BPF_F_INDEX_MASK**.  *         Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU**  *         to indicate that the index of the current CPU core should be  *         used. > > I've seen notes in (cilium) code passing payload lengths in the flags, and am specifically interested in how the event blob is constructed for perf events with payload capture. Could you share more details about 'passing payload lengths in the flags'? AFAIK, networking bpf_perf_event_output() actually utilizes bpf_event_output_data(), in which 'flags' semantics has the same meaning as the above. > > > Thanks, > Michael From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ietf.org (mail.ietf.org [50.223.129.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E10475684 for ; Fri, 26 Jul 2024 17:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=50.223.129.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722013739; cv=none; b=f8TXQx8+FJsOt2JeINVaE4xrMVSJWudLsVEzWe8HaOEW55FTbuRv83VaG0wQfDlASvLjlOzoFOhieQozpKg1uHaK2bbfnQvKY3pW+EZ94tKK7FLp5sQ7rU7RznlmpGJQPCbU1jPCD2hnKL5q9ytiZvL1K5eJczbp1zqH3te/+Qk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722013739; c=relaxed/simple; bh=JbNHstT+c9PvRl1pzP8pisYqqfdk4lO4wWGLheXvy8Y=; h=Message-ID:Date:MIME-Version:To:References:From:In-Reply-To: Subject:Content-Type; b=Od6ZJA4Sz4vlJgMvaKyI3scnKEmXU/Rof3SIgtWsUHN7dy9NRCxI4/03Sx58WUXJrBjF4ehRH/hom311UyQt7UY4QPggUbwuYloASCG94Hlkm8tYijiM+BW4KlQXkZjK3eypCYDv2ejFboocOumgD9OvUzyRQd9QrmlDB3RI6nU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=ietf.org; dkim=pass (1024-bit key) header.d=ietf.org header.i=@ietf.org header.b=utHN6kLJ; dkim=pass (1024-bit key) header.d=ietf.org header.i=@ietf.org header.b=utHN6kLJ; dkim=fail (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=V5i8zv2C reason="signature verification failed"; arc=none smtp.client-ip=50.223.129.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ietf.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ietf.org header.i=@ietf.org header.b="utHN6kLJ"; dkim=pass (1024-bit key) header.d=ietf.org header.i=@ietf.org header.b="utHN6kLJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="V5i8zv2C" Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 3EFC6C14F749 for ; Fri, 26 Jul 2024 09:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1722013148; bh=JbNHstT+c9PvRl1pzP8pisYqqfdk4lO4wWGLheXvy8Y=; h=Date:To:References:From:In-Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe; b=utHN6kLJyCofcRAeZLJ4Pnd80yYh5jLsIETV/5/diTepULyjni+0JIhHFJV/X1n4h 3NR6oBcXxtq1lI72Cgyrxat87rkfB4Ub5cSi4h4kCix5eyJiCRtPLIxCJS1unNEP8J C9Cp/utURAG0/a44sErCsSTQjDnE3lERl4KeQ/T0= X-Mailbox-Line: From bpf-bounces+bpf=vger.kernel.org@ietf.org Fri Jul 26 09:59:08 2024 Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 13C57C14F699 for ; Fri, 26 Jul 2024 09:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1722013148; bh=JbNHstT+c9PvRl1pzP8pisYqqfdk4lO4wWGLheXvy8Y=; h=Date:To:References:From:In-Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe; b=utHN6kLJyCofcRAeZLJ4Pnd80yYh5jLsIETV/5/diTepULyjni+0JIhHFJV/X1n4h 3NR6oBcXxtq1lI72Cgyrxat87rkfB4Ub5cSi4h4kCix5eyJiCRtPLIxCJS1unNEP8J C9Cp/utURAG0/a44sErCsSTQjDnE3lERl4KeQ/T0= Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4A7E4C14F6BC for ; Fri, 26 Jul 2024 09:59:06 -0700 (PDT) X-Virus-Scanned: amavisd-new at amsl.com X-Spam-Flag: NO X-Spam-Score: -2.808 X-Spam-Level: Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NIAzy4fRk_h6 for ; Fri, 26 Jul 2024 09:59:01 -0700 (PDT) Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4FC76C14F699 for ; Fri, 26 Jul 2024 09:59:00 -0700 (PDT) Message-ID: <7ab6fbc6-2f05-4bb1-9596-855f276ab997@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1722013138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ckFjhxBtKaQbq8JRIVByyXVebct9aJJ1dpU0RfTlqWU=; b=V5i8zv2CmuZ0/rB9t2ZcP4FQ9J50yEUpNzXIcgWO7yUBqyk3+AnWvIIQW8yZJlLctzN7s4 Ku3Y5WepsoSoyfKNkvpwXl84AmhyPFWcdQt0dgPK3n1lXVdE8wDUoxI9Hwn+nrVbk/+FER 5KzXg79KMbWDD0KvMV2A3yvi2xbZTbs= Date: Fri, 26 Jul 2024 09:58:52 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Language: en-GB To: Michael Agun , "bpf@vger.kernel.org" , "bpf@ietf.org" References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: X-Migadu-Flow: FLOW_OUT Message-ID-Hash: TPCM4XDZZ6GGOVP3Z5E27L6B2B34CN6A X-Message-ID-Hash: TPCM4XDZZ6GGOVP3Z5E27L6B2B34CN6A X-MailFrom: yonghong.song@linux.dev X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9rc4 Precedence: list Subject: =?utf-8?q?=5BBpf=5D_Re=3A_perf=5Fevent=5Foutput_payload_capture_flags=3F?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: X-Mailman-Copy: yes Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Message-ID: <20240726165852.q9K44WUm5ZiqgCSJL-WJayOumV0goKTkWpBGGWJ4DPM@z> DQpPbiA3LzI1LzI0IDY6NDIgUE0sIE1pY2hhZWwgQWd1biB3cm90ZToNCj4gQXJlIHRoZSBwZXJm X2V2ZW50X291dHB1dCBmbGFncyAoYW5kIHdoYXQgdGhlIGV2ZW50IGJsb2IgbG9va3MgbGlrZSkg ZG9jdW1lbnRlZD8gRXNwZWNpYWxseSBmb3IgdGhlIHByb2dyYW0gdHlwZSBzcGVjaWZpYyBwZXJm X2V2ZW50X291dHB1dCBmdW5jdGlvbnMuDQoNClRoZSBkb2N1bWVudGF0aW9uIGlzI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