Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4692918rwe; Mon, 17 Apr 2023 17:25:52 -0700 (PDT) X-Google-Smtp-Source: AKy350Zdk63S1HvEdSk/A1Cmez7C+oV7NRKejahHZPKVbEK14aQaCUpoUpP2CQ1LWWS3LcBLRc/p X-Received: by 2002:a05:6a20:6a1d:b0:f0:9cbd:78ca with SMTP id p29-20020a056a206a1d00b000f09cbd78camr629261pzk.11.1681777552213; Mon, 17 Apr 2023 17:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681777552; cv=none; d=google.com; s=arc-20160816; b=tdK+iNCwkvzrndesPfticqAIe2qVjT/FM00rN4Im1wiQR37/PyUTCRbsE/Ww+6n3XW MuC1QjUlv9dHCZ35jq9UUA9Eg/H12ZNnAvK9YyadGk2LrOLEtG/Gh5AJ94A8YpS/2qyx kdN5IJb1J6ji+TOVduuq0UAzR9V+JydZU0FjzynY+tkyKejnbX9QqD6oQfFTJgLh6kJE GW6jw3fvygzbPxC/gld/tbDf6tywXiL1/nx0CSg6Pz/wAEHvZ0WYsIK018lzRXA9pRk2 XfPjNaHPmUkpdJNH00twDVHDLBvDW7MEnAxIwrVPGStAD1bqDigFtuoJQUzwT4OQQSZL zXxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hYmxN4UjuYj06SpL1wUV2ZlF7dJmbG+ouluZz1JaIPk=; b=MZGXtvVljsAB1x53pbRzTv60mPpkzsFPj69aOtcpL9UnwPkLVd2sGxCGigtCLpaKtp ASkJtxmk7mMvfqlaKlrj6lyaJ9O0238/h2INB6UK0DQFmHsP5toufmmNGg/mAqAHYdny pRxX3e+HsBPD/XN0kYv7uQGfSuumqxRIEioeFgWPqxCSrvuiVRMzPMasTAFhcM1usyvr Ql3X0wLpTg17nwIWGPMmO6tnKN4Wq1W8T+A2+v7ORIBz8g17hC36OivwLCNaW4pZArqi yWpElGCV+fSR//BCzV/xWUY4O7qtGjWY8mRMqK+5BVXWd+rlYbfGHUuARi0DwxJN9nYa jzyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=W6+Rs64v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r15-20020a63fc4f000000b005181ce2302csi12785589pgk.749.2023.04.17.17.25.38; Mon, 17 Apr 2023 17:25:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=W6+Rs64v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbjDRAIl (ORCPT + 99 others); Mon, 17 Apr 2023 20:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjDRAIj (ORCPT ); Mon, 17 Apr 2023 20:08:39 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F09A49DD; Mon, 17 Apr 2023 17:08:38 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1a677dffb37so11659735ad.2; Mon, 17 Apr 2023 17:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681776518; x=1684368518; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hYmxN4UjuYj06SpL1wUV2ZlF7dJmbG+ouluZz1JaIPk=; b=W6+Rs64v91YHB9S0YRvmXeDlPruSoE4mMoN+KXTP79AGcnJIY5/lm6DIz/0ynnE8uw HwLLiLsznh8rEOkCDlXcLQyWJOD55ZslovGGmaaryfjiZvLg3kFoMrr3oV7RWFIQC0Jv 9wIjsxTfWPNESjcZScdcaUThqGkH3Z+ePap7JzGOpxVXufQn5bq6gjrhetjh+VWcMDPU tNMScdk4DKmMx1+xzXpanIpCkQr7KVQE8scB2cOc0OiIdg7RSnY2NBmpct8NrGl+BMJO UhlvZ3SnlLogL6q85Aoq/NGRNxjh63jje3NHNdZL7EvBu3bTWx13ySYCrzZT2HQ+BPPt 6gPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681776518; x=1684368518; 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=hYmxN4UjuYj06SpL1wUV2ZlF7dJmbG+ouluZz1JaIPk=; b=AUNA0NZ1W0Z7YNX6TKBRlq+5uqqnNVjHXV0wbG9+AwT3TvQUyKCDl/XdW3loMlEbde 65EnWVG/2eZ3WNIA3QS6mDhDZ+9iSCYLcLm0ubycQ6qVXOjU2X84snLzzpszpsR6fZy2 +bPN0HhGjooA6tvUS+0E39OkS6BlLKroKs/GX3ZdXYdNQAOUY33IDJIoKidwcbXm3zNy R0Sam3IdUMlqTbTe5dpq4/FYe4M8SXbJ0jN2cPkviYxnL9v0RNTuLWh9xaIBNIi6228b MBI0np1LgruJENDBQs7TZUY1j9wgT8hMBA1K0VBZpDXRZ9dHDG/5YMDCTzbtkaQsEZ6Q 6RdA== X-Gm-Message-State: AAQBX9fJox//gtkPXITnTSJkLF/OmWOnepoGkTusNaziIfvl6mpl4rb4 KlEqIyL7PWqvEH5NGXDPmIA= X-Received: by 2002:a17:903:1210:b0:1a6:4a64:4d27 with SMTP id l16-20020a170903121000b001a64a644d27mr268087plh.40.1681776517661; Mon, 17 Apr 2023 17:08:37 -0700 (PDT) Received: from dhcp-172-26-102-232.dhcp.thefacebook.com ([2620:10d:c090:400::5:9cf7]) by smtp.gmail.com with ESMTPSA id i2-20020a1709026ac200b001a64a2b790fsm8225505plt.164.2023.04.17.17.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 17:08:37 -0700 (PDT) Date: Mon, 17 Apr 2023 17:08:33 -0700 From: Alexei Starovoitov To: Feng zhou Cc: martin.lau@linux.dev, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mykolal@fb.com, shuah@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, yangzhenze@bytedance.com, wangdongdong.6@bytedance.com, zhouchengming@bytedance.com Subject: Re: [PATCH 1/2] bpf: support access variable length array of integer type Message-ID: <20230418000833.keqhb7kdpibgaodt@dhcp-172-26-102-232.dhcp.thefacebook.com> References: <20230417080749.39074-1-zhoufeng.zf@bytedance.com> <20230417080749.39074-2-zhoufeng.zf@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230417080749.39074-2-zhoufeng.zf@bytedance.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 17, 2023 at 04:07:48PM +0800, Feng zhou wrote: > From: Feng Zhou > > After this commit: > bpf: Support variable length array in tracing programs (9c5f8a1008a1) > Trace programs can access variable length array, but for structure > type. This patch adds support for integer type. > > Example: > Hook load_balance > struct sched_domain { > ... > unsigned long span[]; > } > > The access: sd->span[0]. The use case makes sense. Please add it as a selftest. Either combine it with patch 2 or another patch 3. and then resubmit. Make sure to use [PATCH bpf-next] subject, so BPF CI knows how to test it.