Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4810027rwe; Mon, 17 Apr 2023 19:57:39 -0700 (PDT) X-Google-Smtp-Source: AKy350Y98DZ4wW8aeUdtyo4ESGNr17wqeJ62KAm5uT7gH/EL1hOKOGr0zzol4ecTkm5vatl8Zpbh X-Received: by 2002:a17:902:f551:b0:1a6:5fa2:aa50 with SMTP id h17-20020a170902f55100b001a65fa2aa50mr913860plf.1.1681786659510; Mon, 17 Apr 2023 19:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681786659; cv=none; d=google.com; s=arc-20160816; b=MxwuyI71heYr0pHc2CUcFg8TlzciALMCptVkXbqnw6h1qEpGY9n1C6L6kYkB0KUBJH OjdkMSf8QDhVQJ77wi77RS33blmJr32IDKIFklFljvqoRBV+mOi96Jc9IxtpKKGK0J3V sPI8OD0I1hcl2j6CzAlH9asF0lCwBxLnsxGFM9raP7mL0BTCzlFRrhp8u160WOPBDdSK /hz25rjiqqyTOwkwt+l2YCsOGfvdbmZ/R8kjQ0a+7lsjg0kM36nMakJlS13GOugxJsjv xmqIwaIe4CIbavlFZwSTUbDpcYIlFROCDj8zJ3bDbt3DrOrMikulKu7syKrr4R1ZPi7S StOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=rI8CSW8wZY6h2DetmThed8bwX0CVp8MeiGi3ooxUQA0=; b=afc2ajz/rERN1ekT11OZOAI1Rk/ddjyn3rBZCemar5RTkICRMdha3Duk1OCBasW0WP wY9y4IJpkYiB7oxNd07+i4iAxXnEU75I/YsKynEMzmJiiymXMTQ48dsRzznvMgU95WfJ 1tJ0Rj0MkVru/9ShPDZ8H8s4P5Mu0vjqqEv71A5fMmKTxVq3uWR04C+5ovDDFTB9E1VV lpdlhiLbS3qi6TWGIG16UqVVXdSK9cZCTE5e6d4B1RP3GYuuUuCZQbcXP+T8qRbw8cg8 ZIwrBnLlrCISl21eizhgcGLj93dYTWHP/fuklTvAKFfPO0alA0sr/QBKN5dJMWq0WvCy yzsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=H+aEpkTo; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a170902d50900b001a1b454e535si14413420plg.257.2023.04.17.19.57.26; Mon, 17 Apr 2023 19:57:39 -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=@bytedance.com header.s=google header.b=H+aEpkTo; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjDRCyk (ORCPT + 99 others); Mon, 17 Apr 2023 22:54:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjDRCyh (ORCPT ); Mon, 17 Apr 2023 22:54:37 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B55B527C for ; Mon, 17 Apr 2023 19:54:10 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-63b5465fc13so1162265b3a.3 for ; Mon, 17 Apr 2023 19:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1681786449; x=1684378449; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=rI8CSW8wZY6h2DetmThed8bwX0CVp8MeiGi3ooxUQA0=; b=H+aEpkToTaqeRZMoNe5U647O5kYJ1IqlYabxWBmtbtWHnfrsp7FBJSyhjgGneIyc5X csQLFLvJhDJVW2KFJrN+/e2D77QfJd6toFrE64v4EDK9N20OWmC1v58XBX4KImHw5H3y h13jgJtHlNd7uTOSunITpA9tqXgqggbEYlfg8FsyLrDZHjouUFzRTtOXih85qjLuEndk wmbU/raenCrq8HqGisML+MEOiZJvfmqeRvGbM4/9T9bHl2Ub4pGWxsZtB5Lemx/BqMio SMn1S3ki+4Y4GBfexFR9UXeVuQ8DRhr/p7h+49fpKXh6LHFspnLtU904my5R/S9i/M0v FLxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681786449; x=1684378449; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rI8CSW8wZY6h2DetmThed8bwX0CVp8MeiGi3ooxUQA0=; b=HN+wZb8V5OK5QirdfPfG8XTSZQGAuCf/6MPfG+mbj/gZpHvBwqFDliKN15JWur8njG qqtZoUtcciA75sRoLSp91QuC22S1m0xVE5V42zOCQ4H1rCrEmvg6yyuDOewejmG2aha4 mrsHt4Jes+T2MctUL20G9A5MOP0EVu1dGCuJfvVHQ6nWWVzSvuhr6570Q4IKJqHh6ezM WuOW6KQ2Si+GbS/jhI6JWi0WDvsblBz3Yo45hofxxtA1cVB/G1GHSlJIjWBIiElAtXWZ WNdVVxcd2dcV0ie47y6BK4sXLFzGnwyrUyYSSOx7wvopoEB/sx35mUd4ysL4oUBJM/xU PDbA== X-Gm-Message-State: AAQBX9fuv0PPbAM5hqenFSuYVyrlyOGCo3dcl8Le4oK9WsBeS91ayFEa DeTGNGmbasgivX2fbxEC3PWAhg== X-Received: by 2002:a05:6a00:cc7:b0:637:920c:25fd with SMTP id b7-20020a056a000cc700b00637920c25fdmr26555641pfv.17.1681786449272; Mon, 17 Apr 2023 19:54:09 -0700 (PDT) Received: from [10.71.57.173] ([139.177.225.254]) by smtp.gmail.com with ESMTPSA id a8-20020a62bd08000000b0062dd993fdfcsm8194548pff.105.2023.04.17.19.54.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Apr 2023 19:54:08 -0700 (PDT) Message-ID: <0460e6ac-40f9-6e47-e121-87c824658482@bytedance.com> Date: Tue, 18 Apr 2023 10:53:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Re: [PATCH 1/2] bpf: support access variable length array of integer type To: Alexei Starovoitov 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 References: <20230417080749.39074-1-zhoufeng.zf@bytedance.com> <20230417080749.39074-2-zhoufeng.zf@bytedance.com> <20230418000833.keqhb7kdpibgaodt@dhcp-172-26-102-232.dhcp.thefacebook.com> From: Feng Zhou In-Reply-To: <20230418000833.keqhb7kdpibgaodt@dhcp-172-26-102-232.dhcp.thefacebook.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 在 2023/4/18 08:08, Alexei Starovoitov 写道: > 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. Will do, thanks.