Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1152347lqd; Thu, 25 Apr 2024 07:25:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+h+DPuXGV+dIO3023RAn1wf81pRGpfqi5hSKiyXkvePEjRmAuC0+coqbYvCdVMmBvEmDzxw6mg0xjrC09ocxJ5pu79EE/RE0mgwa04Q== X-Google-Smtp-Source: AGHT+IF9D3/Mmloy5MatzWUj/vJCzZ+qD5slFds1DNLQwzHBGkvQgI3YUnjdxmEmFWOr9j2hCwn4 X-Received: by 2002:a17:90a:9e7:b0:2a0:718a:8e49 with SMTP id 94-20020a17090a09e700b002a0718a8e49mr5433044pjo.39.1714055143224; Thu, 25 Apr 2024 07:25:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714055143; cv=pass; d=google.com; s=arc-20160816; b=jrHmpZiOtFLQf9+a3LfHGGcLy+anNYnDe4NYJN8H4uPysdwVk2F+M+xOvGxirT5PJQ AmrZPHmZQImTj0uxD6wLpC6+W8eecToVKpI7D9JuMNPsD38N+AVkl5OnDLpoSEi0nEkv 9nCm4WaVfh6DhfbO0PAgKJkFBavV6TMvW0lrxNogsJp2oYK1nPUTiwRsAoRxZGO1kYGd h18VdMZZefe+7XR9gRpxUtnV5VS9h/EZDZu9vnJgOUWSWEfMucmjQlKLx38ezE0DIN1e 1ImEQyFmt4dFWdPcuCrvjhV62Ex4tLfZA4JvILro9fhk7YRe8P2gkon2k3/wu/awizjL ryXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Vh9MMkltQi2FaezzyNlR84OxmhjgaayN9uBNja5LyNc=; fh=wf5yFyPIl7sZLSrhBf0dOeddUyiU1rMlkYivNtp0HPs=; b=vj/3KTerQd4VnYbIzyEJPAenm8oXS2WlfUkAA0EVxB24oQjESsZ1K1eLen//f6+2S9 QB9IH22wIOTI0JM7a47aQVWoaz/XKb1afeztmV1/0RXeTgV80V6Q0vuFsHDmyR0cnjtn ei2BmpFKGqWzJp9PNmeoE8BQ85sWb52M0ErTf0qHvG5OCDAnpd05ynyVo1/+7k6RMuIH BfkXGZf8GnBuqxMePV9em00kLwV9ohzuGZBeDeSkojLISl49idtpwwpJKJCmcqJDsYkd D4t/Bawt5vo3wzMmCyv9d4Is3R60UrZpxJKFLM3IRkAqj7E19NINiDOPOuMLnoibxNEE ws4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=CWylmAt7; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-158646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mw11-20020a17090b4d0b00b002ab30c3b40dsi15623014pjb.134.2024.04.25.07.25.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 07:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=CWylmAt7; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-158646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 82812B273BB for ; Thu, 25 Apr 2024 14:01:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 415C6149C67; Thu, 25 Apr 2024 14:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="CWylmAt7" Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (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 75A4D149DF2 for ; Thu, 25 Apr 2024 14:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714053703; cv=none; b=Z6Y1LskFdAePxq1Qk/31FAqdld0y1R6dj3EVeZl+l6WMy4V7Mu1YFo32qeGBwPlCCCX6VfYCE9obp/J5oylSzatjP2aZN6+ADsgoMua7ioEkZWXklwM7ZDpuxGEHM99f5ViuGiBk+78pTPY2VRpHgluEmEgdueAtxz2eZe2s22k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714053703; c=relaxed/simple; bh=ulYE0VHNMZy9EO2UbfcdnnLqLAB4c7Fjw+n0PZCpRjA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dilUfyAumNoBUN322qljzDOH/+YAaR5Ssqbpzrzl5/ce7MliJPNbCwHS+GGEe229Su3kOsHy45NUellCkookgYuLuW4TnBuOKm/NdwiQUi2MFGh238Fl73MO1hdIArLOB9V5B0IDJdyEiLXaY24ChsDPezSKY3Y6WH0qfd7hsMw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=CWylmAt7; arc=none smtp.client-ip=185.125.188.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 82BB7411E1 for ; Thu, 25 Apr 2024 14:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714053698; bh=Vh9MMkltQi2FaezzyNlR84OxmhjgaayN9uBNja5LyNc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=CWylmAt7P6vxE//l4V0Ci8m/HrsttJBZ9hpCkyRiNK3ShN7QFIqhPZQHyX8KBmBHw ATVVEKMgGicekkW6Bqj2UJwSDheIT3O/zKdp06o8Azsd7WaZemSiNWJ/uOLlkUP13t g3b6TJq1M6C9+Zbb960Ud11/GtMT2K3xvrWyCMizqBR9bRp4/vDhsIPOFIfU6GTxCC fkXYDzJFcCHVjyRs/Vwn6of53TLbOl6kUC16uXtpjjoNtRSa07dTfcOQELIQrGhn74 Nj9GTcYvu+/U9W1zRsrNYu/Sms0tHkP/9oJEeMk5DTOFL2Ov1ko5GP6PnGISSSU2/k Ihk2KAH1SrEog== Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5705ef0b425so560285a12.1 for ; Thu, 25 Apr 2024 07:01:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714053698; x=1714658498; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Vh9MMkltQi2FaezzyNlR84OxmhjgaayN9uBNja5LyNc=; b=NHtrozP45PHtYafVtI2oY9nRi/BPa1zpH+pPdGY0AVu24Eu1Y0ZIKtRukcNZTH3780 ssuwU/FxixX0+V//P2hBdrvj1WZaR1vWWh3pVB3Pw0A2wMzmMmb/15bTQdknn8sNqbk0 ADCFYGT8q1kERuaZHEzUmgz8vWDTH8uxz0zYH4v1J+UOGDQMjVwQckJP0OUFbTe9rIir PgGqCayBws8mPNOxeZDZqhgMGhXEWIgtMsdPcEtxsHK3UrxHkx6JK1+SAEo1BDi3h/kQ cCwGcY1g7Rs7SMuQTXq7p7JVKhKnniaNgAWgOMqgHOgJO3Hc2YDICKbKUxI15QT9qB2e fLSw== X-Forwarded-Encrypted: i=1; AJvYcCUnUJFhEh2tqNKJcSo6YH1YJZBfxQ775LKWK5O421BqXOHGYz/QlSBiMjyWLOI/DGWOpUNFEVoGqcezJ8cSRvdveutGjb1KqGSTWUq1 X-Gm-Message-State: AOJu0Yw9aZBVCw/5YfdYKFtko0HQVwoCdMI/AB2qiYGn4XYvXVKSPE2y KnGahf+D+fI6lDs+ILfLAufYyPXna/XIzCmR+AqdQzjAo7tAFc0IDHoi5ZZn083b4IW8ArQGvZK d3gKy2eH4WMS94v+oLqFBw/dxoAgmZMq59jBzT60OPAA2CDoRybgNX9buGx1042cgVipBPoU2yJ HCzg== X-Received: by 2002:a17:906:4a10:b0:a58:9707:6857 with SMTP id w16-20020a1709064a1000b00a5897076857mr3086703eju.12.1714053697250; Thu, 25 Apr 2024 07:01:37 -0700 (PDT) X-Received: by 2002:a17:906:4a10:b0:a58:9707:6857 with SMTP id w16-20020a1709064a1000b00a5897076857mr3086667eju.12.1714053696684; Thu, 25 Apr 2024 07:01:36 -0700 (PDT) Received: from localhost (host-82-49-69-7.retail.telecomitalia.it. [82.49.69.7]) by smtp.gmail.com with ESMTPSA id u24-20020a1709060b1800b00a58767c1120sm3711046ejg.10.2024.04.25.07.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 07:01:35 -0700 (PDT) Date: Thu, 25 Apr 2024 16:01:33 +0200 From: Andrea Righi To: Jiri Olsa Cc: Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Shuah Khan , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] selftests/bpf: Add ring_buffer__consume_n test. Message-ID: References: <20240420155904.1450768-1-andrea.righi@canonical.com> 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-Disposition: inline In-Reply-To: On Thu, Apr 25, 2024 at 02:23:30PM +0200, Jiri Olsa wrote: > On Thu, Apr 25, 2024 at 08:19:04AM +0200, Andrea Righi wrote: > > On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote: > > ... > > > > static struct test_ringbuf_map_key_lskel *skel_map_key; > > > > +static struct test_ringbuf_n_lskel *skel_n; > > > > > > seems like there's no need for this to be static variable > > > > Can you elaborate more? I think we want these pointers to be static to > > limit the scope to this file, no? > > I meant to move it directly inside ringbuf_n_subtest function, > I don't see reason why it's defined outside of that function Oh I see! Yeah, that makes sense, I'll send a v3 soon. Thanks, -Andrea