Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1651594rdb; Sat, 3 Feb 2024 16:34:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaUtbFNObmJToPLSieBYDaILCYzc5jA4avoK3z3jqj4c2Iln4gL7uhXEmHITAPUKjwTDu2 X-Received: by 2002:a81:71d6:0:b0:603:efd3:1ffc with SMTP id m205-20020a8171d6000000b00603efd31ffcmr6606241ywc.44.1707006841569; Sat, 03 Feb 2024 16:34:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707006841; cv=pass; d=google.com; s=arc-20160816; b=tDWVWY525MmWRFAktIlFgb6JaC3VQfrCFqrSCh2nKF+DrJ8/AqxqYtTNedCEwPTZUK v3huxjHb2zBC1kOL/6dPBgWPBbh0bDhI+stVOz4PYPhnVo06lKqysMo7h790zSTBnNYA 8Lm21F7IZyptx7cMVqCyn+JxSCL4AzEAzjT0yZUGMtZrkxd7p6zazPrQ4W9/A99rnVBo yB0+kEDC+4nCIPJt6qvO3CR5+1CRaPyAikWX7F4R5lXtd8+rSIIAlHU3WhbTJMYD2+7d jiDT7FJQBZ+cNXgaQNwdXslkq3q8omPZI6OC/qGxeDoEzW/Y4vd6qEegSr/5oJJtf4F1 d6YQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=6SOEWnW+ftiA5zQErkfZB/WikJ/VTAiNZA33bgoHpcU=; fh=9TvHEFqdievvxe04yjy4Y1FFfI93xFpbdPi1+DtMn2E=; b=XG6FrSu8M+7cP7gCPbqz2mv16+W+Ja4M5HC1rHLNU4iNZ/HnmXxdOyHpzKL4GmNJa4 vAmwj0tA9TysEbp9dNA3JKfgU3zXIRvQIKWBZyGXqlotEM7vZPRUFpDSLlj5wWSgbjPN 2gF5/eLABuU1XYqatwStKOKMsST5IiQp9fc7SpNnxXD2EWKLuiCdcK65PhDM/82L78rv tPU590kFZFZxmH+8h10GCQzNzlXZOm/l/FefZ5/a+joXUCFDrOS0TN8BmqwVEfCI8bFF Yp3FDR6+2/kdB8oppVPUWSGmzATDzl5hqnGW5dMzyo/34eGGSE8qeGxZws5c2fALW9kB 9ywg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-51331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51331-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUQ34Pr4N+V0d9Kp5tawUTG1hqDm3MJJI+EXxXAGLaxgSLpi4sS4ha84CFuVw0b2tn4ZmTKbpEQjvhtI0/WcBtQ94VR8A4PbaVo6/evXw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f17-20020a05620a409100b0078394c072d0si5944335qko.573.2024.02.03.16.34.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 16:34:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-51331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51331-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D9EE1C2158C for ; Sun, 4 Feb 2024 00:34:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75826EC3; Sun, 4 Feb 2024 00:33:54 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E5C5F629; Sun, 4 Feb 2024 00:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707006834; cv=none; b=h9WG+tw5l6cLXfN0RWHjs9PvOyitkq13YexmKBSFeRG8CD5YDKcluYTdLF/WCEJZNpx9EC0uyGduu2w2zq1SjYAoUoWHYvHgWhiA8e+kIkRKvztLTGZEzV8QTmW4+rpXQ2T6ZzBv2cXDNkRNW/DBQxyjTYW1PQNj6j8HvYBlOYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707006834; c=relaxed/simple; bh=NbRpMSxyKBKo0ONrZ8VpCh0Z4bIHDeO8UkFg9Z1W+lc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G61dLPo3P+Y7675YIHDNT6bQU+4GXqP0Ag2ha9zRhs/1fzs7hdMqHGyUJuL2kyIfzTG8Iro73zUFDf9uKktSEjN70GFw7HQiweOz1fIKtXnJ39Pn8JIn4nyDpEDjK0vnvwz4uxRJQ5VSQ4/XvmWsWBQZyXxjejtB5lm97newwYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBB74C433C7; Sun, 4 Feb 2024 00:33:52 +0000 (UTC) Date: Sat, 3 Feb 2024 19:33:51 -0500 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com Subject: Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20240203193351.76bbdda9@rorschach.local.home> In-Reply-To: <20240129142802.2145305-3-vdonnefort@google.com> References: <20240129142802.2145305-1-vdonnefort@google.com> <20240129142802.2145305-3-vdonnefort@google.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 29 Jan 2024 14:27:58 +0000 Vincent Donnefort wrote: > --- /dev/null > +++ b/include/uapi/linux/trace_mmap.h > @@ -0,0 +1,43 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +#ifndef _TRACE_MMAP_H_ > +#define _TRACE_MMAP_H_ > + > +#include > + > +/** > + * struct trace_buffer_meta - Ring-buffer Meta-page description > + * @meta_page_size: Size of this meta-page. > + * @meta_struct_len: Size of this structure. > + * @subbuf_size: Size of each subbuf, including the header. That is "the header"? > + * @nr_subbufs: Number of subbfs in the ring-buffer. > + * @reader.lost_events: Number of events lost at the time of the reader swap. > + * @reader.id: subbuf ID of the current reader. From 0 to @nr_subbufs - 1 > + * @reader.read: Number of bytes read on the reader subbuf. Note, flags needs a comment. > + * @entries: Number of entries in the ring-buffer. > + * @overrun: Number of entries lost in the ring-buffer. > + * @read: Number of entries that have been read. So does the two Reserved words, otherwise I'm going to start getting error reports about sparse warnings that check kerneldoc comments against their content. Every field needs to be represented in the kerneldoc comment. -- Steve > + */ > +struct trace_buffer_meta { > + __u32 meta_page_size; > + __u32 meta_struct_len; > + > + __u32 subbuf_size; > + __u32 nr_subbufs; > + > + struct { > + __u64 lost_events; > + __u32 id; > + __u32 read; > + } reader; > + > + __u64 flags; > + > + __u64 entries; > + __u64 overrun; > + __u64 read; > + > + __u64 Reserved1; > + __u64 Reserved2; > +}; > + > +#endif /* _TRACE_MMAP_H_ */